如何使段落和小段落不成为内联标题

如何使段落和小段落不成为内联标题

我使用 KOMA-Script 和“esdd”答案中的代码示例

如何创建 subsubparagraph 和 subsubsubparagraph?

如何使段落和小段落不成为内联标题?

答案1

afterskip 的负值设置水平跳过,从而产生内联标题。如果paragraphsubparagraph不应该是内联标题,则将其 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}

相关内容