[Tex/LaTex] LaTeX spacing in carriage return

paragraphsspacing

I'm writing a document in LaTeX, using the package setspace with the onehalfspacing setting.

I'm satisfied with the space between two lines of text, but I can't find a way to start a new paragraph leaving only one blank line: if I leave a blank line in the code, the output starts a new paragraph without leaving a vertical space between the two lines of text; if I use \\ and then leave an empty line in the code, the resulting output presents itself with too much space between the lines of text. Unfortunately, answers to similar questions posted here didn't solve my problem.

Summarising, I want to know how I can leave just an empty line in the pdf output when I start a new paragraph. Can anyone help me?

Edit: I found useful for my purpose this page Lengths and when to use them, posted by Runar Trollet in the accepted answer. This solved my problem.
In order to start a new paragraph it's enough to leave a blank line in the code. This will result in output as a carriage return with the new line indented and no vertical space between lines – to be precise, no more than the normal space between them. If you want to leave some space between the end of a paragraph and the start of a new one, just use the commands \smallskip, \medskip or \bigskip before leaving the empty line in the code.

Best Answer

About paragraphs and line endings

As pointed out by David Carlisle, you should not end paragraphs with \\, and I would argue that you should never use it in plain text at all. Use it in tabular, some math-environment like align, but not in text.

When you a leave one or more lines blank, LaTeX will insert the macro \par, which creates a paragraph, with the predefined space.

Pressing return only once will only give you a single space. See example below

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet ante a turpis pulvinar, quis pharetra lorem finibus. 
Sed iaculis ritus sed molestie elementum. Duis porta maximus velit quis imperdiet. Sed nec lacis vitae nisl rutrum accumsan. 

Nam molestie purus hendrerit ex tempus volutpat. %Only here will there be a new paragraph

Extra space

If you want some extra space between some paragraphs for some reason, you could use some of the predefined skips, like \smallskip, \medskip, \bigskip, or create your own length or macro, like in the below example.

For more information about some lengths, see Lengths and when to use them

To change the default values, you can have a look at Is there an easy way to have my whole document with a space between paragraphs rather than indentation?

Output

enter image description here

Code

\documentclass{article}

\newlength{\myExstraParSkip}
\setlength{\myExstraParSkip}{12pt}

\newcommand*{\mySkip}{%
  \vspace{\myExstraParSkip}%
}
\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet ante a turpis pulvinar, quis pharetra lorem finibus.

Sed iaculis ritus sed molestie elementum. Duis porta maximus velit quis imperdiet. Sed nec lacis vitae nisl rutrum accumsan.

\smallskip Nam molestie purus hendrerit ex tempus volutpat. Donec luctus, nulla nec molestie eleifend, lectus sapien rhoncus nisl, id maximus diam ex sed metus. Present volutpat eu mi in vehicula.

\medskip In lobortis vitae magna at finibus.

\bigskip Phasellus tempor urna eros, consequat blandit sem rhoncus a. Aliquam erat volutpat.

\mySkip Aliquam venenatis maximus felis, vel feugiat mauris tincidunt mattis.

\vspace{\baselineskip}Maecenas accumsan metus nec tortor tempor maximus.

\end{document}
Related Question