Changes

Jump to navigation Jump to search
cleanup
<!-- please remove this and the following line if you have checked this page -->
{{Reference_Cleanup}}
{{Reference
|name=definecombinedlist
== Description ==
The command <pre> [[cmd:placecontent|\placecontent</pre> ]] is available after definition with [[cmd:definecombinedlist|\definecombinedlist]].
[[cmd:definecombinedlist]] commandsThis command and [[cmd:definelist|\definelist]] allows you to define your own lists necessary for structuring your documents.
The use of this command and its related commands is illustrated for the table of contents.
<texcode> \definelist[chapter] \setuplist [chapter] [before=\blank, after=\blank, style=bold] \definelist[section] \setuplist [section] [alternative=d]
</texcode>
Now there are two lists of chapters and sections and these will be combined in a table of contents with the command <pre>[[cmd:definecombinedlist</pre>|\definecombinedlist]].
<texcode>
\definecombinedlist [contents] [chapter,section] [level=subsection]
</texcode>
Now two commands are available: <pre>[[cmd:placecontent</pre> |\placecontent]] and <pre>[[cmd:completecontent|\completecontent</pre>]]. With the second command the title of the table of contents will be added to the table of contents itself.
The layout of lists can be varied with the parameter alternative:
* f = reserved for interactive purposes
Lists are set up with: [[cmd:setuplist|\setuplist]] and [[cmd:setupcombinedlist|\setupcombinedlist]].
If you want to change the layout of the generated table of contents you’ll have to remember that it is a list.
<texcode>
\setupcombinedlist [content] [alternative=c, aligntitle=no, width=2.5cm]
</texcode>
This will result in a somewhat different layout than the default one.
Lists are called up and placed with:  [[cmd:placelist|\placelist]].
So if you want a table of content you type:
<texcode>
\placecontent[level=section] \completecontent[level=section]
</texcode>
A long list or a long table of contents will use up more than one page. To be able to force page breaking you can type:
<pretexcode>\completecontent[2.2,8.5,12.3.3]</pretexcode>
A page break will occur after section 2.2 and 8.5 and sub section 12.3.3.
In some cases you want to be able to write your own text in an automatically generated list. This is done with [[cmd:writetolist|\writetolist]] and [[cmd:writebetweenlist|\writebetweenlist]]
For example if you want to make a remark in your table of contents after a section titled Hotels in Hasselt you can type:
<texcode>
\section{Hotels in Hasselt} \writebetweenlist[section]{\blank}
</texcode>

Navigation menu