Difference between revisions of "Command/setuplist"
< Command
Jump to navigation
Jump to search
(more options explained) |
(explain location and label) |
||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
</cd:parameter> | </cd:parameter> | ||
<cd:parameter name="location"> | <cd:parameter name="location"> | ||
− | <cd:paramdoc></cd:paramdoc> | + | <cd:paramdoc>If you use {{cmd|writebetweenlist}}, "here" cares for using the current location (page number).</cd:paramdoc> |
<cd:constant type="none"></cd:constant> | <cd:constant type="none"></cd:constant> | ||
<cd:constant type="here"></cd:constant> | <cd:constant type="here"></cd:constant> | ||
Line 77: | Line 77: | ||
</cd:parameter> | </cd:parameter> | ||
<cd:parameter name="label"> | <cd:parameter name="label"> | ||
− | <cd:paramdoc></cd:paramdoc> | + | <cd:paramdoc>Use an automatical, language dependent label like “chapter” in front of the list entries (see {{cmd|setuplabeltext}}.</cd:paramdoc> |
− | <cd:constant type="yes"></cd:constant> | + | <cd:constant type="yes">use label</cd:constant> |
− | <cd:constant default="yes" type="no"></cd:constant> | + | <cd:constant default="yes" type="no">don’t use a label</cd:constant> |
<cd:constant type="none"></cd:constant> | <cd:constant type="none"></cd:constant> | ||
− | <cd:constant type="cd:name"></cd:constant> | + | <cd:constant type="cd:name">use your own named label</cd:constant> |
</cd:parameter> | </cd:parameter> | ||
<cd:parameter name="starter"> | <cd:parameter name="starter"> | ||
Line 143: | Line 143: | ||
</cd:parameter> | </cd:parameter> | ||
<cd:parameter name="aligntitle"> | <cd:parameter name="aligntitle"> | ||
− | <cd:paramdoc></cd:paramdoc> | + | <cd:paramdoc>should an unnumbered section will align in the table of contents under the number rather than the title?</cd:paramdoc> |
<cd:constant type="yes"></cd:constant> | <cd:constant type="yes"></cd:constant> | ||
<cd:constant default="yes" type="no"></cd:constant> | <cd:constant default="yes" type="no"></cd:constant> | ||
Line 392: | Line 392: | ||
<cd:commandref name="definecombinedlist"></cd:commandref> | <cd:commandref name="definecombinedlist"></cd:commandref> | ||
<cd:commandref name="definelistalternative"></cd:commandref> | <cd:commandref name="definelistalternative"></cd:commandref> | ||
− | <cd:wikipage page="Table of Contents"></cd:wikipage></cd:seealso> | + | <cd:wikipage page="Table of Contents"></cd:wikipage> |
+ | <cd:commandref name="writebetweenlist"></cd:commandref> | ||
+ | <cd:commandref name="writetolist"></cd:commandref></cd:seealso> | ||
</cd:commandgroup> | </cd:commandgroup> |
Latest revision as of 17:31, 24 April 2024
Contents
\setuplist
Summary
The command \setuplist configures collected lists like for the TOC
Settings
\setuplist[...,...][...=...,...] | |
[...,...] | list |
state | start stop |
location | none here |
type | simple command userdata |
criterium | local intro reference sectionblock:reference all sectionblock:all text sectionblock:text current sectionblock:current here previous sectionblock:previous component section sectionblock:section |
list | name |
width | fit broad dimension |
height | fit broad dimension |
depth | fit broad dimension |
symbol | one two three none default |
label | yes no none name |
starter | command |
stopper | command |
command | threearguments |
numbercommand | oneargument |
textcommand | oneargument |
pagecommand | oneargument |
pagenumber | yes no always realpage |
headnumber | yes no always |
before | command |
after | command |
inbetween | command |
margin | none dimension |
distance | none dimension |
aligntitle | yes no |
numberalign | left right middle flushleft flushright inner outer |
align | see \setupalign |
hang | yes no |
left | command |
right | command |
interaction | yes no all number text title page sectionnumber pagenumber |
limittext | yes no text |
style | style command |
color | color |
numberstyle | style command |
numbercolor | color |
textstyle | style command |
textcolor | color |
pagestyle | style command |
pagecolor | color |
reference | number |
extras | name |
order | command all title |
alternative | a b c d e f g left right top bottom command none interactive paragraph horizontal vertical name |
maxwidth | dimension |
pageprefix | yes no |
pageprefixseparatorset | name |
pageprefixconversionset | name |
pageprefixset | name |
pageprefixsegments | number number:number number:* number:all section section:section section:* section:all current |
pageprefixconnector | command processor->command |
pageconversionset | name |
pagestarter | command processor->command |
pagestopper | command processor->command |
...=...,... | inherits from \setupcounter |
...=...,... | inherits from \setupframed |
Option | Explanation | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location |
| ||||||||||||||||||||
criterium |
| ||||||||||||||||||||
list |
| ||||||||||||||||||||
width |
| ||||||||||||||||||||
label |
| ||||||||||||||||||||
starter |
| ||||||||||||||||||||
stopper |
| ||||||||||||||||||||
command |
| ||||||||||||||||||||
numbercommand |
| ||||||||||||||||||||
textcommand |
| ||||||||||||||||||||
pagecommand |
| ||||||||||||||||||||
pagenumber |
| ||||||||||||||||||||
headnumber |
| ||||||||||||||||||||
before |
| ||||||||||||||||||||
after |
| ||||||||||||||||||||
inbetween |
| ||||||||||||||||||||
margin |
| ||||||||||||||||||||
distance |
| ||||||||||||||||||||
aligntitle |
| ||||||||||||||||||||
numberalign |
| ||||||||||||||||||||
align |
| ||||||||||||||||||||
hang |
| ||||||||||||||||||||
left |
| ||||||||||||||||||||
right |
| ||||||||||||||||||||
interaction |
| ||||||||||||||||||||
style |
| ||||||||||||||||||||
color |
| ||||||||||||||||||||
numberstyle |
| ||||||||||||||||||||
numbercolor |
| ||||||||||||||||||||
textstyle |
| ||||||||||||||||||||
textcolor |
| ||||||||||||||||||||
pagestyle |
| ||||||||||||||||||||
pagecolor |
| ||||||||||||||||||||
extras |
| ||||||||||||||||||||
order |
| ||||||||||||||||||||
alternative |
| ||||||||||||||||||||
maxwidth |
| ||||||||||||||||||||
pageprefix |
| ||||||||||||||||||||
pagestarter |
| ||||||||||||||||||||
pagestopper |
|
Description
Examples
Unnumbered ToC items, with some shift
Sometimes we need to insert unnumbered items into the ToC, and to specify them horizontal shift to "keep the look" of the other (numbered) items. Here "margin" option comes into play:
\setuppapersize[A7,landscape] \setuplist[alternative=c] \setuphead[subsubsection][number=no] \setuplist[subsubsection][margin=20mm] \starttext \placecontent \hairline \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \stoptext
Use different alternatives for different levels in the same ToC
You can use different alternatives for different levels.
\setuppapersize[A7,landscape] \setuplist[alternative=c] \setuplist[subsection][alternative=d] \starttext \placecontent \hairline \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \stoptext
Left-hand page numbers
The following example positions the page number to the left of the list entry title:
\define[3]\SectionToCEntry{ \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2}% \egroup } \setuplist [section] [alternative=interactive, command=\SectionToCEntry, after=\endgraf]
The alternative=interactive
is required to maintain hyperlinked page numbers when links are enabled in the document. Without the after=\endgraf
items would be displayed on one line.
Using tabular numbers
In a long TOC it looks awkward if proportional numbers are used. It is better to enable the font feature tabularnumbers:
\setuplist [chapter] [pagestyle={\feature[+][tabularnumbers]}]