Changes

Jump to navigation Jump to search
1,880 bytes added ,  21:15, 17 October 2011
no edit summary
</code>
=== Flushing section head data without typesetting them in the text ===
 
The following is probably a very special case. Hoever suppose you need to place section information like the title e.g. in the topspace area. You want that the section is still displayed in the TOC, but you do not want that at the spot where <cmd>\startsection[title=...,list=...]</cmd> resides there is any trace of it. The command to be used to hide the section title is:
 
<context>
\setuphead
[section]
[placehead=hidden]
</context>
 
Be aware that with this setting indeed the section title is not shown and no whit space is inserted. However in this way also the list entry for the TOC is gone. What you can do in such cases is to use the following command in connection with the above mentioned setting:
 
<context>
\setuptexttexts[{\placerawheaddata[section]}
</context>
 
What happens is that the information in the <cmd>\startsection[title=...,list=...]</cmd> command is passed to the texttexts, which are flushed at every page. In order to see when it is flushed you might place e.g. !!! in front of the <cmd>\placerawheaddata[section]</cmd>.
 
The result is a complete TOC without any trace of the section heading in the text.
 
'''Test:'''
 
<context>
\setuphead
[section]
[placehead=hidden,
page=yes]
 
\setuphead
[subsection]
[placehead=yes,
page=yes,
continue=yes,
style=\it]
 
\setuptexttexts[{\placerawheaddata[section]}]
 
\starttext
 
\placelist[section,subsection] \page
 
\startsection[title=First section]
 
\startsubsection[title=First subsection]
Lorem ipsum \dots
\stopsubsection
 
\startsubsection[title=second subsection]
Lorem ipsum \dots
\stopsubsection
 
\stopsection
 
\startsection[title=Second section]
 
\startsubsection[title=First subsection]
Lorem ipsum \dots
\stopsubsection
 
\stopsection
 
\stoptext
 
</context>
[[Category:Fonts]]
[[Category:Graphics]]
[[Category:Text elements]]
48

edits

Navigation menu