columnsets-000.tex /size: 1866 b    last modification: 2025-02-21 11:03
1\usemodule[visual]
2\usemodule[simulate]
3
4\dontcomplain
5
6\startenvironment columnsets-000
7
8\useMPlibrary[dum]
9
10\setupbodyfont
11  [palatino]
12
13\setuplayout
14  [grid=yes]
15
16\setuplayout
17  [backspace=20mm,
18   cutspace=15mm,
19   width=middle,
20   height=middle]
21
22\setupsystem
23  [random=1234]
24
25\setuppagenumbering
26  [alternative=doublesided,
27   location=]
28
29\setupheadertexts
30  [pagenumber][right]
31  [left][pagenumber]
32
33\setupfootertexts
34  [\inputfilename]
35
36\setupfooter
37  [style=\tttf]
38
39\setupheader
40  [style=\tttf]
41
42\setuptolerance
43  [verytolerant,stretch]
44
45\definecolor[color-1][.5(red,green)]
46\definecolor[color-2][.5(green,blue)]
47\definecolor[color-3][.5(blue,red)]
48\definecolor[color-4][.5(white,black)]
49\definecolor[color-5][.5(white,color-4)]
50
51\startuniqueMPgraphic{frame}
52  fill OverlayBox withcolor \MPcolor{color-1} ;
53\stopuniqueMPgraphic
54
55\startuniqueMPgraphic{contrast}
56  fill OverlayBox withcolor \MPcolor{color-3} ;
57\stopuniqueMPgraphic
58
59\defineoverlay[frame]   [\uniqueMPgraphic{frame}]
60\defineoverlay[contrast][\uniqueMPgraphic{contrast}]
61
62% TODO
63
64\unprotect
65
66\protected\def\NormalizeFontWidthSpread#1#2#3#4#5#6%
67  {\global\setfalse\NFSpread
68   \scratchdimen#3%
69   \scratchdimen-.5\scratchdimen
70   \advance\scratchdimen#2\relax
71   \NormalizeFontWidth
72     #1%
73     {\enforced\def\+{\global\settrue\NFSpread\gobbleuntil\relax}%
74      \enforced\def\\{\gobbleuntil\relax}% newline
75      \setupspacing
76      #6\relax}%
77     {\scratchdimen}%
78     {#4}%
79   \ifconditional\NFSpread
80     % de gap valt in de binding
81   \else
82     \definefont[\strippedcsname#1][#4 #5]%
83   \fi}
84
85\protected\def\SpreadGapText#1#2%
86  {{\def\+{\kern#1}#2}}
87
88\protected\def\GapText#1#2#3#4#5% width distance font spec title
89  {\bgroup
90   \NormalizeFontWidthSpread\DummyFont{#1}{#2}{#3}{#4}{#5}%
91   \DummyFont\setupspacing\SpreadGapText{#2}{#5}\endgraf
92   \egroup}
93
94\protect
95
96\stopenvironment
97