2

In my LaTeX document, I'd like to have two paragraphs which are separated by some smaller vertical spacing.

When I use the following code, this works just as intended, automatically:

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\setlength{\parindent}{0cm}

\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\\

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\end{document}

enter image description here

But when I wrap these two paragraphs in \begin{flushleft} ... \end{flushleft} (which is what I'm trying to do), the result changes to the following, unforunately:

...

\begin{flushleft}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\\

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\end{flushleft}

...

enter image description here

Is there any way I can get the original style of paragraphs and spacing -- just with a ragged right side (instead of full justification)?

I have already seen that wrapping each paragraph in the environment separately helps. But is this really the only way to solve the problem? Having lots of paragraphs, I would prefer to set the justification once only, apparently.

caw
  • 318

1 Answers1

2

Don't use \\ for line spacings (they have application in places like tabular, but are not intended as a mechanism for line skip). If you want an inter-paragraph spacing, use \parskip and end the paragraph with a blank line or a \par.

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\setlength{\parindent}{0cm}
\setlength{\parskip}{\baselineskip}
\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\noindent\hrulefill

\begin{flushleft}
\setlength{\parskip}{\baselineskip}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{flushleft}

\end{document}

enter image description here