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 intabular
, some math-environment likealign
, 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
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
Code