我正在处理一个 tex 文件来构建个人模板。就标题而言,我将增加标题行之间的间距。因此,只需尝试使用setspace
包和doublespacing
环境,如下所示:
\documentclass[•]{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{setspace}
\usepackage
[
a4paper,% other options: a3paper, a5paper, etc
left=2cm,
right=2cm,
top=3cm,
bottom=4cm,
vmargin=2cm,
% use vmargin=2cm to make vertical margins equal to 2cm.
% us hmargin=3cm to make horizontal margins equal to 3cm.
% use margin=3cm to make all margins equal to 3cm.
]
{geometry}
\begin{document}
\begin{center}
\begin{doublespacing}
\textbf{\Huge{the title of the template, is which supposed to include a long succession of characters and be splitted into different lines.}}
\end{doublespacing}
\end{center}
\end{document}
但,预想的结果并没有出现,空间依旧如旧……
将这种环境应用到粗体和大段文本上有什么问题?...
答案1
你不需要setspace
这个。
\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage[
a4paper,% other options: a3paper, a5paper, etc
left=2cm,
right=2cm,
top=3cm,
bottom=4cm,
%vmargin=2cm, %% What for? You already set top and bottom
]{geometry}
\begin{document}
\begin{center}
\linespread{1.5}\Huge\bfseries
The title of the template, is which supposed to
include a long succession of characters and be
split into different lines.
\end{center}
\end{document}
自行决定要传递的值\linespread
。
我没有展示结果,因为它太糟糕了。
你的错误是什么?首先,环境被调用doublespace
。其次,标题是\Huge
双倍行距,但是,由于在段落分成行之前结束了 的效果,\doublespacing
因此使用正常的基线跳过(但由于 而加倍)。
注意:\Huge
其他大小声明不是带有参数的命令,并且段落必须在声明的范围内结束。因此
\begin{doublespace}
\centering
\bfseries\Huge
The long title
\end{doublespace}
可以完成这项工作。但这就像用枪来打蚊子一样。
答案2
删除所有括号并使用正确的环境名称:
\documentclass[•]{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{setspace}
\usepackage
[
a4paper,% other options: a3paper, a5paper, etc
left=2cm,
right=2cm,
top=3cm,
bottom=4cm,
vmargin=2cm,
% use vmargin=2cm to make vertical margins equal to 2cm.
% us hmargin=3cm to make horizontal margins equal to 3cm.
% use margin=3cm to make all margins equal to 3cm.
]
{geometry}
\begin{document}
\begin{doublespace}
\centering
\bfseries\Huge the title of the template, is which supposed to include a long succession of characters and be split into different lines.
\end{doublespace}
\end{document}