\chapter{Formatting Paragraphs} % (fold)
\label{sec:formatting-paragraphs}

\section*{Ragged alignment}
\label{sec:ragged-alignment}
By default, \LaTeX{} sets continuous text in full justification. 
However, we can also switch to ragged alignment by using the commands 
\mintinline{tex}|\raggedright|, \mintinline{tex}|\raggedleft|, and 
\mintinline{tex}|\centering|. 
These commands influence the environment that they are used in, e.\,g., the 
\texttt{document} environment. Correspondingly, the text within the whole 
document is affected. 
Alternatively, we can use dedicated environments in order to influence the 
formatting
of certain paragraphs (\cref{lst:ragged-alignment}).

\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged 
alignment}

\section*{Indentation and spacing}
\label{sec:indents-and-parskips}
Usually, we illustrate a new paragraph by indenting the first line of it 
(\mintinline{tex}{\parindent}). 
Alternatively, paragraph spacing, i.\,e., vertical space between paragraphs, 
can be used (\mintinline{tex}{\parskip}).
For both variants, there are adjustable parameters:
\begin{minted}{tex}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
    plus .5em   % admissible stretch
    minus .5em  % admissible shrink
}
\end{minted}

\noindent We can use \mintinline{tex}{\noindent} to turn off the indentation for only one 
paragraph. 
For the first paragraph after a heading, there is usually no indentation. 

