Difference between revisions of "Titles"
(→Table(s) of Contents: : improved the "not in toc" part) |
(added setupheadtext to custom chapter example) |
||
Line 37: | Line 37: | ||
% \vbox is needed for \blank to work | % \vbox is needed for \blank to work | ||
\setuphead[chapter][command=\MyChapterCommand, style={\ss\bfa}] | \setuphead[chapter][command=\MyChapterCommand, style={\ss\bfa}] | ||
+ | \setupheadtext[chapter=Chapter] | ||
</texcode> | </texcode> | ||
so <tt>\chapter{My First Chapter}</tt> looks like: | so <tt>\chapter{My First Chapter}</tt> looks like: | ||
Line 42: | Line 43: | ||
\def\MyChapterCommand#1#2{\framed[frame=off, bottomframe=on, topframe=on]{\vbox{#1\blank#2}}} | \def\MyChapterCommand#1#2{\framed[frame=off, bottomframe=on, topframe=on]{\vbox{#1\blank#2}}} | ||
\setuphead[chapter][command=\MyChapterCommand, style={\ss\bfa}] | \setuphead[chapter][command=\MyChapterCommand, style={\ss\bfa}] | ||
+ | \setupheadtext[chapter=Chapter] | ||
\chapter{My First Chapter} | \chapter{My First Chapter} |
Revision as of 08:37, 30 June 2005
< Structurals | Visuals >
Default
numbered | unnumbered |
---|---|
\part | -- |
\chapter | \title |
\section | \subject |
\subsection | \subsubject |
\subsubsection | \subsubsubject |
... | ... |
Every heading command can take an optional parameter as reference:
\title[hasselt-by-night]{Hasselt by night}
The bracket pair is optional and used for internal References. If you want to refer to this header you type for example
\at{page}[hasselt-by-night].
(see \at)
Of course you can switch off numbering even for a "numbered" title, see \setuphead.
Your own title styles
Sometimes the possibilities of \setuphead aren't enough. Just define your own styling command like this:
\def\MyChapterCommand#1#2{\framed[frame=off, bottomframe=on, topframe=on]{\vbox{#1\blank#2}}} % #1 is number, #2 is text % \vbox is needed for \blank to work \setuphead[chapter][command=\MyChapterCommand, style={\ss\bfa}] \setupheadtext[chapter=Chapter]
so \chapter{My First Chapter} looks like:
Your own titling levels
Of course you can define your own titling commands and probably must adapt the default settings.
\definehead[myheader][section] \setuphead[myheader] [numberstyle=bold, textstyle=cap, before=\hairline\blank, after=\nowhitespace\hairline] \myheader[hasselt-ref]{Hasselt makes headlines}
A new header \myheader is defined and it inherits the properties of section (title, subject, whatever). You can "define" several headers at once!
Table(s) of Contents
Default:
\completecontent % with title \placecontent % without title
Define your own tables of somewhat with \definelist and \setuplist!
To have some parts of your title texts not appear in the table of contents, use \nolist and have a look at http://www.pragma-ade.com/general/magazines/mag-0001.pdf.