summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkii/page-run.mkii
blob: b128c192d87d66830b8e06d0d6e8026d1564814c (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
%D \module
%D   [       file=page-run,
%D        version=2000.10.20,
%D          title=\CONTEXT\ Page Macros,
%D       subtitle=Runtime 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.

\writestatus{loading}{ConTeXt Page Macros / Runtime Macros}

\unprotect

\gdef\doshowprint[#1][#2][#3]%
  {\framed
     [\c!offset=\v!overlay,
      \c!strut=\v!no]
     {\forgetall
      \dontcomplain
      \globaldefs\minusone
      \dimen0\pagegoal
      \definepapersize[X][\c!width=4em, \c!height=6em]%
      \definepapersize[Y][\c!width=12em,\c!height=14em]%
      \setuppapersize[#1,X][#2,Y]%
      \setuplayout[#3]%
      \setbox0\vbox
        {\framed
          [\c!offset=\v!overlay,\c!strut=\v!no,
           \c!width=\paperwidth,\c!height=\paperheight]
          {\ss ABC\par DEF}}%
      \doublesidedfalse
      \def\cutmarklength{.5em}%
      \addpagecutmarks0%
      \replicatepagebox0%
      \scalepagebox0%
      \mirrorpaperbox0%
      \orientpaperbox0%
      \centerpagebox0%
      \mirrorprintbox0%
      \orientprintbox0%
      \offsetprintbox0%
      \pagegoal\dimen0
      \box0}}

\gdef\showprint
  {\dotripleempty\doshowprint}

% \switchnaarkorps[8pt]
%
% \startcombinatie[4*4]
%   {\toonprint}                                       {\strut}
%   {\toonprint[][][plaats=midden]}                    {\type{plaats=midden}}
%   {\toonprint[][][plaats=midden,markering=aan]}      {\type{markering=aan}\break
%                                                      \type{plaats=midden}}
%   {\toonprint[][][plaats=midden,markering=aan,nx=2]} {\type{markering=aan}\break
%                                                      \type{plaats=midden}\break
%                                                      \type{nx=2}}
%   {\toonprint[][][plaats=links]}                     {\type{plaats=links}}
%   {\toonprint[][][plaats=rechts]}                    {\type{plaats=rechts}}
%   {\toonprint[][][plaats={links,onder}]}             {\type{plaats={links,onder}}}
%   {\toonprint[][][plaats={rechts,onder}]}            {\type{plaats={rechts,onder}}}
%   {\toonprint[][][nx=2,ny=1]}                        {\type{nx=2,ny=1}}
%   {\toonprint[][][nx=1,ny=2]}                        {\type{nx=1,ny=2}}
%   {\toonprint[][][nx=2,ny=2]}                        {\type{nx=2,ny=2}}
%   {\toonprint[][][nx=2,ny=2,plaats=midden]}          {\type{nx=2,ny=2}\break
%                                                       \type{plaats=midden}}
%   {\toonprint[][][rugoffset=3pt]}                    {\type{rugoffset=.5cm}}
%   {\toonprint[][][kopoffset=3pt]}                    {\type{kopoffset=.5cm}}
%   {\toonprint[][][schaal=1.5]}                       {\type{schaal=1.5}}
%   {\toonprint[][][schaal=0.8]}                       {\type{schaal=0.8}}
% \stopcombinatie
%
% \startcombinatie[3*4]
%   {\toonprint[liggend][][plaats=midden]}              {\type{liggend}}
%   {\toonprint[][liggend][plaats=midden]}              {\strut\break\type{liggend}}
%   {\toonprint[liggend][liggend][plaats=midden]}       {\type{liggend}\break\type{liggend}}
%   {\toonprint[90][][plaats=midden]}                   {\type{90}}
%   {\toonprint[][90][plaats=midden]}                   {\strut\break\type{90}}
%   {\toonprint[90][90][plaats=midden]}                 {\type{90}\break\type{90}}
%   {\toonprint[180][][plaats=midden]}                  {\type{180}}
%   {\toonprint[][180][plaats=midden]}                  {\strut\break\type{180}}
%   {\toonprint[180][180][plaats=midden]}               {\type{180}\break\type{180}}
%   {\toonprint[gespiegeld][][plaats=midden]}           {\type{gespiegeld}}
%   {\toonprint[][gespiegeld][plaats=midden]}           {\strut\break\type{gespiegeld}}
%   {\toonprint[gespiegeld][gespiegeld][plaats=midden]} {\type{gespiegeld}\break\type{gespiegeld}}
% \stopcombinatie

\gdef\doshowframe[#1][#2]%
  {\ifsecondargument
     \setupbackgrounds
       [\v!page]
       [\c!frame=\v!on,
        \c!corner=\v!rectangular,
        \c!frameoffset=\!!zeropoint,
        \c!framedepth=\!!zeropoint,
        \c!framecolor=layout:page]
     \setupbackgrounds
       [#1][#2]
       [\c!background=,
        \c!frame=\v!on,
        \c!corner=\v!rectangular,
        \c!frameoffset=\!!zeropoint,
        \c!framedepth=\!!zeropoint,
        \c!framecolor=]
   \else\iffirstargument
     \showframe
       [\v!header,\v!text,\v!footer]
       [#1]
   \else
     \showframe
       [\v!header,\v!text,\v!footer]
       [\v!leftedge,\v!leftmargin,
        \v!text,
        \v!rightmargin,\v!rightedge]
   \fi\fi
   \setupbackgrounds
     [\c!state=\v!repeat]}

\gdef\showframe{\dodoubleempty\doshowframe}

\gdef\showsetupA#1#2%
  {#1&\PtToCm{\the#2}&\the#2&\tttf\string#2\cr}

\gdef\showsetupB#1#2#3%
  {#1&&#2#3&\tttf\string#3\cr}

% \startinterface english % english is fallback

\gdef\showsetups
  {\noindent
   \vbox
     {\forgetall
      \dontcomplain
      \switchtobodyfont[\v!small]
      \tabskip\zeropoint
      \halign
        {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
         \showsetupA{paperheight}        \paperheight
         \showsetupA{paperwidth}         \paperwidth
         \showsetupA{printpaperheight}   \printpaperheight
         \showsetupA{printpaperwidth}    \printpaperwidth
         \showsetupA{topspace}           \topspace
         \showsetupA{backspace}          \backspace
         \showsetupA{height}             \makeupheight
         \showsetupA{width}              \makeupwidth
         \showsetupA{top}                \topheight
         \showsetupA{topdistance}        \topdistance
         \showsetupA{header}             \headerheight
         \showsetupA{headerdistance}     \headerdistance
         \showsetupA{textheight}         \textheight
         \showsetupA{footerdistance}     \footerdistance
         \showsetupA{footer}             \footerheight
         \showsetupA{bottomdistance}     \bottomdistance
         \showsetupA{bottom}             \bottomheight
         \showsetupA{leftedge}           \leftedgewidth
         \showsetupA{leftedgedistance}   \leftedgedistance
         \showsetupA{leftmargin}         \leftmarginwidth
         \showsetupA{leftmargindistance} \leftmargindistance
         \showsetupA{textwidth}          \textwidth
         \showsetupA{rightmargindistance}\rightmargindistance
         \showsetupA{rightmargin}        \rightmarginwidth
         \showsetupA{rightedgedistance}  \rightedgedistance
         \showsetupA{rightedge}          \rightedgewidth
         \showsetupB{bodyfontsize}       \the   \globalbodyfontsize
         \showsetupB{line}               \relax \normallineheight
         \showsetupB{height}             \relax \strutheightfactor
         \showsetupB{depth}              \relax \strutdepthfactor
         \showsetupB{topskip}            \relax \topskipfactor
         \showsetupB{maxdepth}           \relax \maxdepthfactor}}}

% \stopinterface

\startinterface dutch

\gdef\showsetups
  {\noindent
   \vbox
     {\forgetall
      \dontcomplain
      \switchtobodyfont[\v!small]
      \tabskip\zeropoint
      \halign
        {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
         \showsetupA{papierhoogte}       \papierhoogte
         \showsetupA{papierbreedte}      \papierbreedte
         \showsetupA{printpapierhoogte}  \printpapierhoogte
         \showsetupA{printpapierbreedte} \printpapierbreedte
         \showsetupA{kopwit}             \kopwit
         \showsetupA{rugwit}             \rugwit
         \showsetupA{snijwit}            \snijwit
         \showsetupA{hoogte}             \zethoogte
         \showsetupA{breedte}            \zetbreedte
         \showsetupA{boven}              \bovenhoogte
         \showsetupA{bovenafstand}       \bovenafstand
         \showsetupA{hoofd}              \hoofdhoogte
         \showsetupA{hoofdafstand}       \hoofdafstand
         \showsetupA{teksthoogte}        \teksthoogte
         \showsetupA{voetafstand}        \voetafstand
         \showsetupA{voet}               \voethoogte
         \showsetupA{onderafstand}       \onderafstand
         \showsetupA{onder}              \onderhoogte
         \showsetupA{linkerrand}         \linkerrandbreedte
         \showsetupA{linkerrandafstand}  \linkerrandafstand
         \showsetupA{linkermarge}        \linkermargebreedte
         \showsetupA{linkermargeafstand} \linkermargeafstand
         \showsetupA{tekstbreedte}       \tekstbreedte
         \showsetupA{rechtermargeafstand}\rechtermargeafstand
         \showsetupA{rechtermarge}       \rechtermargebreedte
         \showsetupA{rechterrandafstand} \rechterrandafstand
         \showsetupA{rechterrand}        \rechterrandbreedte
         \showsetupB{korps}              \the   \globalbodyfontsize
         \showsetupB{regel}              \relax \normallineheight
         \showsetupB{hoogte}             \relax \strutheightfactor
         \showsetupB{diepte}             \relax \strutdepthfactor
         \showsetupB{boven}              \relax \topskipfactor
         \showsetupB{onder}              \relax \maxdepthfactor}}}

\stopinterface

% todo: \showsetupA{rugwit} \rugwit

\startinterface german

\gdef\showsetups%
  {\noindent
   \vbox
     {\forgetall
      \dontcomplain
      \switchtobodyfont[\v!small]
      \tabskip\zeropoint
      \halign
        {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
         \showsetupA{papierhoehe}          \papierhoehe
         \showsetupA{papierbreite}         \papierbreite
         \showsetupA{printpapierhoehe}     \printpapierhoehe
         \showsetupA{printpapierbreite}    \printpapierbreite
         \showsetupA{kopfweite}            \kopfweite
         \showsetupA{rumpfweite}           \rumpfweite
         \showsetupA{hoehe}                \satzhoehe
         \showsetupA{breite}               \satzbreite
         \showsetupA{oben}                 \hoeheoben
         \showsetupA{abstandoben}          \abstandoben
         \showsetupA{kopfzeile}            \kopfzeilenhoehe
         \showsetupA{kopfzeilenabstand}    \kopfzeilenabstand
         \showsetupA{texthoehe}            \texthoehe
         \showsetupA{fusszeileabstand}     \fusszeileabstand
         \showsetupA{fusszeilen}           \fusszeilenhoehe
         \showsetupA{abstandunten}         \abstandunten
         \showsetupA{hoeheunten}           \hoeheunten
         \showsetupA{linkerrand}           \breitelinkerrand
         \showsetupA{abstandlinkerrand}    \abstandlinkerrand
         \showsetupA{linkemarginal}        \linkemarginalbreite
         \showsetupA{linkemarginalafstand} \linkemarginalafstand
         \showsetupA{textbreite}           \textbreite
         \showsetupA{rechtemarginalafstand}\rechtemarginalafstand
         \showsetupA{rechtemarginal}       \rechtemarginalbreite
         \showsetupA{abstandrechterrand}   \abstandrechterrand
         \showsetupA{rechterrand}          \breiterechterrand
         \showsetupB{fliesstext}           \the   \globalbodyfontsize
         \showsetupB{linie}                \relax \normallineheight
         \showsetupB{hoehe}                \relax \strutheightfactor
         \showsetupB{tiefe}                \relax \strutdepthfactor
         \showsetupB{topskip}              \relax \topskipfactor
         \showsetupB{maxdepth}             \relax \maxdepthfactor}}}

\stopinterface

\startinterface czech

\gdef\showsetups%
  {\noindent
   \vbox
     {\forgetall
      \dontcomplain
      \switchtobodyfont[\v!small]
      \tabskip\zeropoint
      \halign
        {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
         \showsetupA{vyskapapiru}              \vyskapapiru
         \showsetupA{sirkapapiru}              \sirkapapiru
         \showsetupA{vyskatiskpapiru}          \vyskatiskpapiru
         \showsetupA{sirkatiskpapiru}          \sirkatiskpapiru
         \showsetupA{hornimezera}              \hornimezera
         \showsetupA{spodnimezera}             \spodnimezera
         \showsetupA{vyska}                    \vyskasazby
         \showsetupA{breite}                   \sirkasazby
         \showsetupA{vyskatextu}               \vyskatextu
         \showsetupA{sirkatextu}               \sirkatextu
         \showsetupA{horejsek}                 \vyskahorejsku
         \showsetupA{vzdalenosthorejsku}       \vzdalenosthorejsku
         \showsetupA{zahlavi}                  \vyskazahlavi
         \showsetupA{vzdalenostzahlavi}        \vzdalenostzahlavi
         \showsetupA{fusszeileabstand}         \vzdalenostupati
         \showsetupA{upati}                    \vyskaupati
         \showsetupA{vzdalenostspodku}         \vzdalenostspodku
         \showsetupA{spodek}                   \vyakaspodku
         \showsetupA{levyokraj}                \sirkalevehookraje
         \showsetupA{vzdalenostlevehookraje}   \vzdalenostlevehookraje
         \showsetupA{levamarginalie}           \sirkalevemarginalie
         \showsetupA{vzdalenostlevemarginalie} \vzdalenostlevemarginalie
         \showsetupA{vzdalenostpravemarginalie}\vzdalenostpravemarginalie
         \showsetupA{pravamarginalie}          \sirkapravemarginalie
         \showsetupA{vzdalenostpravehookraje}  \vzdalenostpravehookraje
         \showsetupA{pravyokraj}               \sirkapravehookraje
         \showsetupB{zakladnivelikost}         \the   \globalbodyfontsize
         \showsetupB{linka}                    \relax \normallineheight
         \showsetupB{vyska}                    \relax \strutheightfactor
         \showsetupB{hloubka}                  \relax \strutdepthfactor
         \showsetupB{topskip}                  \relax \topskipfactor
         \showsetupB{maxdepth}                 \relax \maxdepthfactor}}}

\stopinterface

\startinterface romanian

\gdef\showsetups%
  {\noindent
   \vbox
     {\forgetall
      \dontcomplain
      \switchtobodyfont[\v!small]
      \tabskip\zeropoint
      \halign
        {\strut##\quad\hss&##\quad\hss&##\quad\hss&##\hss\cr
         \showsetupA{paperheight}        \paperheight
         \showsetupA{paperwidth}         \paperwidth
         \showsetupA{printpaperheight}   \printpaperheight
         \showsetupA{printpaperwidth}    \printpaperwidth
         \showsetupA{topspace}           \topspace
         \showsetupA{backspace}          \backspace
         \showsetupA{height}             \makeupheight
         \showsetupA{width}              \makeupwidth
         \showsetupA{top}                \topheight
         \showsetupA{topdistance}        \topdistance
         \showsetupA{header}             \headerheight
         \showsetupA{headerdistance}     \headerdistance
         \showsetupA{textheight}         \textheight
         \showsetupA{footerdistance}     \footerdistance
         \showsetupA{footer}             \footerheight
         \showsetupA{bottomdistance}     \bottomdistance
         \showsetupA{bottom}             \bottomheight
         \showsetupA{leftedge}           \leftedgewidth
         \showsetupA{leftedgedistance}   \leftedgedistance
         \showsetupA{leftmargin}         \leftmarginwidth
         \showsetupA{leftmargindistance} \leftmargindistance
         \showsetupA{textwidth}          \textwidth
         \showsetupA{rightmargindistance}\rightmargindistance
         \showsetupA{rightmargin}        \rightmarginwidth
         \showsetupA{rightedgedistance}  \rightedgedistance
         \showsetupA{rightedge}          \rightedgewidth
         \showsetupB{bodyfontsize}       \the   \globalbodyfontsize
         \showsetupB{line}               \relax \normallineheight
         \showsetupB{height}             \relax \strutheightfactor
         \showsetupB{depth}              \relax \strutdepthfactor
         \showsetupB{topskip}            \relax \topskipfactor
         \showsetupB{maxdepth}           \relax \maxdepthfactor}}}

\stopinterface

\gdef\showlayout % interfereert lelijk met een \typefile er na
  {\bgroup
   \page
   \showframe
   \setuplayout[\c!marking=\v!on]
   \dorecurse{4}{\showsetups\page}
   \egroup}

\gdef\showmargins
  {\starttabulate
   \NC asynchrone   \NC \doifoddpageelse     {odd}   {even} \NC \NR
   \NC synchrone    \NC \doifrightpageelse   {right} {left} \NC \NR
   \NC right margin \NC \the\rightmarginwidth               \NC \NR
   \NC left margin  \NC \the\leftmarginwidth                \NC \NR
   \NC outer margin \NC \the\outermarginwidth               \NC \NR
   \NC inner margin \NC \the\innermarginwidth               \NC \NR
   \stoptabulate}

\protect \endinput