题
此茎出的如何可以一个数的段落中乳胶?一>,这是我今天早些时候问:
与 Brent.Longborough 的对如何编号一个文档中的段落建议运行:
\setcounter{secnumdepth}{5}
...
\paragraph{If we want to}
\paragraph{do something}
这导致乳胶制造东西likeso:
0.0.0.1 If we want to
0.0.0.2 do something
一个如何改变的编号方案的 \段落{} 以产生这样的:
1. If we want to
2. do something
或可替换地
A. If we want to
B. do something
感谢您。
解决方案
要更改指段落时所引用的数量,你想改变\theparagraph
。下面是一个例子:
\documentclass[12pt]{article}
\setcounter{secnumdepth}{5}
\renewcommand\theparagraph{\roman{paragraph}}
\usepackage{lipsum}
\begin{document}
\paragraph{foo} \lipsum[1]
\paragraph{bar} \lipsum[2]
\end{document}
相反\roman
的你也可以用\Roman
,\arabic
,\alph
,\Alph
。但如果你有很多的段落,你会想使用alphalph包,并使用\ alphalph获得超过26款。
请注意\paragraph
需要一个参数为“段落标题”。如果你不想,你可能会想定义你自己的命令,把事情简单化:
\newcommand\PARA{\paragraph{}}
您也可能会想删除的段落编号为“内”部分的方式;即,它们从“1”复位为每一个新的部分。你可以解决这个问题的东西,如
\usepackage{remreset}
\makeatletter
\@removefromreset{paragraph}{section}
\makeatother
不隶属于 StackOverflow