## LaTeX forum ⇒ LyX ⇒ Why can't you have empty lines when editing text in Lyx?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Cosm
Posts: 10
Joined: Thu Nov 07, 2013 12:53 pm

### Why can't you have empty lines when editing text in Lyx?

It's annoying that you can't enter empty lines when editing text in Lyx. I mean it's a text editor so you should be able to do it because composing a complicated text is a piecemeal process, inability to create empty spaces or lines makes you feel trapped. Why isn't there an option to allow empty lines even if they would be ignored in the output (or not ignored, it doesn't really matter to me which one)? I know you can for instance use Ctrl+Space but I just want normal empty spaces in the editor.

I don't see the justification for this, just saying that it's a WYSIWYM editor doesn't justify it, it only defines the problem. I'm almost starting to think I should start learning Latex because this annoys me so much. So what is the justification?

Johannes_B
Site Moderator
Posts: 3639
Joined: Thu Nov 01, 2012 4:08 pm
As a LaTeX user, not a LyX user, there is not much i can say.

I would say: Learn LaTeX.

By the way, knowing how LaTeX works is very recommended (indeed needed) to properly use LyX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8703
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi Cosm!

At first, as writing in LyX should represent the output, "ignored" empty input lines don't make much sense. They should be in the output too.

To have it in the input as well as in the output: you could insert ERT (TeX code) such as \vspace{some cm}. Or you could insert skips such as by inset-insert vspace medskip.

To have it in the input but not in the output: you could insert ERT and leave it empty or start with a percent sign % for commenting it out. The ERT inset should be set to be "Open", not collapsed.

Use shortcuts for repeating, or copy & paste. However, I would not put such additional insertions in a document, as it has to be cleaned up later. Feeling trapped is an argument, but also vertical space is precious on screens, that I would not waste. Maybe there's another way to separate things other than large white space, such as comment lines or big headings that can be removed later on.

Stefan

scottkosty
Site Moderator
Posts: 512
Joined: Sat Sep 01, 2012 6:38 am

Stefan Kottwitz
Posts: 8703
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
To quote the solution, scottkosty linked above:

"You can do what you want by adding the following to Document > Settings > Local Layout

Style Standard    Category              MainText    Margin                Static    LatexType             Paragraph    LatexName             dummy    ParIndent             MM    ParSkip               0.4    Align                 Block    AlignPossible         Block, Left, Right, Center    LabelType             No_Label    KeepEmpty             true    FreeSpacing           true    HTMLStyle        div.standard {            margin-bottom: 2ex;        }    EndHTMLStyleEnd

KeepEmpty allows for multiple returns and FreeSpacing allows for multiple spaces. If you decide you want to make this change permanent, either create a layout and put it in your LyX user directory's layout folder or if you want it on a per-document basis, create a module.

All of this information and much more is in Help > Customization."

Cosm
Posts: 10
Joined: Thu Nov 07, 2013 12:53 pm
Thanks scottkosty and Stefan Kottwitz it works, I'm wondering is there a special reason to include all that in the local layout, can't I just include the following which also seems to work:

Style Standard

KeepEmpty true
FreeSpacing true

End

scottkosty
Site Moderator
Posts: 512
Joined: Sat Sep 01, 2012 6:38 am
Omitting the other flags I think will not affect PDF output, just the LyX display. For more information, see Help > Customization. If you plan on using LyX for a long time, it is worth the time to read, although it is dry so not the most fun.