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