计数器
LaTeX中自动编号都借助于内部的计数器来完成,包括:
- 章节:part, chapter, section, subsection, subsubsection, paragraph, subparagraph
- 编号列表: enumi, enumii, enumiii, enumiv
- 公式和图表 equation, figure, table
- 其他 page, footnote, mpfootnote
用\the
接上计数器名称的方式来调用计数器,例如\thechapter
。
如果只是想输出计数器的数值,可以指定数值的形式,例如阿拉伯数字、大小写英文字母,或者大写罗马数字,
\arabic{counter-name}
\Alph \alph \Roman \roman
比如在附录,对章和节的编号进行来重定义。注意:章的计数器包含了节在内。以下的命令写在appendices
环境中(或者\appendix
命令后),因此对于此外的编号不产生影响,同理你也可以这样对列表编号进行局部重定义:
\renewcommand{\thechapter}{\Alph{chapter}}
\renewcommand{\thesection}{\thechapter-\arabic{section}}
\renewcommand{\thefootnote}{[\arabic{footnote}]}