1

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.

marked as duplicate by David Carlisle spacing Sep 12 '16 at 12:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    never end a paragraph with \\ (it doesn't work) always leave a blank line, the spacing between paragraphs is set using the \parskip length (or use the parskip package to set it for you) – David Carlisle Sep 12 '16 at 11:22
  • Leaving a blank line in tge code starts a new paragraph in the output but there doesn't leave an empty line. I read here that the \parskip package creates some problem: how can I use it in order to reach my goal without causing problems? – M-elman Sep 12 '16 at 11:28
  • reading somewhere on the internet that doing the right thing "creates a problem" does not mean that that is not the right answer. If you have \parskip set and have a problem in some cases, make an example of that problem and ask about that. – David Carlisle Sep 12 '16 at 12:23
  • I read on this forum that doing it creates some problems (tex.stackexchange.com/questions/133003/…), therefore I asked how to use it and how to make it work if it actually causes problems. – M-elman Sep 12 '16 at 13:07
  • @DavidCarlisle Anyway, rather than the question you indicated me to be a duplicate of my own, I found useful "Lengths and when to use them" posted by RunarTrollet in his answer. So I proceed to edit my question to include the link to that page. – M-elman Sep 12 '16 at 13:18
1

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}

Not the answer you're looking for? Browse other questions tagged or ask your own question.