调整长标题的标题间距

调整长标题的标题间距

我想调整两行长度标题的标题边距。例如,如下所示。我该如何调整。感谢您的理解,我不知道该如何解释我的问题。

\titleformat{\chapter}{\normalfont\normalsize\bfseries}{\thechapter.}{1em}{}
\titleformat{\section}{\normalfont\normalsize\bfseries}{\thesection.}{1em}{}
\titleformat{\subsection}{\normalfont\normalsize\bfseries}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\thesubsubsection.}{1em}{}
\titlelabel{\thetitle.\quad}

我想要的是

答案1

我不知道如何使用titlesec软件包的机制实现所需的输出。这是一个使用该sectsty软件包的解决方案。

在此处输入图片描述

\documentclass{article} % or some other suitable document class
\usepackage{newtxtext} % optional (Times Roman clone text font)

\usepackage{sectsty}
\allsectionsfont{\normalfont\normalsize\bfseries\nohang\noindent}
% See https://tex.stackexchange.com/a/24444/5001:
\makeatletter 
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad}
\makeatother

\begin{document}
\setcounter{section}{2}
\setcounter{subsection}{3}
\stepcounter{subsubsection}
\subsubsection{Outage probability for cooperative transmission using DF method under co-channel interference effect}
\end{document}

答案2

大概是这样的——

\documentclass{article}
\usepackage[explicit]{titlesec}
\usepackage{lipsum}
\titleformat{\subsubsection}[block]{\normalfont\normalsize\bfseries\parbox{\textwidth}}{\thesubsubsection.}{1em}{#1}[]
\begin{document}
\setcounter{section}{2}\setcounter{subsection}{3}\setcounter{subsubsection}{1}
\subsubsection{Outage probability for cooperative transmission using DF method under co-channel interference effect}
\lipsum[1]
\end{document}

在此处输入图片描述

显然并不完美,但也许是一个开始。

答案3

您想要的是block格式。

\documentclass{book}
\usepackage{titlesec}
\usepackage{newtxtext}

\titleformat{\chapter}{\normalfont\normalsize\bfseries}{\thechapter.}{1em}{}
\titleformat{\section}[block]{\normalfont\normalsize\bfseries}{\thesection.}{1em}{}
\titleformat{\subsection}[block]{\normalfont\normalsize\bfseries}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}[block]{\normalfont\normalsize\bfseries}{\thesubsubsection.}{1em}{}
\titlelabel{\thetitle.\quad}

\setcounter{secnumdepth}{4}

\begin{document}

\chapter{Title}

\section{Outage probability for cooperative transmission using 
  DF method under co-channel interference effect}
\subsection{Outage probability for cooperative transmission using
  DF method under co-channel interference effect}
\subsubsection{Outage probability for cooperative transmission using
  DF method under co-channel interference effect}

\end{document}

在此处输入图片描述

相关内容