我使用以下代码来添加额外级别的部分:
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{2.25ex \@plus .25ex}%
{\normalfont\normalsize\textit}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4} % how many sectioning levels to show in ToC
如何删除图中指定的空间?
答案1
\textit
接受一个参数,但在本例中该参数使用不当。您需要使用字体开关 - \itshape
:
\documentclass{article}
\makeatletter
\newcommand\subsubsubsection{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{2.25ex \@plus .25ex}%
{\normalfont\normalsize\itshape}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4} % how many sectioning levels to show in ToC
\begin{document}
\setcounter{section}{7}
\section{A section}
\subsection{A sub-section}
\subsubsection{A sub-sub-section}
\subsubsubsection{A sub-sub-sub-section}
\end{document}
有关中参数的信息\@startsection
,请参阅在哪里可以找到类似\@startsection
LaTeX 的命令的帮助文件或文档?