答案1
afterskip 的负值设置水平跳过,从而产生内联标题。如果paragraph
和subparagraph
不应该是内联标题,则将其 afterskip 更改为正值,例如:
设置afterskip
为正值:
\RedeclareSectionCommands[
afterskip=1.25ex plus .1ex
]{paragraph,subparagraph}
代码:
\documentclass[parskip=full]{scrartcl}[2016/05/10]
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\RedeclareSectionCommands[
afterskip=1.25ex plus .1ex
]{paragraph,subparagraph}
\DeclareNewSectionCommands[
style=section,
level=\subparagraphnumdepth+1,
beforeskip=-3.25ex plus -1ex minus -.2ex,
afterskip=1.25ex plus .1ex,
counterwithin=subparagraph,
font={},
indent=0pt,
toclevel=\subparagraphtocdepth+1,
tocnumwidth=6em
]{subsubparagraph,subsubsubparagraph}
\RedeclareSectionCommand[
tocindent=12em
]{subsubparagraph}
\RedeclareSectionCommand[
tocindent=14em
]{subsubsubparagraph}
\setcounter{secnumdepth}{\subsubsubparagraphnumdepth}
\setcounter{tocdepth}{\subsubsubparagraphtocdepth}
\begin{document}
\tableofcontents
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
Text
\paragraph{Paragraph}
Text
\subparagraph{Subparagraph}
Text
\subsubparagraph{Subsubparagraph}
Text
\subsubsubparagraph{Subsubsubparagraph}
Text
\end{document}