Command/setuplistalternative
< Command
Jump to navigation
Jump to search
Contents
\setuplistalternative
Summary
The command \setuplistalternative is used to set up options for the
alternative
key in \setuplist
Settings
\setuplistalternative[...,...][...=...,...] | |
[...,...] | name |
before | command |
after | command |
command | threearguments |
renderingsetup | name |
width | dimension |
distance | dimension |
stretch | dimension |
filler | command |
Option | Explanation | ||
---|---|---|---|
renderingsetup |
|
Description
The renderingsetup in variant default points to a custom defined setup name.
This setup is executed once per list entry. Within this setup the following control sequences are defined to print the list contents or react to particular events.
\currentlistentrylocation | the location number is a sequential number for the list entry |
\namedstructureheadlocation{structureelementtype} | location number of the current active chapter/section/other structure element. |
\currentlistentrynumber | location number of the current list entry |
\currentlistentrytitle | the argument of the title key of the structure element corresponding to the current list entry
|
\currentlistentrypagenumber | the page number of the structure element corresponding to the current list entry |
Examples
Example 1
The following example prints a table of contents on every page and highlights the current chapter name.
\setupfootertexts [\setups{footlist}] \startsetups [footlist] \framed[align=normal, frame=off] {\placelist [chapter] [alternative=footlist, criterium=all]} \stopsetups \definelistalternative [footlist] [renderingsetup=list:footlist] \startsetups [list:footlist] \starttabulate \NC location \EQ \currentlistentrylocation \NC\NC\NR \NC headlocation\{chapter\} \EQ \namedstructureheadlocation{chapter} \NC\NC\NR \NC entrynumber \EQ \currentlistentrynumber \NC\NC\NR \NC title \EQ \currentlistentrytitle \NC \doifelse\currentlistentrylocation{\namedstructureheadlocation{chapter}} {% {\bfb\currentlistentrytitle}} { \currentlistentrytitle}\NC\NR \NC page \EQ \currentlistentrypagenumber \NC\NC\NR \HL \stoptabulate \stopsetups \starttext \startchapter [title=alpha] \stopchapter \startchapter [title=beta] \stopchapter \startchapter [title=gamma] \stopchapter \stoptext
This is the resulting table from the second page, i.e. in chapter Beta:
Notes
See also
- \definelistalternative
- strc-lst.mkvi for predefined examples, search for \definelistalternative
- \setuplist
- \setupcombinedlist