答案1
答案2
Sigur 的答案是正确的解决方案。它干净利落地完成了工作,但总是走捷径有什么乐趣呢?
这里有两种(有些更复杂)方法来实现相同的效果,但无需任何环境,可以轻松包含自动编号标签,甚至将其添加到目录中。这些原因可能比“为了好玩”更一致……其他原因可能是您需要几个类似描述的编号段落和/或具有可以在任何地方混合的不同样式。玩得开心。
\documentclass{scrartcl}
% page layout (optional)
\pagestyle{plain}\parskip.3em
% dummy example text
\def\dummytext{This is a long dummy sentence that mean
nothing and take only some more that one line. }
\begin{document}
\section{Kinky use of \texttt{\textbackslash paragraph}}
% ===== settings =====
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\makeatletter
\renewcommand*\l@paragraph{\@dottedtocline{4}{2em}{5em}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex\hangindent3em}{-1em}%
{\normalsize\sffamily\bfseries}}
\makeatother
\renewcommand\theparagraph{Chapter \arabic{paragraph}}
% ===== Check of TOC results ======
{\footnotesize
\renewcommand\contentsname{\hrulefill}
\tableofcontents\hrulefill
}
% ===== Use examples =======
\setcounter{paragraph}{1} % Omit Chapter 1
\paragraph{} \dummytext\par % Numbered label
\dummytext % Normal paragraph whitin the pseudo-list
\paragraph[\mbox{}]{} \dummytext % Numbered label in TOC
\paragraph*{Annex A} \dummytext\dummytext % Custom label
\paragraph[description]{The Last Chapter} % Custom numbered label in TOC
\dummytext\dummytext
\section{Autonumbered macro \texttt{\textbackslash chapdescr}}
% ===== definition =====
\newcounter{chapterdescr}\setcounter{chapterdescr}{1}
\def\chapdescr{%
\addtocounter{chapterdescr}{1}\par\noindent%
\hangindent3em\textbf{\sffamily Chapter \arabic{chapterdescr}}\hskip1em}
% ===== Use examples =======
\chapdescr \dummytext\par
There are no option here, nor special paragraph skips nor
entries in TOC. You can use also normal paragraphs
whitin the pseudo-description lists.
\chapdescr \dummytext\dummytext
\end{document}