\startcomponent ma-cb-en-heads

\product ma-cb-en

\chapter[headers]{Headers}

\index{headers}

\Command{\tex{chapter}}
\Command{\tex{paragraph}}
\Command{\tex{subparagraph}}
\Command{\tex{title}}
\Command{\tex{subject}}
\Command{\tex{subsubject}}
\Command{\tex{setuphead}}
\Command{\tex{setupheads}}

The structure of a document is determined by its headers.
Headers (heads) are created with the commands shown in
\in{table}[tab:headers]:

\placetable[here][tab:headers]{Headers.}
\starttable[|l|l|]
\HL
\NC \bf Numbered header   \NC \bf Un-numbered header   \NC\SR
\HL
\NC \type{\chapter}       \NC \type{\title}           \NC\FR
\NC \type{\section}       \NC \type{\subject}         \NC\MR
\NC \type{\subsection}    \NC \type{\subsubject}      \NC\MR
\NC \type{\subsubsection} \NC \type{\subsubsubject}   \NC\MR
\NC $\cdots$              \NC $\cdots$                \NC\LR
\HL
\stoptable

\shortsetup{chapter}
\shortsetup{section}
\shortsetup{subsection}
\shortsetup{title}
\shortsetup{subject}
\shortsetup{subsubject}

These commands will produce a header in a
predefined fontsize and fonttype with some vertical
spacing before and after the header.

The heading commands can take several arguments, like in:

\starttyping
\title[hasselt-by-night]{Hasselt by night}
\stoptyping

and

\starttyping
\title{Hasselt by night}
\stoptyping

The bracket pair is optional and used for internal
references. If you want to refer to this header you type for
example \type{\at{page}[hasselt-by-night]}.

Of course these headers can be set to your own preferences
and you can even define your own headers. This is done by
the command \type{\setuphead} and \type{\definehead}.

\shortsetup{definehead}

\shortsetup{setuphead}

\startbuffer
\definehead
  [myheader]
  [section]

\setuphead
  [myheader]
  [numberstyle=bold,
   textstyle=bold,
   before=\hairline\blank,
   after=\nowhitespace\hairline]

\myheader[myhead]{Hasselt makes headlines}
\stopbuffer

\typebuffer

A new header \type{\myheader} is defined and it inherits the
properties of \type{\section}. It would look something
like this:

\getbuffer

There is one other command you should know now, and that is
\type{\setupheads}. You can use this command to set up the
numbering of the numbered headers. If you type:

\startbuffer
\setupheads
  [alternative=inmargin,
   separator=--]
\stopbuffer

\typebuffer

all numbers will appear in the margin. Section 1.1 would
look like 1--1.

Commands like \type{\setupheads} are typed in the
set up area of your input file.

\shortsetup{setupheads}

\stopcomponent
