152

I have two sections which I'd like to separate by an empty line. Every time I press Enter, LyX removes that empty line between paragraphs. How do I prevent this?

0

5 Answers 5

168

This is LyX's way of staying true to LaTeX where successive blank lines are merged - a good thing when you're talking about consistent document layout/design. If you wish to insert a forced vertical skip, insert an ERT containing either \smallskip, \medskip, \bigskip or a fixed \vspace{<len>} where you specify <len>. For a fixed/hard, single blank line, use \vspace{\baselineskip} (roughly the same as \bigskip).

enter image description here

enter image description here

The other lengths that were mentioned are "softer" and allow for some stretch/shrink.

For consistency, you can also increase the skip between paragraphs (known as \parskip) under Document > Settings... > Text Layout > Separate paragraphs with > Vertical space:

enter image description here

3
  • When shoul I use \newline instead?
    – skan
    Apr 21, 2017 at 10:23
  • That \vspace{} seems really useful. :-ThumbUp
    – AHB
    Jun 12, 2017 at 15:36
  • How about using \newline as @skan asked?
    – zyy
    May 27, 2020 at 2:38
39

You can use bigbreak:

alfa bravo
\bigbreak
charlie delta

Background (from @egreg answer in a more general question)

\bigbreak isn't listed in the LaTeX manual. It removes a preceding vertical space if it's less than what it would insert; it also terminates a paragraph and tells TeX that it marks a good point where a page break may happen.

1
  • 1
    note \bigbreak encourages a pagebreak. Just good to know when it's undesired. \bigskip would be similar but without the potential pagebreak effect.
    – tkruse
    Aug 25, 2020 at 13:31
20

If you want a finer control over your layout you can use \vskip.

Some text
\vskip 0.2in
Some text

You can change the value and units should you desire.

Anothing thing you can do is create a custom command:

\newcommand{\newpara}
    {
    \vskip 1cm
    }

So now you can just type \newpara in much the same way as \newline:

Some text
\newpara
Some text

Not sure how this functions in LyX but since it uses the LaTeX language it should work

2
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. May 5, 2016 at 10:56
  • I like this flexibility,...which made me try \hskip 0.2in and that worked just as well, FYI. Thanks!
    – d84_n1nj4
    Dec 18, 2019 at 1:05
12

No need to use extra code other than double backslash. After ending a paragraph, give \\ and put an empty line there. Combinedly it will work for putting an extra blank line.

Like:

I am a LaTeX user.\\

I am a LaTeX user.

Check this. It will give an extra empty line between the two lines.

And if you want to use any other size of spacing, you can use \\[]. For example: \\[2in]

This will put an extra 2-inch space between the two lines.

7
  • 14
    Welcome to TeX.SX! I'm afraid this isn't a good way of doing things. You should never end a paragraph with \\, see e.g. Best choice between using \\ or leaving space after each paragraph to end the paragraph and [When to use \par and when \\ ](tex.stackexchange.com/q/82664) Jan 12, 2016 at 20:52
  • 1
    Hi, thanks for your answer But as I faced, putting only a blank space doesn't help in putting an extra blank line between the paragraph. Even using \par does not either. So what should be used for putting a blank line between two paragraph, without front indent? Jan 15, 2016 at 23:09
  • 5
    For LyX, see the above answer. For LaTeX, add \usepackage{parskip} to the preamble. Jan 15, 2016 at 23:56
  • 2
    @TorbjørnT. I am new to LaTeX but I think one of its main problem is the lack of a true command for paragraphs spacind.\parskip does awfull things to section spacing, and table of contents !! Apr 29, 2016 at 16:37
  • 2
    @JohnMarjan Ehm, OK. I've never had that problem, as I hardly ever have the need to change the parskip. And I'm just a user, so complaining to me is sort of pointless to be honest. (Also, I didn't say anything about modifying \parskip (with \setlength), I said add \usepackage{parskip}.That doesn't modify the ToC at least. Note that some document classes (KOMA classes and memoir at least, I think) have their own interfaces for this sort of thing.) Apr 29, 2016 at 17:06
0

I had been having the same problem over and over again and also discovered from this post that \bigbreak worked and then I included a \noindent to create nicely formatted paragraphs, rather than using \begin{sloppypar} and \end{sloppypar} which was pointless. Thanks @Steven Penny!

1
  • Welcome to TSE. This should be a comment, not an answer. Nov 26, 2021 at 23:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .