Re: [NTG-context] Feature Request: ToC page number alternative
Am 26.02.2014 um 20:31 schrieb Thangalin : > Hi, > > The predefined alternative list setups (e.g., a, b, c...) provide > various ways to format the ToC with the page number to the right of > the list entry title. An alternative with the page number to the left > of the list entry title would be useful. > > \unprotect > > \define[3]\SectionToCEntry{% > \hbox \strc_lists_get_reference_attribute\v!all{% >\par \leftaligned\bgroup > \hbox to 2em{#3}% >\hskip 1em >\vtop{\hsize\dimexpr\textwidth-3em\relax#2} >\egroup \par% > } > } > > \protect > > > \setuplist[section][ > alternative=command, > command=\SectionToCEntry, > ] When you want a interactive list entry replace “alternative=command” with “alternative=interactive”. \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] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Feature Request: ToC page number alternative
Hi, The predefined alternative list setups (e.g., a, b, c...) provide various ways to format the ToC with the page number to the right of the list entry title. An alternative with the page number to the left of the list entry title would be useful. For example: \setupinteraction[state=start,] \setupcombinedlist[content][interaction=all,] \unprotect \define[3]\SectionToCEntry{% \hbox \strc_lists_get_reference_attribute\v!all{% \par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par% } } \protect \setuplist[section][ alternative=command, command=\SectionToCEntry, ] \starttext \placecontent \dorecurse{4}{ \chapter[title={Chapter}] \page \section[title={Section A}] \dorecurse{5}{\input knuth} \section[title={Section B}] \dorecurse{5}{\input ward} } \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___