Changes

Jump to navigation Jump to search
m
default TOC settings
</cd:command>
</cd:variants>
<cd:description>Insert something in that is not a list element in the middle of a list. Most often a command such as {{cmd|hrule}}, or a header.  The default table of contents is combined list. To write to it one has to choose the level to which it should be inserted: <tt>\writebetweenlist[chapter][location=here]{\hrule}</tt>, <tt>\writebetweenlist[section][location=here]{\hrule}</tt>, etc.
</cd:description>
<cd:examples><cd:example title=""><context source="yes">
* sometimes direct flushing is needed, sometimes delayed
An option has been added to (1) the flushers and (2) the list placers. (as december 14, 2010).
Regular list entries are bound to a specific location in order to
pushes commands into the right order, and <code>all</code> orders all
entries (which might be too much). In this case no specific
location is needed with the inbetween method.
The following example shows this:
\starttext
\subject{normal}
(Ordering all entries, whether created with \tex{writetolist} or \tex{writebetweenlist})
\placelist[testlist]
\subject{command}
(Ordering the \tex{writebetweenlist} items, retaining the order of the entries)
\placelist[testlist][order=command]
\subject{all}
(Placing all entries in order of appearance)
\placelist[testlist][order=all]
% --- and now we put write the entries to the list ---
\writetolist [testlist] {1}
{1/3 -- 1/6 -- (location=here)}
\writebetweenlist[testlist]{
\framed[width=\hsize, frame=off,
background=color, backgroundcolor=red,
align=flushleft]
{\blackrule[width=2.5em, height=0em]
1/3 -- 2/6 -- (location=...)}}
\writebetweenlist[testlist][location=here]{
\framed[width=\hsize, frame=off,
background=color, backgroundcolor=cyan,
align=flushleft]
{\blackrule[width=2.5em, height=0em]
2/3 -- 3/6 -- location=here}}
\writetolist [testlist] {2}
{2/3 -- 4/6 -- (location=here)}
\writetolist [testlist][location=none]{W}
{3/3 -- 5/6 -- location=none}
\writebetweenlist[testlist]{
\framed[width=\hsize, frame=off,
background=color, backgroundcolor=yellow,
align=flushleft]
{\blackrule[width=2.5em, height=0em]
3/3 -- 6/6 -- (location=...)}}
138

edits

Navigation menu