+4 votes
103 views
in Office by (242k points)
reopened
LaTeX: Adjust line spacing - this is how it works

1 Answer

+5 votes
by (1.6m points)
 
Best answer

Include package
Options of the package
Commands
Environments

In LaTeX you can change the line spacing by including a package. We show how this works and what options there are..

image image

If you want to change the line spacing of your LaTeX document, this works without any problems with the "setspace" package. You can find out how to include this in your document and then adjust the line spacing in our tipps + tricks article.

Include package

You include the setspace package like any other package in the preamble using the command \usepackage{setspace} .

Options of the package

The setspace package has three options that can be set initially. Once set, the option is the default line spacing for the entire document. Single spacing is normal, single line spacing; onehalfspacing corresponds to 1.5 times the line spacing and doublespacing corresponds to double the spacing. Inserted the options look like this:

\usepackage[singlespacing]{setspace}
\usepackage[onehalfspacing]{setspace}
\usepackage[doublespacing]{setspace}

Commands

The package also includes the \singlespacing , \onehalfspacing and commands , \doublespacing which, like switches, change the line spacing of the following text. A minimal example looks like this:

\onehalfspacing
Das ist ein Beispieltext, der verdeutlicht, dass dieser Text einen anderthalbfachen Zeilenabstand hat.
\doublespacing
Mit diesem Schalter ändern Sie den Zeilenabstand auf einen doppelten Zeilenabstand.
\singlespacing
Und so geht es wieder zurück zu einem normalen, einfachen Zeilenabstand.

Environments

The commands can also be embedded in associated environments. To do this, simply use the command \begin{singlespace} and \end{singlespace} . The other environments are also initiated or closed in the same way..

\begin{singlespace} ... \end{singlespace}
\begin{onehalfspace} ... \end{onehalfspace}
\begin{doublespace} ... \end{doublespace}

Another command with a corresponding option is the environment spacing . Here you can set the required line spacing as a parameter. So choose this larger than twice.

\begin{spacing}{Parameter}
Text mit gewählten Zeilenabstand.
\end{spacing}

In summary, we have shown you the commands with the different options and environments in a picture. The code is on the left and the output in the document on the right ..

image

...