帶有 KOMA 的內嵌小節標題

帶有 KOMA 的內嵌小節標題

我想要內嵌小節標題,如下面的範例所示。使用 titlesec 套件很容易實現它們,但根據這個線程,KOMA 和 titlesec 之間存在不相容性。

是否有一個不使用 titlesec 並且與 KOMA 類別完全相容的解決方案?

微量元素:

\documentclass{scrbook}

\usepackage{blindtext}
\usepackage{titlesec}
\titleformat{\subsubsection}[runin]{\bfseries}{}{}{}[.]

\begin{document}
\chapter{A chapter heading}
\section{A section heading}
\subsection{A subsection heading}
\blindtext
\subsubsection{Inline subsubsection heading}
\blindtext
\subsubsection{Another inline subsubsection heading}
\blindtext
\end{document}

和截圖:

螢幕截圖

答案1

使用最新版本的 KOMA-script,您可以聲明

\RedeclareSectionCommand[afterskip=-.5em]{subsubsection}

微量元素:

\documentclass{scrbook}

\usepackage{blindtext}

\RedeclareSectionCommand[afterskip=-.5em]{subsubsection}

\begin{document}

\chapter{A chapter heading}
\section{A section heading}
\subsection{A subsection heading}
\blindtext
\subsubsection{Inline subsubsection heading.}
\blindtext
\subsubsection{Another inline subsubsection heading.}
\blindtext
\end{document} 

輸出:

在此輸入影像描述

相關內容