summaryrefslogtreecommitdiff
path: root/tex/context/base/cont-new.mkiv
blob: ee2159d436280e820bc4f292785ff02d64febed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%D \module
%D   [       file=cont-new,
%D        version=1995.10.10,
%D          title=\CONTEXT\ Miscellaneous Macros,
%D       subtitle=New Macros,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\newcontextversion{2014.01.30 22:59}

%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.

\unprotect

% \writestatus\m!system{beware: some patches loaded from cont-new.mkiv}

% \attribute152\zerocount : marks ... lots of sweeps so best early in list

%D Maybe:

% \appendtoks
%     \inheritmaintextcolor
% \to \everybeforenoteinsert

% \appendtoks
%     \inheritmaintextcolor
% \to \everymargindatacontent

%D Maybe:

\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
\unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop}

%D Needs some work:

\unexpanded\def\startgridcorrection
  {\dosingleempty\spac_grid_correction_start}

\def\spac_grid_correction_start[#1]%
  {\ifgridsnapping
     \snaptogrid[#1]\vbox\bgroup
   \else
     \startbaselinecorrection
   \fi}

\unexpanded\def\stopgridcorrection
  {\ifgridsnapping
     \egroup
   \else
     \stopbaselinecorrection
   \fi}

\unexpanded\def\checkgridsnapping
  {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi}

%D Probably obsolete:

\unexpanded\def\startcolumnmakeup % don't change
  {\bgroup
   \getrawnoflines\textheight % raw as we cna have topskip
   \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax
     \bgroup
     \forgetall}

\unexpanded\def\stopcolumnmakeup
  {\egroup
   \dp\scratchbox\zeropoint
   \wd\scratchbox\textwidth
   \box\scratchbox
   \egroup
   \page_otr_command_synchronize_hsize}

%D Till we fixed all styles:

\let\\=\crlf

\protect \endinput