抱歉,因为我觉得这是一个被问过很多次的话题。但我找不到一个可以帮助我理解如何在段落之间创建空白的示例。
我认为parskip
这是我需要使用的包但我不知道如何使用它。
我有这个 LaTeX 示例,想了解如何使用parskip
包。我做错了什么?
\documentclass{report}
\usepackage{parskip}
\begin{document}
\setlength{\parskip}{0pt} % 1ex plus 0.5ex minus 0.2ex}
\setlength{\parindent}{0pt}
\section{Section Headings}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.
\subsection{Headings in the `article' Document Style}
In the ``article'' style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
\parskip
Lorem ipsum `comillas simples' sit amet, consectetur adipiscing elit.
Fusce at augue nisi. Mauris vel metus velit. Nunc vitae augue justo, non euismod risus.
Nullam et bibendum nisl. Vestibulum nec leo lectus. Phasellus non dui et ipsum malesuada
venenatis vitae ut risus. Phasellus tincidunt erat sollicitudin leo auctor sed porta leo
commodo. Nullam et adipiscing libero. Ut et mi ac dui facilisis faucibus. Fusce eget magna
a quam volutpat accumsan. Duis dictum luctus ligula, at facilisis leo blandit sit amet.
Phasellus congue ornare lectus scelerisque malesuada. Praesent et cursus nulla. Quisque
aliquam felis ac nunc scelerisque a consectetur elit mattis.
\\
\end{document}
这个间距适用于整个文档吗?
答案1
只需加载parskip
打包,不要手动更改\parskip
和\parindent
长度。在文档正文中,不要使用\parskip
空格分隔段落。
顺便说一句,通常不需要\\
在文本中添加手动换行符()。
\documentclass{article}
\usepackage{parskip}
\begin{document}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.
In the ``article'' style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
\end{document}