1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Structure Macros Section Rendering}
15
16\unprotect
17
18\newbox\b_strc_rendering_head
19
20\newdimen\d_strc_rendering_local_leftoffset
21\newdimen\d_strc_rendering_local_rightoffset
22
23
24
25
26
27
28
29
30
31\unexpanded\def\strc_rendering_initialize_style_and_color
32 {\ifconditional\headisdisplay
33 \expandafter\strc_rendering_initialize_style_and_color_display
34 \else
35 \expandafter\strc_rendering_initialize_style_and_color_inline
36 \fi}
37
38\unexpanded\def\strc_rendering_initialize_style_and_color_display#1#2
39 {\dontconvertfont
40 \edef\p_strc_rendering_interlinespace{\headparameter\c!interlinespace}
41 \ifx\p_strc_rendering_interlinespace\empty
42
43 \setfalse\fontattributeisset
44 \setfalse\interlinespaceisset
45 \useheadstyleandcolor\c!style\c!color\relax
46 \ifconditional\fontattributeisset \ifconditional\interlinespaceisset \else
47 \setupinterlinespace
48 \fi \fi
49 \setfalse\fontattributeisset
50 \useheadstyleandcolor#1#2\relax
51 \ifconditional\fontattributeisset \ifconditional\interlinespaceisset \else
52 \setupinterlinespace
53 \fi \fi
54 \else
55
56 \setfalse\fontattributeisset
57 \useheadstyleandcolor\c!style\c!color\relax
58 \ifconditional\fontattributeisset
59 \dosetupcheckedinterlinespace\p_strc_rendering_interlinespace
60 \fi
61 \setfalse\fontattributeisset
62 \useheadstyleandcolor#1#2\relax
63 \ifconditional\fontattributeisset
64 \dosetupcheckedinterlinespace\p_strc_rendering_interlinespace
65 \fi
66 \fi}
67
68\unexpanded\def\strc_rendering_initialize_style_and_color_inline#1#2
69 {\dontconvertfont
70 \setfalse\fontattributeisset
71 \useheadstyleandcolor\c!style\c!color\relax
72 \ifconditional\fontattributeisset
73 \updateraggedskips
74 \fi
75 \setfalse\fontattributeisset
76 \useheadstyleandcolor#1#2\relax
77 \ifconditional\fontattributeisset
78 \updateraggedskips
79 \fi}
80
81\let\currentstructurereferenceattribute\attributeunsetvalue
82
83\def\headreferenceattributes
84 {\iflocation
85
86 attr \destinationattribute \currentstructureattribute
87 attr \referenceattribute \currentstructurereferenceattribute
88
89 \fi}
90
91\def\setinlineheadreferenceattributes
92 {\ifconditional\headisdisplay \else \iflocation
93 \c_attr_destination\currentstructureattribute
94 \c_attr_reference \currentstructurereferenceattribute
95
96 \fi \fi}
97
98\def\docheckheadreference
99 {\edef\currentheadinteraction{\headparameter\c!interaction}
100 \ifx\currentheadinteraction\v!list
101
102 \strc_references_get_simple_reference{*\the\locationcount}
103 \let\currentstructurereferenceattribute\currentreferenceattribute
104 \else\ifx\currentheadinteraction\v!reference
105
106 \edef\currentheadbackreference{\structurevariable\c!backreference}
107 \ifx\currentheadbackreference\empty \else
108 \strc_references_get_simple_reference\currentheadbackreference
109 \let\currentstructurereferenceattribute\currentreferenceattribute
110 \fi
111 \else
112
113 \fi\fi}
114
115
116
117
118\unexpanded\def\strc_rendering_place_head_text
119 {\strc_rendering_start_placement
120 \setheadmarking
121 \doresetstructureheadnumbercontent
122 \ifconditional\c_strc_sectioning_empty
123 \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}
124 \else
125 \docheckheadreference
126 \setbox\b_strc_rendering_head\hbox \headreferenceattributes
127 {\spac_grids_set_local_snapping{\headparameter\c!internalgrid}
128 \doresetstructureheadnumbercontent
129 \useheadstyleparameter\c!style
130 \setinlineheadreferenceattributes
131 \strc_rendering_inject_text}
132 \fi
133 \strc_rendering_stop_placement}
134
135\unexpanded\def\strc_rendering_place_head_number_and_text
136 {\strc_rendering_start_placement
137 \setheadmarking
138 \doifelsetext\getheadnumber
139 \dosetstructureheadnumbercontent
140 \doresetstructureheadnumbercontent
141 \ifconditional\c_strc_sectioning_empty
142 \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}
143 \else
144 \docheckheadreference
145 \setbox\b_strc_rendering_head\hbox \headreferenceattributes
146 {\spac_grids_set_local_snapping{\headparameter\c!internalgrid}
147 \useheadstyleparameter\c!style
148 \setinlineheadreferenceattributes
149 \strc_rendering_inject_number_and_text}
150 \fi
151 \strc_rendering_stop_placement}
152
153\unexpanded\def\strc_rendering_place_head_empty
154 {\hpack\headreferenceattributes{\getheadsyncs}}
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170\unexpanded\def\headhbox{\hbox\headreferenceattributes}
171\unexpanded\def\headvbox{\vbox\headreferenceattributes}
172
173\unexpanded\def\startlocalheadsetup{\bgroup\strc_rendering_initialize_spacing}
174\unexpanded\def\stoplocalheadsetup {\egroup}
175
176\unexpanded\def\strc_rendering_initialize_spacing
177 {\forgetall
178 \edef\p_align{\headparameter\c!align}
179 \ifx\p_align\empty \else
180 \setupalign[\p_align]
181 \fi
182 \edef\p_tolerance{\headparameter\c!tolerance}
183 \ifx\p_tolerance\empty \else
184 \setuptolerance[\p_tolerance]
185 \fi
186 \edef\p_strut{\headparameter\c!strut}
187 \ifx\p_strut\v!no
188 \setnostrut
189 \fi
190 \enforced\let\\\strc_rendering_shortcut_backslash}
191
192\unexpanded\def\strc_rendering_shortcut_backslash
193 {\crlf
194 \strut
195 \ignorespaces}
196
197\def\strc_rendering_start_placement
198 {\bgroup
199 \setsystemmode\currenthead
200 \strc_rendering_initialize_alternatives
201 \strc_rendering_initialize_dimensions
202 \strc_rendering_initialize_line_state
203 \reseteverypar
204 \noindent
205 \bgroup
206 \synctexpushline
207 \edef\p_aligntitle{\headparameter\c!aligntitle}
208 \ifx\p_aligntitle\v!yes
209 \strc_rendering_initialize_hsize_local
210 \else\ifx\p_aligntitle\v!float
211 \strc_rendering_initialize_hsize_local
212 \else
213 \strc_rendering_initialize_hsize_global
214 \fi\fi
215 \setfalse\inhibitmargindata
216 \dontcomplain
217 \postponenotes
218 \strc_rendering_initialize_interaction
219
220 \let\localheadsetup \strc_rendering_initialize_spacing
221 \let\headsetupspacing\strc_rendering_initialize_spacing}
222
223\def\strc_rendering_initialize_interaction
224 {\resetinteractionparameter\c!style
225 \resetinteractionparameter\c!color
226 \resetinteractionparameter\c!contrastcolor}
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246\newdimen\d_strc_rendering_hang_height
247\newcount\n_strc_rendering_hang_lines
248
249\newdimen\d_strc_rendering_local_height
250\newdimen\d_strc_rendering_local_depth
251\newdimen\d_strc_rendering_local_lineheight
252
253\def\strc_rendering_initialize_line_state
254 {\global\d_strc_rendering_local_height\strutht
255 \global\d_strc_rendering_local_depth\strutdp
256 \global\d_strc_rendering_local_lineheight\lineheight}
257
258\def\strc_rendering_check_hang
259 {\begingroup
260 \openlineheight\d_strc_rendering_local_lineheight
261 \d_strc_rendering_hang_height\htdp\b_strc_rendering_head
262 \getnoflines\d_strc_rendering_hang_height
263 \normalexpanded{\endgroup\n_strc_rendering_hang_lines\the\numexpr\noflines\plusone\relax}
264 \setbox\b_strc_rendering_head\hpack{\lower\n_strc_rendering_hang_lines\d_strc_rendering_hang_height\box\b_strc_rendering_head}
265 \d_strc_rendering_hang_height\dimexpr\htdp\b_strc_rendering_head\d_strc_rendering_local_height\strutdp\relax
266 \ht\b_strc_rendering_head\strutht
267 \dp\b_strc_rendering_head\strutdp
268 \d_strc_rendering_local_depth\strutdp}
269
270\installcorenamespace{headplacementcheckhang}
271
272\setvalue{\??headplacementcheckhang\v!line }{\strc_rendering_check_hang
273 \n_strc_rendering_hang_lines\zerocount}
274\setvalue{\??headplacementcheckhang\v!broad }{\strc_rendering_check_hang
275 \getnoflines\d_strc_rendering_hang_height}
276\setvalue{\??headplacementcheckhang\v!fit }{\strc_rendering_check_hang
277 \getrawnoflines\d_strc_rendering_hang_height}
278\setvalue{\??headplacementcheckhang\v!none }{\n_strc_rendering_hang_lines\zerocount}
279\setvalue{\??headplacementcheckhang }{\n_strc_rendering_hang_lines\zerocount}
280\setvalue{\??headplacementcheckhang\s!unknown}{\strc_rendering_check_hang
281 \n_strc_rendering_hang_lines\numexpr\headparameter\c!hang\plusone\relax}
282
283\def\strc_rendering_initialize_line_hang
284 {\ifconditional\headisdisplay
285 \expandnamespaceparameter\??headplacementcheckhang\headparameter\c!hang\s!unknown
286 \relax
287 \else
288 \n_strc_rendering_hang_lines \zerocount
289 \d_strc_rendering_hang_height\zeropoint
290 \fi}
291
292\def\strc_rendering_initialize_hsize_local
293 {\global\d_strc_rendering_local_leftoffset \leftskip
294 \global\d_strc_rendering_local_rightoffset\rightskip
295
296
297
298
299
300
301 \scratchwidth\availablehsize
302 \forgetall
303 \hsize\scratchwidth}
304
305\def\strc_rendering_initialize_hsize_global
306 {\global\d_strc_rendering_local_leftoffset \zeropoint
307 \global\d_strc_rendering_local_rightoffset\zeropoint
308 \forgetall}
309
310
311
312
313
314
315
316\def\strc_sectioning_stay_on_this_line
317 {\directcheckedvspacing{\v!line,\v!samepage}
318 \directcheckedvspacing\v!disable}
319
320\def\strc_rendering_stop_placement
321 {\n_strc_rendering_hang_lines\zerocount
322 \ifconditional\headisdisplay
323 \strc_rendering_initialize_line_hang
324
325 \setbox\b_strc_rendering_head\hbox
326 {\hskip\dimexpr\d_strc_rendering_local_leftoffset\headparameter\c!margin\relax
327 \box\b_strc_rendering_head
328 \getheadsyncs
329 }
330 \ifgridsnapping
331 \applygridmethod
332 {\headparameter\c!grid}
333 {\ifconditional\headisdisplay
334 \strc_rendering_initialize_style_and_color_display\c!textstyle\c!textcolor
335 \fi}
336 {\box\b_strc_rendering_head}
337 \else
338 \box\b_strc_rendering_head
339 \fi
340 \flushnotes
341 \endgraf
342 \ifvmode
343 \ifnum\n_strc_rendering_hang_lines>\zerocount
344 \dorecurse\n_strc_rendering_hang_lines{\nointerlineskip\dosomebreak\nobreak\strut\endgraf}
345 \fi
346 \nointerlineskip
347 \dosomebreak\nobreak
348 \fi
349
350 \else
351
352
353 \strut
354 \flushnotes
355 \unhbox\b_strc_rendering_head
356 \getheadsyncs
357 \ifconditional\headissomewhere
358 \strc_sectioning_stay_on_this_line
359 \else
360
361 \hskip\headtextdistance\relax
362 \strc_sectioning_inject_continuous_signal
363 \fi
364 \fi
365 \ifconditional\headisdisplay
366 \ifvmode
367 \ifgridsnapping
368 \prevdepth\strutdp
369 \else
370 \prevdepth\d_strc_rendering_local_depth
371 \fi
372 \fi
373 \fi
374 \synctexpopline
375 \egroup
376 \egroup
377 \ifconditional\headisdisplay
378 \useindentnextparameter\headparameter
379 \else\ifconditional\headissomewhere
380 \ignoreparskip
381 \noindentation
382 \else
383 \ignoreparskip
384 \doindentation
385 \fi\fi}
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411\installcorenamespace{headplacementalternative}
412\installcorenamespace{headrenderings}
413\installcorenamespace{headalternative}
414
415\installcommandhandler \??headalternative {headalternative} \??headalternative
416
417\setupheadalternative
418 [
419
420 \c!alternative=\v!vertical,
421 \c!renderingsetup=\??headrenderings:\currentheadalternative]
422
423\let\currentheadalternative \v!normal
424\let\currentheadrenderingsetup \empty
425\let\currentheadrenderingalternative\v!vertical
426
427\unexpanded\def\defineheadplacement
428 {\dodoubleargument\strc_rendering_define_placement}
429
430\def\strc_rendering_define_placement[#1][#2]
431 {\doifelsenextbgroup
432 {\strc_rendering_define_placement_yes[#1][#2]}
433 {\strc_rendering_define_placement_nop[#1][#2]}}
434
435\def\strc_rendering_define_placement_yes[#1][#2]
436 {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]
437 \setuvalue{\??headplacementalternative#1}##1##2}
438
439\def\strc_rendering_define_placement_nop[#1][#2]
440 {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]
441 \setuvalue{\??headplacementalternative#1}}
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457\let\headnumbercontent\empty
458\let\headtextcontent \empty
459
460\newdimen\headwidth
461\newdimen\headtextwidth
462\newskip \headtextdistance
463\newdimen\headnumberdistance
464\newdimen\headnumberwidth
465
466
467
468
469\unexpanded\def\strc_rendering_initialize_alternatives
470 {\edef\currentheadalternative{\headparameter\c!alternative}
471 \ifcsname\currentheadalternativehash\s!parent\endcsname \else
472 \let\currentheadalternative\v!normal
473 \fi
474 \edef\currentheadrenderingsetup{\headalternativeparameter\c!renderingsetup}
475 \edef\currentheadrenderingalternative{\headalternativeparameter\c!alternative}
476 \ifx\currentheadrenderingalternative\empty
477 \let\currentheadrenderingalternative\v!vertical
478 \fi
479 \ifx\currentheadrenderingalternative\v!horizontal
480 \global\setfalse\headisdisplay
481 \global\setfalse\headissomewhere
482 \else\ifx\currentheadrenderingalternative\v!somewhere
483 \global\setfalse\headisdisplay
484 \global\settrue \headissomewhere
485 \else
486 \global\settrue \headisdisplay
487 \global\setfalse\headissomewhere
488 \fi\fi}
489
490\unexpanded\def\strc_rendering_initialize_dimensions
491 {\headwidth \headparameter\c!width \relax
492 \headnumberwidth \headparameter\c!numberwidth \relax
493 \headnumberdistance\headparameter\c!distance \relax
494 \headtextdistance \headparameter\c!textdistance\relax
495 \headtextwidth \headparameter\c!textwidth \relax}
496
497\unexpanded\def\headtextcontent
498 {\begingroup
499 \strc_rendering_initialize_style_and_color\c!textstyle\c!textcolor
500 \headparameter\c!commandbefore\relax
501 \ifcsname\currentheadhash\c!deeptextcommand\endcsname
502
503 \expandafter\let\expandafter\deepstructuretitlecommand\lastnamedcs
504 \fi
505 \ifconditional\headisdisplay
506
507 \headparameter\c!textcommand{\setstrut\begstrut\getheadtitle\endstrut}
508 \global\d_strc_rendering_local_height\strutht
509 \global\d_strc_rendering_local_depth\strutdp
510 \global\d_strc_rendering_local_lineheight\lineheight
511 \headparameter\c!commandafter\relax
512 \endgraf
513 \else
514 \headparameter\c!textcommand{\getheadtitle}
515 \headparameter\c!commandafter\relax
516 \fi
517 \endgroup}
518
519\unexpanded\def\headnumbercontent
520 {\begingroup
521 \strc_rendering_initialize_style_and_color\c!numberstyle\c!numbercolor
522 \ifcsname\currentheadhash\c!deepnumbercommand\endcsname
523
524 \expandafter\let\expandafter\deepstructurenumbercommand\lastnamedcs
525 \fi
526 \ifconditional\headisdisplay
527
528 \headparameter\c!numbercommand{\setstrut\begstrut\getheadnumber\endstrut}
529 \else
530 \headparameter\c!numbercommand{\getheadnumber}
531 \fi
532 \endgroup}
533
534\def\fakedheadnumber{\vphantom{0}}
535
536
537
538
539\unexpanded\def\fakeheadnumbercontent
540 {\edef\p_hidenumber{\headparameter\c!hidenumber}
541 \ifx\p_hidenumber\v!yes\else
542 \hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}
543 \fi}
544
545\unexpanded\def\strc_rendering_inject_number_and_text
546 {\edef\p_command{\headparameter\c!command}
547 \ifx\p_command\empty
548 \directsetup\currentheadrenderingsetup
549 \else
550 \p_command\headnumbercontent\headtextcontent
551 \fi}
552
553\unexpanded\def\strc_rendering_inject_text
554 {\edef\p_command{\headparameter\c!command}
555 \ifx\p_command\empty
556 \directsetup\currentheadrenderingsetup
557 \else
558 \p_command\empty\headtextcontent
559 \fi}
560
561\startsetups[\??headrenderings:\v!command]
562 \csname\??headplacementalternative\currentheadalternative\endcsname \headnumbercontent \headtextcontent
563\stopsetups
564
565
566
567
568
569
570\defineheadalternative
571 [\v!paragraph]
572 [\c!alternative=\v!vertical,
573 \c!renderingsetup=\??headrenderings:\v!paragraph]
574
575\startsetups[\??headrenderings:\v!paragraph]
576 \vbox {
577 \headsetupspacing
578 \begstrut
579 \ifconditional\headshownumber
580 \headnumbercontent
581 \hskip\headnumberdistance
582 \fi
583 \headtextcontent
584 }
585\stopsetups
586
587
588
589
590
591
592
593
594\defineheadalternative
595 [\v!normal]
596 [\c!alternative=\v!vertical,
597 \c!renderingsetup=\??headrenderings:\v!normal]
598
599\startsetups[\??headrenderings:\v!normal]
600 \vbox {
601 \headsetupspacing
602 \ifconditional\headshownumber
603 \ifzeropt\headwidth \else
604 \ifzeropt\headnumberwidth
605 \ifzeropt\headtextwidth \else
606 \headnumberwidth\dimexpr\headwidth\headtextwidth\relax
607 \fi
608 \else
609 \ifzeropt\headtextwidth
610 \headtextwidth\dimexpr\headwidth\headnumberwidth\relax
611 \fi
612 \fi
613 \hsize\headwidth
614 \fi
615 \ifzeropt\headnumberwidth \else
616 \headnumberdistance\zeropoint
617 \fi
618 \setbox\scratchbox\hbox \ifzeropt\headnumberwidth\else to \headnumberwidth\fi{\headnumbercontent}
619 \scratchdimen\dimexpr\wd\scratchbox\headnumberdistance\relax
620 \ifzeropt\headtextwidth \else
621 \hsize\dimexpr\scratchdimen\headtextwidth\relax
622 \fi
623 \hangindent\scratchdimen
624 \hangafter \plusone
625 \noindent
626 \box\scratchbox
627 \hskip\headnumberdistance
628 \else
629 \ifzeropt\headtextwidth
630 \ifzeropt\headwidth \else
631 \hsize\headwidth
632 \fi
633 \else
634 \hsize\headtextwidth
635 \fi
636 \noindent
637 \fakeheadnumbercontent
638 \fi
639 \headtextcontent
640 }
641\stopsetups
642
643\defineheadalternative
644 [\v!inmargin]
645 [\c!alternative=\v!vertical,
646 \c!renderingsetup=\??headrenderings:\v!inmargin]
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674\startsetups[\??headrenderings:\v!inmargin]
675 \vbox {
676 \headsetupspacing
677 \dontleavehmode
678 \begstrut
679 \ifconditional\headshownumber
680 \doifelsesomething {\headparameter\c!location} {
681
682 \margindata [\headparameter\c!location] {
683 \headnumbercontent
684 }
685 } {
686
687 \llap {
688 \signalrightpage
689 \hbox {
690 \hfill
691 \headnumbercontent
692 \doifelserightpage{
693 \scratchdistance\leftmargindistance
694 } {
695 \scratchdistance\rightmargindistance
696 }
697 \hskip\dimexpr\d_strc_rendering_local_leftoffset\scratchdistance\relax
698 }
699 }
700 }
701 \else
702 \fakeheadnumbercontent
703 \fi
704 \headtextcontent
705 }
706\stopsetups
707
708\defineheadalternative
709 [\v!margin]
710 [\v!inmargin]
711
712
713
714
715
716
717
718\defineheadalternative
719 [\v!reverse]
720 [\c!alternative=\v!vertical,
721 \c!renderingsetup=\??headrenderings:\v!reverse]
722
723\startsetups[\??headrenderings:\v!reverse]
724 \vbox {
725 \headsetupspacing
726 \noindent
727 \begstrut
728 \setfalse\headisdisplay
729 \headtextcontent
730 \ifconditional\headshownumber
731 \kern\headnumberdistance
732 \headnumbercontent
733 \else
734 \fakeheadnumbercontent
735 \fi
736 \endstrut
737 }
738\stopsetups
739
740\defineheadalternative
741 [\v!middle]
742 [\c!alternative=\v!vertical,
743 \c!renderingsetup=\??headrenderings:\v!middle]
744
745\startsetups[\??headrenderings:\v!middle]
746 \vbox {
747 \headsetupspacing
748 \veryraggedcenter
749 \enforced\let\\\endgraf
750 \enforced\let\crlf\endgraf
751 \ifconditional\headshownumber
752 \strut
753 \headnumbercontent
754 \par
755 \else
756 \fakeheadnumbercontent
757 \fi
758 \begstrut
759 \headtextcontent
760 \endstrut
761 }
762\stopsetups
763
764\defineheadalternative
765 [\v!text]
766 [\c!alternative=\v!horizontal,
767 \c!renderingsetup=\??headrenderings:\v!text]
768
769\startsetups[\??headrenderings:\v!text]
770 \begingroup
771 \headsetupspacing
772 \ifconditional\headshownumber
773 \headnumbercontent
774 \kern\headnumberdistance
775 \fi
776 \begstrut
777 \headtextcontent
778 \endstrut
779 \endgroup
780\stopsetups
781
782
783
784\defineheadalternative
785 [\v!bottom]
786 [\c!alternative=\v!vertical,
787 \c!renderingsetup=\??headrenderings:\v!bottom]
788
789\startsetups[\??headrenderings:\v!bottom]
790 \ifconditional\headshownumber
791 \setbox\scratchboxone\hbox {
792 \headnumbercontent
793 }
794 \setbox\scratchboxtwo\vbox {
795 \headsetupspacing
796 \advance\hsize\wd\scratchboxone\relax
797 \headtextcontent
798 }
799 \hpack {
800 \box\scratchboxone
801 \hskip\headnumberdistance
802 \box\scratchboxtwo
803 }
804 \else
805 \vbox {
806 \headsetupspacing
807 \noindent
808 \headtextcontent
809 }
810 \fi
811\stopsetups
812
813\defineheadalternative
814 [\v!top]
815 [\c!alternative=\v!vertical,
816 \c!renderingsetup=\??headrenderings:\v!top]
817
818\startsetups[\??headrenderings:\v!top]
819 \ifconditional\headshownumber
820 \setbox\scratchboxone\hbox {
821 \headnumbercontent
822 }
823 \setbox\scratchboxtwo\vtop {
824 \headsetupspacing
825 \advance\hsize\wd\scratchboxone\relax
826 \headtextcontent
827 }
828 \hpack {
829 \box\scratchboxone
830 \hskip\headnumberdistance
831 \box\scratchboxtwo
832 }
833 \else
834 \vtop{
835 \headsetupspacing
836 \noindent
837 \headtextcontent
838 }
839 \fi
840\stopsetups
841
842
843
844
845
846
847\protect \endinput
848 |