Changes

Jump to navigation Jump to search
2,503 bytes added ,  14:56, 26 July 2022
m
no edit summary
<cd:parameter name="expansion">
<cd:paramdoc></cd:paramdoc>
<cd:constant type="yes">expands the xml reference to actual content for title and bookmark (<code>\xmlatt {xml:name::4}{title} </code> <code>First section)</code>, see TUC file.  To expand userdata also use <code>\normalexpanded{\startsection[title=\xmlatt{#1}{title}]} </code> instead of <code>expansion=yes</code>.  <code>\normalexpanded{} </code> and are not in conflict, so you can use both.</cd:constant>
<cd:constant default="yes" type="no">no expansion, xml reference is used</cd:constant>
<cd:constant type="xml"> ?</cd:constant>
</cd:parameter>
<cd:parameter name="style">
<cd:paramdoc>The style to use for the heading text. See manual [[https://www.pragma-ade.com/general/manuals/ma-cb-en.pdf#page=81 Context: an excursion" section 33]], Fonts and font switches, e.g. for large, bold, sans serif section headers use <code>style=\tfa\bf\ss</code>.</cd:paramdoc>
<cd:constant type="cd:style"></cd:constant>
<cd:constant type="cd:command"></cd:constant>
</cd:parameter>
<cd:parameter name="aftersection">
<cd:paramdoc>Command to run after the section finishes e.g. at a <code>\stopchapter</code> statement.</cd:paramdoc>
<cd:constant type="cd:command"></cd:constant>
</cd:parameter>
</cd:parameter>
<cd:parameter name="before">
<cd:paramdoc>Command to run before the heading is written</cd:paramdoc>
<cd:constant type="cd:command"></cd:constant>
</cd:parameter>
<cd:parameter name="after">
<cd:paramdoc>Command to run after the heading is written, e.g. <code>after={\blank[3cm]}</code></cd:paramdoc>
<cd:constant type="cd:command"></cd:constant>
</cd:parameter>
</cd:command>
</cd:variants>
<cd:description><!-- To headings is associated the long description text, i.e. the content of the heading, but can also be associated numbers. These data can be processed for typesetting : * add a dot between the text and the number,* add a generic text before the "pure text"* appearance can be different for the text if we use it in the headers / footers, or in the Table of Content.* add vertical spaces before or after the text* add rules before or after the whole section under the heading* select if the command goes here -->title should appear on a right or a left page. 
</cd:description>
<cd:examples><cd:example title="First example"><context source="yes" text="produces">
The command \pushbackground stores the values of the background which is modified. After the execution of \page[right] the old values of background are restored by \popbackground.
</cd:example><cd:example title="Special facing pages for chapters">On March 7, 2022, Julian asked on the mailing list about some method to place an image on the facing page of each chapter in a (double-sided) book. Chapters might also end on an even (equivalently, left) page, in which case, an empty right (odd) page should be introduced after so that the next chapter still has its image on its facing (left) page. (https://www.mail-archive.com/ntg-context@ntg.nl/msg101455.html) In the discussion that ensued, Wolfgang posted the following elegant solution using {{cmd|definepageinjection}} [slightly re-formatted from (https://www.mail-archive.com/ntg-context@ntg.nl/msg101462.html)] — <context source="yes" text="which produces">% to render examples in the wiki\definepapersize[sheet][width=24cm,height=24cm]\definepapersize[page][width=6cm,height=6cm]\setuppapersize[page][sheet]\setuppaper[nx=4, ny=4]\setuparranging [XY]\setupbodyfont[6pt] % actual example starts here\setupexternalfigures [location=default] \setuppagenumbering [alternative=doublesided] \definepageinjection [chapter:start] [empty] [page=left] \definepageinjection [chapter:insert] [previouspage] [pagestate=stop,width=\paperwidth] \setuphead [chapter] [beforesection={\pageinjection[chapter:start]}, insidesection={\pageinjection[chapter:insert][name=\structureuservariable{image}]}] \starttext \startchapter [title={Cow}] [image=cow]\dorecurse{2}{\samplefile{klein}}\stopchapter \startchapter [title={Mill}] [image=hacker]\dorecurse{4}{\samplefile{lorem}}\stopchapter \startchapter [title={Mill}] [image=mill]\dorecurse{2}{\samplefile{klein}}\stopchapter\stoptext</context></cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
93

edits

Navigation menu