LyX ⇒ Why can't you have empty lines when editing text in Lyx?
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?
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?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Why can't you have empty lines when editing text in Lyx?
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.
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
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Why can't you have empty lines when editing text in Lyx?
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
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
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
LaTeX.org admin
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Why can't you have empty lines when editing text in Lyx?
Sorry for the frustration. You can get your desired behavior from the customization explained in the following answer: https://tex.stackexchange.com/questions ... 001#152001
- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Why can't you have empty lines when editing text in Lyx?
To quote the solution, scottkosty linked above:
"You can do what you want by adding the following to Document > Settings > Local Layout
All of this information and much more is in Help > Customization."
"You can do what you want by adding the following to Document > Settings > Local Layout
Code: Select all
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;
}
EndHTMLStyle
End
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."
LaTeX.org admin
Why can't you have empty lines when editing text in Lyx?
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
Style Standard
KeepEmpty true
FreeSpacing true
End
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Why can't you have empty lines when editing text in Lyx?
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.