1
2
3
4
5
6
7
8
9
10
11
12
13
14\unprotect
15
16
17
18
19
20
21
22
23
24\definecolor[fakerulecolor] [black]
25\definecolor[fakebaselinecolor] [green]
26\definecolor[fakeparindentcolor][blue]
27
28\newif \iffakebaseline \fakebaselinetrue
29\newif \iffaketrigger \faketriggerfalse
30\newdimen \fakerulewidth \fakerulewidth=.2pt
31
32\unexpanded\def\fakerule#1
33 {\strut
34 \begingroup
35 \ifx\fakerulecolor\relax
36 \directcolored[fr\recurselevel c]
37 \else
38 \directcolored[fakerulecolor]
39 \fi
40 \iffakebaseline
41 \vrule\s!height1.25\exheight\s!depth.05\exheight\s!width#1
42 \kern#1
43 \vrule\s!height.05\exheight\s!depth .25\exheight\s!width#1
44 \else
45 \vrule\s!height1.25\exheight\s!depth .25\exheight\s!width#1
46 \fi
47 \endgroup
48 \allowbreak}
49
50\unexpanded\def\dorandomrecurse#1
51 {\getrandomcount\scratchcounter{1}{#1}
52 \dorecurse\scratchcounter}
53
54
55
56\unexpanded\def\fakelines#1#2
57 {\fakeparindent
58 \scratchdimen\hsize
59 \advance\scratchdimen \parindent
60 \fakerule\scratchdimen\break
61 \getrandomcount\scratchcounter{\ifcase0#1 3\else#1\fi}{\ifcase0#2 10\else#2\fi}
62 \dorecurse\scratchcounter{\fakerule\hsize}
63 \getrandomdimen\scratchdimen{.25\hsize}\hsize
64 \fakerule\scratchdimen
65 \par}
66
67\unexpanded\def\fakewords
68 {\ifvmode\fakeparindent\fi\onlyfakewords}
69
70\definepalet
71 [fakerule]
72 [fr1c=darkred,
73 fr2c=darkgreen,
74 fr3c=darkblue,
75 fr4c=darkyellow,
76 fr5c=darkgray,
77 fr6c=darkmagenta,
78 fr7c=darkcyan,
79 fr8c=darkorange]
80
81\unexpanded\def\onlyfakewords#1#2
82 {\dontleavehmode
83 \ifvmode\noindentation\fi
84 \getrandomcount\scratchcounter{\ifcase0#1 10\else#1\fi}{\ifcase0#2 40\else#2\fi}
85 \dofakewords\scratchcounter
86 }
87
88\unexpanded\def\fakenwords#1#2
89 {\fakeparindent
90 \getrandomseed\fakedwordseed
91 \setrandomseed{\ifcase0#2 #1\else#2\fi}
92 \dofakewords{#1}
93 \setrandomseed\fakedwordseed
94 }
95
96\def\dofakewords#1
97 {\bgroup
98 \dorecurse{#1}
99 {\iffaketrigger\signalcharacter\fi
100 \getrandomcount\scratchcounter{1}{5}
101 \dorecurse\scratchcounter
102 {\getrandomdimen\scratchdimen{.5em}{1.25em}
103 \fakerule\scratchdimen}
104 \space}
105 \removeunwantedspaces
106 \egroup}
107
108\def\doshowfakewords#1
109 {\bgroup
110 \setuppalet[fakerule]
111 \let\fakerulecolor\relax
112 \dorecurse{#1}
113 {\getrandomcount\scratchcounter{1}{5}
114 \dorecurse\scratchcounter
115 {\getrandomdimen\scratchdimen{.5em}{1.25em}
116 \color[fr\recurselevel c]{\fakerule\scratchdimen}}
117 \space}
118 \removeunwantedspaces
119 \egroup}
120
121\unexpanded\def\showfakewords
122 {\let\dofakewords\doshowfakewords}
123
124\unexpanded\def\fakeword
125 {\fakewords{1}{1}}
126
127\unexpanded\def\fakeparindent
128 {\noindent
129 \ifzeropt\parindent\else
130 \ifx\dofakedroppedcaps\relax
131 {\fakeparindentcolor
132 \vrule
133 \s!height \strutheight
134 \s!depth \strutdepth
135 \s!width \parindent}
136 \else
137 \dofakedroppedcaps \let\dofakedroppedcaps\relax
138 \fi
139
140
141 \fi}
142
143\let\dofakedroppedcaps\relax
144
145\unexpanded\def\fakedroppedcaps#1
146 {\ifnum#1>0
147 \def\dofakedroppedcaps
148 {\setbox\scratchbox\hpack
149 {\setbox\scratchbox\hpack{W}
150 \scratchdimen\dimexpr#1\lineheight\lineheight\dp\strutbox\relax
151 \vrule
152 \s!width#1\wd\scratchbox
153 \s!height\ht\scratchbox
154 \s!depth\scratchdimen}
155 \ht\scratchbox\ht\strutbox
156 \dp\scratchbox\dp\strutbox
157 \hangindent\dimexpr\wd\scratchbox.5\emwidth\relax
158 \wd\scratchbox\hangindent
159 \hangafter#1
160 \noindent
161 \llap{\fakeparindentcolor\box\scratchbox}}
162 \fi}
163
164\unexpanded\def\fakefigure
165 {\dodoubleempty\dofakefigure}
166
167\def\dofakefigure[#1][#2]#3#4#5#6
168 {\getvalue{\e!place\v!figure}
169 [#1][#2]
170 {\freezerandomseed
171 \let\endstrut\relax
172 \let\begstrut\relax
173 \doifelseinset{#1}{\v!left,\v!right}
174 {\fakewords{2}{4}}
175 {\fakewords{4}{10}}}
176 {\getrandomdimen\scratchdimenone{#3}{#4}
177 \getrandomdimen\scratchdimentwo{#5}{#6}
178 \doifinset{#1}{\v!left,\v!right}
179 {\scratchdimenone.75\scratchdimenone
180 \ifdim\scratchdimenone>.6\hsize \scratchdimenone.5\hsize\fi
181 \ifdim\scratchdimenone<.3\hsize \scratchdimenone.3\hsize\fi}
182 \framed
183 [\c!width=\scratchdimenone,
184 \c!height=\scratchdimentwo,
185 \c!frame=\v!off,
186 \c!background=\v!color,
187 \c!backgroundcolor=fakeparindentcolor]
188 {\bf\white#1}}
189 \defrostrandomseed}
190
191\unexpanded\def\fakeimage#1#2#3#4
192 {\getrandomdimen\scratchdimenone{#1}{#3}
193 \getrandomdimen\scratchdimentwo{#2}{#4}
194 \framed
195 [\c!width=\scratchdimenone,
196 \c!height=\scratchdimentwo,
197 \c!frame=\v!off,
198 \c!background=\v!color,
199 \c!backgroundcolor=fakeparindentcolor]
200 {}}
201
202\unexpanded\def\fakeformula
203 {\scratchdimenone\zeropoint
204 \getrandomcount\scratchcounter{3}{6}
205 \dorecurse\scratchcounter
206 {\getrandomdimen\scratchdimentwo{0.5\emwidth}{1.5\emwidth}
207 \mathord{\red\fakerule\scratchdimentwo}
208 \ifnum\recurselevel<\scratchcounter\fi
209 \advance\scratchdimentwo\scratchdimenone}
210 =\mathinner{\red\fakerule\scratchdimentwo}}
211
212\unexpanded\def\fakespacingformula
213 {\color[fakebaselinecolor]{\ruledbaseline}\fakeformula}
214
215
216
217
218\unexpanded\def\smashedgrid
219 {\dosingleempty\dosmashedgrid}
220
221\def\dosmashedgrid[#1]
222 {\hsmashed
223 {\setbox\scratchbox=\hpack
224 {\basegrid
225 [\c!nx=10,\c!ny=10,\c!dx=1,\c!dy=1,
226 \c!unit=\bodyfontsize,#1]}
227 \hpack to \zeropoint
228 {\hss\lower.5\ht\scratchbox\box\scratchbox\hss}
229 \hpack to \zeropoint
230 {\hss
231 \black\vrule\s!width6\linewidth\s!height3\linewidth\s!depth3\linewidth
232 \hss}}}
233
234\unexpanded\def\bodyfontgrid
235 {\hpack
236 {{\linewidth.1pt\yellow\smashedgrid[\c!nx=30,\c!ny=30,\c!scale=.3333]}
237 {\linewidth.2pt\green \smashedgrid[\c!nx=20,\c!ny=20,\c!scale=.5]}
238 {\linewidth.3pt\red \smashedgrid[\c!nx=10,\c!ny=10,\c!scale=1]}}}
239
240\unexpanded\def\emexgrid
241 {\hpack
242 {{\linewidth.15pt\green\smashedgrid[\c!nx=20,\c!ny=20,\c!unit=ex]}
243 {\linewidth.15pt\red \smashedgrid[\c!nx=10,\c!ny=10,\c!unit=em]}}}
244
245
246
247\unexpanded\def\simplethesis
248 {\setupsystem[random=1234]
249 \title{\fakewords{3}{4}}
250 \placelist[chapter,section]
251 \dorecurse{6}
252 {\chapter{\fakewords{5}{10}}
253 \dorecurse{5}
254 {\section{\fakewords{2}{5}}
255 \dorecurse{2}
256 {\dorecurse{3}{\fakewords{100}{200}\endgraf}
257 \placefigure{\fakewords{8}{15}}{\fakeimage{5cm}{3cm}{10cm}{5cm}}
258 \dorecurse{2}{\fakewords{100}{200}\endgraf}}}}}
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\writestatus{loading}{ConTeXt Tracking Macros Visualization}
290
291\unprotect
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310\unexpanded\def\showparagraphcue#1#2#3#4#5
311 {\bgroup
312 \scratchdimen#1\relax
313 \dontinterfere
314 \dontcomplain
315 #3#4\relax
316 \setbox\scratchbox\normalhbox to \scratchdimen
317 {#2{\ruledhbox to \scratchdimen
318 {\vrule #5 20\fakerulewidth \s!width \zeropoint
319 \normalhss}}}
320 \smashbox\scratchbox
321 \normalpenalty\plustenthousand
322 \box\scratchbox
323 \egroup}
324
325\unexpanded\def\ruledhanging
326 {\ifdim\hangindent>\zeropoint
327 \ifnum\hangafter<\zerocount
328 \normalhbox
329 {\setbox\scratchbox\ruledhbox to \hangindent
330 {\scratchdimen\strutht
331 \advance\scratchdimen \strutdp
332 \vrule
333 \s!width \zeropoint
334 \s!height \zeropoint
335 \s!depth \hangafter\scratchdimen}
336 \normalhskip\hangindent
337 \smashbox\scratchbox
338 \raise\strutht\box\scratchbox}
339 \fi
340 \fi}
341
342\unexpanded\def\ruledparagraphcues
343 {\bgroup
344 \dontcomplain
345 \normalhbox to \zeropoint
346 {\ifdim\leftskip>\zeropoint\relax
347 \showparagraphcue\leftskip\llap\relax\relax\!!depth
348 \normalhskip\leftskip
349 \fi
350 \ruledhanging
351 \normalhskip\hsize
352 \ifdim\rightskip>\zeropoint\relax
353 \normalhskip\rightskip
354 \showparagraphcue\rightskip\relax\relax\relax\!!depth
355 \fi}
356 \egroup}
357
358\unexpanded\def\ruledpar
359 {\relax
360 \ifhmode
361 \showparagraphcue{40\fakerulewidth}\relax\rightrulefalse\relax\s!height
362 \fi
363 \normalpar}
364
365\unexpanded\def\rulednoindent
366 {\relax
367 \normalnoindent
368 \ruledparagraphcues
369 \showparagraphcue{40\fakerulewidth}\llap\leftrulefalse\relax\s!height}
370
371\unexpanded\def\ruledindent
372 {\relax
373 \normalnoindent
374 \ruledparagraphcues
375 \ifdim\parindent>\zeropoint
376 \showparagraphcue\parindent\relax\relax\relax\s!height
377 \else
378 \showparagraphcue{40\fakerulewidth}\llap\relax\relax\s!height
379 \fi
380 \normalhskip\parindent}
381
382\unexpanded\def\dontshowimplicits
383 {\let\noindent \normalnoindent
384 \let\indent \normalindent
385 \let\par \normalpar}
386
387\unexpanded\def\showimplicits
388 {\let\noindent \rulednoindent
389 \let\indent \ruledindent
390 \let\par \ruledpar}
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425\newcounter\ruledbaselines
426
427\def\nofruledbaselines{3}
428
429\unexpanded\def\ruledbaseline
430 {\vrule \s!width \zeropoint
431 \bgroup
432 \dontinterfere
433 \doglobal\increment\ruledbaselines
434 \scratchdimen\nofruledbaselines\baselineskip
435 \setbox\scratchbox\normalvbox to 2\scratchdimen
436 {\leaders
437 \normalhbox
438 {\strut
439 \vrule
440 \s!height \fakerulewidth
441 \s!depth \fakerulewidth
442 \s!width 120\points}
443 \normalvfill}
444 \smashbox\scratchbox
445 \advance\scratchdimen \strutheightfactor\baselineskip
446 \setbox\scratchbox\normalhbox
447 {\normalhskip 48\points
448 \normalhbox to 24\points
449 {\normalhss
450 {\ttxx\ruledbaselines}
451 \normalhskip6\points}
452 \raise\scratchdimen\box\scratchbox}
453 \smashbox\scratchbox
454 \box\scratchbox
455 \egroup}
456
457\unexpanded\def\showbaselines
458 {\EveryPar{\ruledbaseline}}
459
460
461
462
463
464
465
466\unexpanded\def\showpagebuilder
467 {\EveryPar{\doshowpagebuilder}}
468
469\unexpanded\def\doshowpagebuilder
470 {\strut\llap
471 {\startcolor[blue]\vl
472 \high{\infofont v:\the\vsize }\vl
473 \high{\infofont g:\the\pagegoal }\vl
474 \high{\infofont t:\the\pagetotal}\vl
475 \stopcolor}}
476
477
478
479
480
481
482
483
484
485
486
487\def\colormarkoffset{\cutmarkoffset}
488\def\colormarklength{\cutmarklength}
489
490\def\dodocolorrangeA#1
491 {\fastcolored[#1]{\hrule\s!width3em\s!height\scratchdimen\s!depth\zeropoint}}
492
493\def\docolorrangeA#1 #2
494 {\vpack
495 {\hsize3em
496 \ifcase#1\or
497 \dodocolorrangeA{c=#2}\or
498 \dodocolorrangeA{m=#2}\or
499 \dodocolorrangeA{y=#2}\or
500 \dodocolorrangeA{m=#2,y=#2}\or
501 \dodocolorrangeA{c=#2,y=#2}\or
502 \dodocolorrangeA{c=#2,m=#2}\fi
503 \ifdim\scratchdimen>1ex
504 \vskip\scratchdimen
505 \vpack to \scratchdimen
506 {\vss\hpack to 3em{\hss#2\hss}\vss}
507 \fi}}
508
509\unexpanded\def\colorrangeA#1
510 {\vpack
511 {\startcolor[\s!white]
512 \scratchdimen\dimexpr(\colormarklength*4\tractempheight\tractempdepth)21\relax
513 \offinterlineskip
514 \docolorrangeA #1 1.00 \docolorrangeA #1 0.95
515 \docolorrangeA #1 0.75
516 \docolorrangeA #1 0.50
517 \docolorrangeA #1 0.25 \docolorrangeA #1 0.05
518 \docolorrangeA #1 0.00
519 \stopcolor}}
520
521\def\docolorrangeB #1 #2 #3 #4 #5
522 {\fastcolored
523 [\c!c=#2,\c!m=#3,\c!y=#4,\c!k=#5]
524 {\vrule\s!width\scratchdimen\s!height\colormarklength\s!depth\zeropoint}
525 \ifdim\scratchdimen>2em
526 \hskip\scratchdimen
527 \vpack to \colormarklength
528 {\vss\hpack to \scratchdimen{\hss#1\hss}\vss}
529 \fi}
530
531\unexpanded\def\colorrangeB
532 {\hpack
533 {\startcolor[\s!white]
534 \scratchdimen\dimexpr(\colormarklength*\plustwo\tractempwidth)11\relax
535 \docolorrangeB .5C .5 0 0 0
536 \docolorrangeB .5M 0 .5 0 0
537 \docolorrangeB .5Y 0 0 .5 0
538 \docolorrangeB .5K 0 0 0 .5
539 \docolorrangeB C 1 0 0 0
540 \docolorrangeB G 1 0 1 0
541 \docolorrangeB Y 0 0 1 0
542 \docolorrangeB R 0 1 1 0
543 \docolorrangeB M 0 1 0 0
544 \docolorrangeB B 1 1 0 0
545 \docolorrangeB K 0 0 0 1
546 \stopcolor}}
547
548\def\docolorrangeC#1
549 {\fastcolored
550 [\c!s=#1]
551 {\vrule\s!width\scratchdimen\s!height\colormarklength\s!depth\zeropoint}
552 \ifdim\scratchdimen>2em
553 \hskip\scratchdimen
554 \vpack to \colormarklength
555 {\vss\hpack to \scratchdimen{\hss#1\hss}\vss}
556 \fi}
557
558\unexpanded\def\colorrangeC
559 {\hpack
560 {\startcolor[\s!white]
561 \scratchdimen\dimexpr(\colormarklength*2\tractempwidth)14\relax
562 \docolorrangeC 1 \docolorrangeC .95
563 \docolorrangeC .9 \docolorrangeC .85
564 \docolorrangeC .8 \docolorrangeC .75
565 \docolorrangeC .7
566 \docolorrangeC .6
567 \docolorrangeC .5
568 \docolorrangeC .4
569 \docolorrangeC .3
570 \docolorrangeC .2
571 \docolorrangeC .1
572 \docolorrangeC 0
573 \stopcolor}}
574
575\def\docolormarkbox#1#2
576 {\tractempheight\ht#2
577 \tractempdepth \dp#2
578 \tractempwidth \wd#2
579 \setbox#2\hpack
580 {\scratchdimen\dimexpr\colormarklength2\relax
581 \forgetall
582 \ssxx
583 \setbox\scratchbox\vpack
584 {\offinterlineskip
585 \vskip\dimexpr\colormarkoffset\scratchdimen2\scratchdimen\relax
586 \ifcase#1\relax
587 \vskip\dimexpr\colormarklength\scratchdimen\tractempheight\relax
588 \else
589 \hpack to \tractempwidth{\hss\hpack{\colorrangeB}\hss}
590 \vskip\colormarkoffset\scratchdimen
591 \vpack to \tractempheight
592 {\vss
593 \hpack to \tractempwidth
594 {\llap{\colorrangeA1\hskip\colormarkoffset\scratchdimen}\hfill
595 \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA4}}
596 \vss
597 \hpack to \tractempwidth
598 {\llap{\colorrangeA2\hskip\colormarkoffset\scratchdimen}\hfill
599 \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA5}}
600 \vss
601 \hpack to \tractempwidth
602 {\llap{\colorrangeA3\hskip\colormarkoffset\scratchdimen}\hfill
603 \rlap{\hskip\colormarkoffset\scratchdimen\colorrangeA6}}
604 \vss}
605 \fi
606 \vskip\colormarkoffset\scratchdimen
607 \hpack to \tractempwidth
608 {\hss\lower\tractempdepth\hpack{\colorrangeC}\hss}}
609 \ht\scratchbox\tractempheight
610 \dp\scratchbox\tractempdepth
611 \wd\scratchbox\zeropoint
612 \box\scratchbox
613 \box#2}
614 \wd#2\tractempwidth
615 \ht#2\tractempheight
616 \dp#2\tractempdepth}
617
618\unexpanded\def\colormarkbox {\docolormarkbox\plusone }
619\unexpanded\def\rastermarkbox{\docolormarkbox\zerocount}
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640\newif\ifimmediatewrite
641
642\let\supernormalmark \normalmark
643\let\supernormalmarks \normalmarks
644
645\unexpanded\def\showwhatsits
646 {\unexpanded\def\normalmark {\visualwhatsit100m\supernormalmark }
647 \unexpanded\def\normalmarks{\visualwhatsit100m\supernormalmarks}
648 \unexpanded\def\special {\visualwhatsit0100s\normalspecial }
649 \unexpanded\def\write {\visualwhatsit001w\normalwrite }
650 \let\immediate\immediatewhatsit
651 \appendtoks\dontshowwhatsits\to\everystoptext}
652
653\unexpanded\def\immediatewhatsit
654 {\bgroup\futurelet\nexttoken\doimmediatewhatsit}
655
656\unexpanded\def\doimmediatewhatsit
657 {\ifx\nexttoken\write
658 \egroup\immediatewritetrue
659 \else
660 \egroup\expandafter\normalimmediate
661 \fi}
662
663\unexpanded\def\dontshowwhatsits
664 {\let\immediate \normalimmediate
665 \let\normalmark\supernormalmark
666 \let\special \normalspecial
667 \let\write \normalwrite}
668
669\unexpanded\def\visualwhatsit#1#2#3#4#5
670 {\bgroup
671 \pushwhatsit
672 \dontinterfere
673 \dontcomplain
674 \dontshowcomposition
675 \dontshowwhatsits
676 \ttx
677 \ifvmode\donetrue\else\donefalse\fi
678 \setbox\scratchbox\hpack
679 {\ifdone
680 \colored[r=#1,g=#2,b=#3]{#5}
681 \else
682 \colored[s=0]{#5}
683 \fi}
684 \setbox\scratchbox\hpack
685 {\ifdone
686 \colored[r=#1,g=#2,b=#3]{\vrule\s!width\wd\scratchbox}
687 \else
688 \colored[s=0]{\vrule\s!width\wd\scratchbox}
689 \fi
690 \hskip\wd\scratchbox\box\scratchbox}
691 \scratchdimen1ex
692 \setbox\scratchbox\hpack
693 {\ifdone\hskip\else\raise#4\fi\scratchdimen\box\scratchbox}
694 \smashbox\scratchbox
695 \ifdone\nointerlineskip\fi
696 \box\scratchbox
697 \ifvmode\nointerlineskip\fi
698 \popwhatsit
699 \egroup
700 \ifimmediatewrite
701 \immediatewritefalse
702 \expandafter\normalimmediate
703 \fi}
704
705\unexpanded\def\pushwhatsit
706 {\ifzeropt\lastskip
707 \ifcase\lastpenalty
708 \ifzeropt\lastkern
709 \ifhmode
710 \let\popwhatsit\relax
711 \else
712 \edef\popwhatsit{\prevdepth\the\prevdepth}
713 \fi
714 \else
715 \ifhmode
716 \edef\popwhatsit{\kern\the\lastkern}\unkern
717 \else
718 \edef\popwhatsit{\kern\the\lastkern\prevdepth\the\prevdepth}
719 \kern\lastkern
720 \fi
721 \fi
722 \else
723 \ifhmode
724 \edef\popwhatsit{\the\lastpenalty}
725 \unpenalty
726 \else
727 \edef\popwhatsit{\penalty\the\lastpenalty\prevdepth\the\prevdepth}
728
729 \fi
730 \fi
731 \else
732 \ifhmode
733 \edef\popwhatsit{\hskip\the\lastskip}\unskip
734 \else
735 \edef\popwhatsit{\vskip\the\lastskip\prevdepth\the\prevdepth}
736 \vskip\lastskip
737 \fi
738 \fi}
739
740
741
742
743\def\dodotagbox#1#2#3
744 {\def\next##1##2##3##4
745 {\vpack to \ht#2{##3\hpack to \wd#2{##1#3##2}##4}}
746 \processaction
747 [#1]
748 [ l=>\next\relax\hfill\vfill\vfill,
749 r=>\next\hfill\relax\vfill\vfill,
750 t=>\next\hfill\hfill\relax\vfill,
751 b=>\next\hfill\hfill\vfill\relax,
752 lt=>\next\relax\hfill\relax\vfill,
753 lb=>\next\relax\hfill\vfill\relax,
754 rt=>\next\hfill\relax\relax\vfill,
755 rb=>\next\hfill\relax\vfill\relax,
756 tl=>\next\relax\hfill\relax\vfill,
757 bl=>\next\relax\hfill\vfill\relax,
758 tr=>\next\hfill\relax\relax\vfill,
759 br=>\next\hfill\relax\vfill\relax,
760 \s!default=>\next\hfill\hfill\vfill\vfill,
761 \s!unknown=>\next\hfill\hfill\vfill\vfill]}
762
763\def\dotagbox[#1]#2
764 {\bgroup
765 \dowithnextbox
766 {\setbox\scratchbox\flushnextbox
767 \setbox\nextbox\ifhbox\nextbox\hpack\else\vpack\fi
768 \bgroup
769 \startoverlay
770 {\copy\scratchbox}
771 {\dodotagbox{#1}\scratchbox{\framed
772 [\c!background=\v!color,\c!backgroundcolor=\v!gray]{#2}}}
773 \stopoverlay
774 \egroup
775 \nextboxwd\the\wd\scratchbox
776 \nextboxht\the\ht\scratchbox
777 \nextboxdp\the\dp\scratchbox
778 \flushnextbox
779 \egroup}}
780
781\unexpanded\def\tagbox
782 {\dosingleempty\dotagbox}
783
784
785
786
787
788
789
790\definecolor[boxcolor:ht][r=.5,g=.75,b=.5]
791\definecolor[boxcolor:dp][r=.5,g=.5,b=.75]
792\definecolor[boxcolor:wd][r=.75,g=.5,b=.5]
793\definecolor[strutcolor] [r=.5,g=.25,b=.25]
794
795\unexpanded\def\coloredbox#1
796 {\dowithnextbox{#1{\hpack
797 {\blackrule[\c!width=\nextboxwd,\c!height=\nextboxht,\c!depth=\zeropoint,\c!color=boxcolor:ht]
798 \hskip\nextboxwd
799 \blackrule[\c!width=\nextboxwd,\c!height=\zeropoint,\c!depth=\nextboxdp,\c!color=boxcolor:dp]
800 \hskip\nextboxwd
801 \box\nextbox}}}#1}
802
803\unexpanded\def\coloredhbox{\coloredbox\hpack}
804\unexpanded\def\coloredvbox{\coloredbox\vpack}
805\unexpanded\def\coloredvtop{\coloredbox\tpack}
806
807\unexpanded\def\coloredstrut
808 {\color[strutcolor]{\def\strutwidth{2\points}\setstrut\strut}}
809
810\protect
811
812\continueifinputfile{mvisual.mkiv}
813
814\starttext
815 \simplethesis
816\stoptext
817 |