如果您能帮助我解决以下问题,我将非常高兴:我试图将“\section{}”文本中的间距从 1.5 减小到 1.25,该文本跨越两行。我无法在线或自己找到合适的解决方案。(不幸的是,\begin{spacing}{1,25} \section{这是跨越两行的文本。} \end{spacing} 不起作用,因为它还会减小 \section{} 前后的距离。)
\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\setstretch{1,5}
\begin{document}
\section{Here is the text that spans two lines and that is supposed to have 1,25 spacing.}
\end{document}
先感谢您!
答案1
您可以使用sectsty
:
\documentclass[12pt, a4paper]{article}
\usepackage{setspace}
\usepackage{sectsty}
\sectionfont{\linespread{1.25}\selectfont}
\setstretch{2.5}
\begin{document}
\section{Here is the text that spans two lines and that is supposed to have 1,25 spacing.}
Here is text that's spaced 2.5, which is \emph{really} too much.
Here is text that's spaced 2.5, which is \emph{really} too much.
Here is text that's spaced 2.5, which is \emph{really} too much.
Here is text that's spaced 2.5, which is \emph{really} too much,
but 1.5 is too much either.
\end{document}
我使用 2.5 来强调差异并表明普通文本使用了指定的拉伸。