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 \fi\fi}
385
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\installcorenamespace{headplacementalternative}
411\installcorenamespace{headrenderings}
412\installcorenamespace{headalternative}
413
414\installcommandhandler \??headalternative {headalternative} \??headalternative
415
416\setupheadalternative
417 [
418
419 \c!alternative=\v!vertical,
420 \c!renderingsetup=\??headrenderings:\currentheadalternative]
421
422\let\currentheadalternative \v!normal
423\let\currentheadrenderingsetup \empty
424\let\currentheadrenderingalternative\v!vertical
425
426\unexpanded\def\defineheadplacement
427 {\dodoubleargument\strc_rendering_define_placement}
428
429\def\strc_rendering_define_placement[#1][#2]
430 {\doifelsenextbgroup
431 {\strc_rendering_define_placement_yes[#1][#2]}
432 {\strc_rendering_define_placement_nop[#1][#2]}}
433
434\def\strc_rendering_define_placement_yes[#1][#2]
435 {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]
436 \setuvalue{\??headplacementalternative#1}##1##2}
437
438\def\strc_rendering_define_placement_nop[#1][#2]
439 {\defineheadalternative[#1][\c!alternative=#2,\c!renderingsetup=\??headrenderings:\v!command]
440 \setuvalue{\??headplacementalternative#1}}
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456\let\headnumbercontent\empty
457\let\headtextcontent \empty
458
459\newdimen\headwidth
460\newdimen\headtextwidth
461\newskip \headtextdistance
462\newdimen\headnumberdistance
463\newdimen\headnumberwidth
464
465
466
467
468\unexpanded\def\strc_rendering_initialize_alternatives
469 {\edef\currentheadalternative{\headparameter\c!alternative}
470 \ifcsname\currentheadalternativehash\s!parent\endcsname \else
471 \let\currentheadalternative\v!normal
472 \fi
473 \edef\currentheadrenderingsetup{\headalternativeparameter\c!renderingsetup}
474 \edef\currentheadrenderingalternative{\headalternativeparameter\c!alternative}
475 \ifx\currentheadrenderingalternative\empty
476 \let\currentheadrenderingalternative\v!vertical
477 \fi
478 \ifx\currentheadrenderingalternative\v!horizontal
479 \global\setfalse\headisdisplay
480 \global\setfalse\headissomewhere
481 \else\ifx\currentheadrenderingalternative\v!somewhere
482 \global\setfalse\headisdisplay
483 \global\settrue \headissomewhere
484 \else
485 \global\settrue \headisdisplay
486 \global\setfalse\headissomewhere
487 \fi\fi}
488
489\unexpanded\def\strc_rendering_initialize_dimensions
490 {\headwidth \headparameter\c!width \relax
491 \headnumberwidth \headparameter\c!numberwidth \relax
492 \headnumberdistance\headparameter\c!distance \relax
493 \headtextdistance \headparameter\c!textdistance\relax
494 \headtextwidth \headparameter\c!textwidth \relax}
495
496\unexpanded\def\headtextcontent
497 {\begingroup
498 \strc_rendering_initialize_style_and_color\c!textstyle\c!textcolor
499 \headparameter\c!commandbefore\relax
500 \ifcsname\currentheadhash\c!deeptextcommand\endcsname
501
502 \expandafter\let\expandafter\deepstructuretitlecommand\lastnamedcs
503 \fi
504 \ifconditional\headisdisplay
505
506 \headparameter\c!textcommand{\setstrut\begstrut\getheadtitle\endstrut}
507 \global\d_strc_rendering_local_height\strutht
508 \global\d_strc_rendering_local_depth\strutdp
509 \global\d_strc_rendering_local_lineheight\lineheight
510 \headparameter\c!commandafter\relax
511 \endgraf
512 \else
513 \headparameter\c!textcommand{\getheadtitle}
514 \headparameter\c!commandafter\relax
515 \fi
516 \endgroup}
517
518\unexpanded\def\headnumbercontent
519 {\begingroup
520 \strc_rendering_initialize_style_and_color\c!numberstyle\c!numbercolor
521 \ifcsname\currentheadhash\c!deepnumbercommand\endcsname
522
523 \expandafter\let\expandafter\deepstructurenumbercommand\lastnamedcs
524 \fi
525 \ifconditional\headisdisplay
526
527 \headparameter\c!numbercommand{\setstrut\begstrut\getheadnumber\endstrut}
528 \else
529 \headparameter\c!numbercommand{\getheadnumber}
530 \fi
531 \endgroup}
532
533\def\fakedheadnumber{\vphantom{0}}
534
535
536
537
538\unexpanded\def\fakeheadnumbercontent
539 {\edef\p_hidenumber{\headparameter\c!hidenumber}
540 \ifx\p_hidenumber\v!yes\else
541 \hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}
542 \fi}
543
544\unexpanded\def\strc_rendering_inject_number_and_text
545 {\edef\p_command{\headparameter\c!command}
546 \ifx\p_command\empty
547 \directsetup\currentheadrenderingsetup
548 \else
549 \p_command\headnumbercontent\headtextcontent
550 \fi}
551
552\unexpanded\def\strc_rendering_inject_text
553 {\edef\p_command{\headparameter\c!command}
554 \ifx\p_command\empty
555 \directsetup\currentheadrenderingsetup
556 \else
557 \p_command\empty\headtextcontent
558 \fi}
559
560\startsetups[\??headrenderings:\v!command]
561 \csname\??headplacementalternative\currentheadalternative\endcsname \headnumbercontent \headtextcontent
562\stopsetups
563
564
565
566
567
568
569\defineheadalternative
570 [\v!paragraph]
571 [\c!alternative=\v!vertical,
572 \c!renderingsetup=\??headrenderings:\v!paragraph]
573
574\startsetups[\??headrenderings:\v!paragraph]
575 \vbox {
576 \headsetupspacing
577 \begstrut
578 \ifconditional\headshownumber
579 \headnumbercontent
580 \hskip\headnumberdistance
581 \fi
582 \headtextcontent
583 }
584\stopsetups
585
586
587
588
589
590
591
592
593\defineheadalternative
594 [\v!normal]
595 [\c!alternative=\v!vertical,
596 \c!renderingsetup=\??headrenderings:\v!normal]
597
598\startsetups[\??headrenderings:\v!normal]
599 \vbox {
600 \headsetupspacing
601 \ifconditional\headshownumber
602 \ifzeropt\headwidth \else
603 \ifzeropt\headnumberwidth
604 \ifzeropt\headtextwidth \else
605 \headnumberwidth\dimexpr\headwidth\headtextwidth\relax
606 \fi
607 \else
608 \ifzeropt\headtextwidth
609 \headtextwidth\dimexpr\headwidth\headnumberwidth\relax
610 \fi
611 \fi
612 \hsize\headwidth
613 \fi
614 \ifzeropt\headnumberwidth \else
615 \headnumberdistance\zeropoint
616 \fi
617 \setbox\scratchbox\hbox \ifzeropt\headnumberwidth\else to \headnumberwidth\fi{\headnumbercontent}
618 \scratchdimen\dimexpr\wd\scratchbox\headnumberdistance\relax
619 \ifzeropt\headtextwidth \else
620 \hsize\dimexpr\scratchdimen\headtextwidth\relax
621 \fi
622 \hangindent\scratchdimen
623 \hangafter \plusone
624 \noindent
625 \box\scratchbox
626 \hskip\headnumberdistance
627 \else
628 \ifzeropt\headtextwidth
629 \ifzeropt\headwidth \else
630 \hsize\headwidth
631 \fi
632 \else
633 \hsize\headtextwidth
634 \fi
635 \noindent
636 \fakeheadnumbercontent
637 \fi
638 \headtextcontent
639 }
640\stopsetups
641
642\defineheadalternative
643 [\v!inmargin]
644 [\c!alternative=\v!vertical,
645 \c!renderingsetup=\??headrenderings:\v!inmargin]
646
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\startsetups[\??headrenderings:\v!inmargin]
674 \vbox {
675 \headsetupspacing
676 \dontleavehmode
677 \begstrut
678 \ifconditional\headshownumber
679 \doifelsesomething {\headparameter\c!location} {
680
681 \margindata [\headparameter\c!location] {
682 \headnumbercontent
683 }
684 } {
685
686 \llap {
687 \signalrightpage
688 \hbox {
689 \hfill
690 \headnumbercontent
691 \doifelserightpage{
692 \scratchdistance\leftmargindistance
693 } {
694 \scratchdistance\rightmargindistance
695 }
696 \hskip\dimexpr\d_strc_rendering_local_leftoffset\scratchdistance\relax
697 }
698 }
699 }
700 \else
701 \fakeheadnumbercontent
702 \fi
703 \headtextcontent
704 }
705\stopsetups
706
707\defineheadalternative
708 [\v!margin]
709 [\v!inmargin]
710
711
712
713
714
715
716
717\defineheadalternative
718 [\v!reverse]
719 [\c!alternative=\v!vertical,
720 \c!renderingsetup=\??headrenderings:\v!reverse]
721
722\startsetups[\??headrenderings:\v!reverse]
723 \vbox {
724 \headsetupspacing
725 \noindent
726 \begstrut
727 \setfalse\headisdisplay
728 \headtextcontent
729 \ifconditional\headshownumber
730 \kern\headnumberdistance
731 \headnumbercontent
732 \else
733 \fakeheadnumbercontent
734 \fi
735 \endstrut
736 }
737\stopsetups
738
739\defineheadalternative
740 [\v!middle]
741 [\c!alternative=\v!vertical,
742 \c!renderingsetup=\??headrenderings:\v!middle]
743
744\startsetups[\??headrenderings:\v!middle]
745 \vbox {
746 \headsetupspacing
747 \veryraggedcenter
748 \enforced\let\\\endgraf
749 \enforced\let\crlf\endgraf
750 \ifconditional\headshownumber
751 \strut
752 \headnumbercontent
753 \par
754 \else
755 \fakeheadnumbercontent
756 \fi
757 \begstrut
758 \headtextcontent
759 \endstrut
760 }
761\stopsetups
762
763\defineheadalternative
764 [\v!text]
765 [\c!alternative=\v!horizontal,
766 \c!renderingsetup=\??headrenderings:\v!text]
767
768\startsetups[\??headrenderings:\v!text]
769 \begingroup
770 \headsetupspacing
771 \ifconditional\headshownumber
772 \headnumbercontent
773 \kern\headnumberdistance
774 \fi
775 \begstrut
776 \headtextcontent
777 \endstrut
778 \endgroup
779\stopsetups
780
781
782
783\defineheadalternative
784 [\v!bottom]
785 [\c!alternative=\v!vertical,
786 \c!renderingsetup=\??headrenderings:\v!bottom]
787
788\startsetups[\??headrenderings:\v!bottom]
789 \ifconditional\headshownumber
790 \setbox\scratchboxone\hbox {
791 \headnumbercontent
792 }
793 \setbox\scratchboxtwo\vbox {
794 \headsetupspacing
795 \advance\hsize\wd\scratchboxone\relax
796 \headtextcontent
797 }
798 \hpack {
799 \box\scratchboxone
800 \hskip\headnumberdistance
801 \box\scratchboxtwo
802 }
803 \else
804 \vbox {
805 \headsetupspacing
806 \noindent
807 \headtextcontent
808 }
809 \fi
810\stopsetups
811
812\defineheadalternative
813 [\v!top]
814 [\c!alternative=\v!vertical,
815 \c!renderingsetup=\??headrenderings:\v!top]
816
817\startsetups[\??headrenderings:\v!top]
818 \ifconditional\headshownumber
819 \setbox\scratchboxone\hbox {
820 \headnumbercontent
821 }
822 \setbox\scratchboxtwo\vtop {
823 \headsetupspacing
824 \advance\hsize\wd\scratchboxone\relax
825 \headtextcontent
826 }
827 \hpack {
828 \box\scratchboxone
829 \hskip\headnumberdistance
830 \box\scratchboxtwo
831 }
832 \else
833 \vtop{
834 \headsetupspacing
835 \noindent
836 \headtextcontent
837 }
838 \fi
839\stopsetups
840
841
842
843
844
845
846\protect \endinput
847 |