Changes

Jump to navigation Jump to search
1,030 bytes added ,  07:35, 4 September 2020
Added MkIV solution for "Author in ToC"
== Explicitly excluding headings from the ToC ==
To exclude headings from the table of contents, create a new heading that is a copy of the current heading. The new heading will not be in the list of heading that are printed to the table of contents(see previous section). The command to create a copy of a heading is \{{cmd|definehead}}. Below is an example of excluding some subheadings from the table of contents. Note that typically this would be done for all subsections under a specific section, but as seen below this is not required:
<context source="yes">
<texcode>
\placecontent[extras={6=page}] %puts break before Chapter 6 list item
</texcode>
Solution (MkIV solution given by Hans on the mailing list on September 2010-09-29, 2010, and applies to MKIV (at least.).
== Dots in section numbers ==
If you want to avoid a dot if there's no number, try this solution (by Wolfgang Schuster as of 2008-04-29):
 
<texcode>
\setuplist
== Author in ToC ==
(updated in 2020-09)
 
Add your author or other metadata to your section title in another brackets:
 
<texcode>
\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to say}]
...
\stopsection
</texcode>
 
Now you can refer to this data as {{cmd|structureuservariable|2={subtitle}}} in text and headings, and as {{cmd|structurelistuservariable|2={author}}} in a list setup:
 
<texcode>
\define[1]\SectionTocEntry{%
\structurelistuservariable{author}\crlf%
#1\crlf% title
\structurelistuservariable{subtitle}}%
}
 
\setuplist[section][
textcommand=\SectionTocEntry,
]
</texcode>
 
You’ll probably have sections that don’t use that information, and you don’t want empty lines, do you? Then check on {{cmd| rawstructurelistuservariable}}:
 
<texcode>
\define[1]\SectionTocEntry{%
\doifnot{\rawstructurelistuservariable{author}}{}{\structurelistuservariable{author}\crlf}%
#1% title
\doifnot{\rawstructurelistuservariable{subtitle}}{}{\crlf\structurelistuservariable{subtitle}}}
</texcode>
 
=== MkII ===
 
see setup for author/title/subtitle titling and author in ToC in [[Proceedings_style]].
== Several ToC's in different languages ==
 
If you want to have two tables of contents in your document, one in a native
language and the other, for example, in english. This is how to do it:

Navigation menu