\
@seccntformat
command, which is given the “name” (section,
subsection, …) of the heading, as argument. Ordinarily,
\
@seccntformat
merely outputs the section number, and then a \
quad
of space:
Suppose you want to put a stop after every section (subsection, subsubsection, …) number, a trivial change may be implemented by simple modification of the command:\renewcommand*{\@seccntformat}[1]{% \csname the#1\endcsname\quad }
However, many people want to modify section numbers, but not subsection numbers, or any of the others. To do this, one must make\renewcommand*{\@seccntformat}[1]{% \csname the#1\endcsname.\quad }
\
@seccntformat
switch according to its argument. The following
technique for doing the job is slightly wasteful, but is efficient
enough for a relatively rare operation:
which uses a second-level command to provide the dot, if it has been defined; otherwise it merely appends\renewcommand*{\@seccntformat}[1]{% \csname the#1\endcsname \csname adddot@#1\endcsname\quad }
\
relax
(which does nothing
in this context). The definition of the second-level command (the
version for the section
, here) specifies what to put after a
section number, but it could be used to put anything after it:
Note that all the command definitions above are dealing in LaTeX internal commands, so the above code should be in a package file, for preference. The Koma-script classes have different commands for specifying changes to section number presentation:\newcommand*{\adddot@section}{.}
\
partformat
,
\
chapterformat
and \
othersectionlevelsformat
, but otherwise
their facilities are similar to those of “raw” LaTeX.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=seccntfmt