The answer is yes! :) Giant thanks to Dennis and Torbjørn T.!
Here I collected and simplified all info to make paragraph separation work.
NOTE: Nothing you set up here will affect the rendered output, just the look of your LyX UI!
Step 1. Setting up margins and a style which will act as the spacer between paragraphs.
Open Document Settings dialog, go to Local Layout
and copy-paste the following:
Format 11
RightMargin 10pt
LeftMargin 10pt
Style --Separator--
Category MainText
KeepEmpty 1
Margin Dynamic
LatexType Paragraph
LatexName dummy
ParIndent MM
Align Block
LabelType Static
LabelString ""
LabelFont
Color Blue
EndFont
End
Press "Validate", then press "Apply".
Step 2. Making enter add the paragraph separating space.
Open LyX preferences dialog, go to Editing/Shortcuts. Search for break-paragraph
, then select the break-paragraph command and click "Modify". Then, in the "function" text box, delete the "break-paragraph" text and replace it with
command-sequence break-paragraph;layout --Separator--;break-paragraph;
Press "Ok", press "Apply" and press "Save".
Step 3. Add option to be able to access the old paragraph break.
Again, in LyX preferences dialog/Editing/Shortcuts, search for break-paragraph
, select the break-paragraph command and click "Modify". Click "Delete Key" and press shift+enter.
Again, press "Ok", press "Apply" and press "Save".
This last step is important, otherwise you would have problems when trying to make an enumeration.
Done.
Tested:
- OK, LyX 2.0.5 on OSX Lion,
- OK, LyX 2.0.0 on Windows 7.
If these steps work with your LyX and you don't see it on the list, please edit the post and add yours!
The original ideas are taken from Dennis's answer (appreciate a lot again!).
I slightly modified the text to be typed into Local Layout, so the separator style does really just make a space between two paragraphs.
Your problem is due to the fact that on one hand you use the enumitem
package but then you also define your own lists via the list
environment of LaTeX. The enumitem
package doesn't know about your new list and gets confused.
Basically what happens is that the following code in \enit@preset
makes the wrong choice:
\ifnum\@listdepth=\@ne
\enit@outerparindent\parindent
\else
\parindent\enit@outerparindent
\fi
The idea of this code is to save the outer \parindent
value in \enit@outerparindent
when we enter the first level of lists and if we enter a nested list reuse the saved value instead. Now unfortunately your new list doesn't know about this so nothing gets saved. But if the enumerate
is entered it is in fact already on level 2 and therefore \parindent
gets the current value of \enit@outerparindent
which is, of course, still zero.
So either you simply give listparindent
and explicit value when you call enumarate, e.g.
\begin{enumerate}[parsep=0pt,listparindent=15pt]
or, if you like this properly fixed you could set \enit@outerparindent
in your definition of exercises
if it exists (i.e., if enumitem
was loaded), e.g.,
\makeatletter
\newenvironment{exercises}%
{\begin{list}{\exitem}{%
\@ifundefined{enit@outerparindent}{}% if this command exists set it, otherwise do nothing
{\ifnum\@listdepth=\@ne
\enit@outerparindent\parindent
\else
\parindent\enit@outerparindent
\fi
}%
\usecounter{exercise}%
\small%
\setlength{\itemindent}{\exlabelwidth}%
\addtolength{\itemindent}{\labelsep}%
\setlength{\labelwidth}{\exlabelwidth}%
\addtolength{\labelwidth}{\exsymbolwidth}%
\addtolength{\labelwidth}{\exlabelsep}%
\setlength{\leftmargin}{0.0cm}%
\setlength{\itemsep}{0.0cm}%
\setlength{\parsep}{0.0cm}%
\setlength{\listparindent}{\parindent}%
}%
}%
{\end{list}}
\makeatother
Because of the @
signs you need \makeatletter ...\makeatother
.
Best Answer
It is difficult to answer your question without knowing your setup. If you have chosen the option
twoside
, you also have turned onflushbottom
I presume, and then LaTeX will add space also between the paragraphs to stretch the page.Try the option
oneside
, or add the command\raggedbottom
as the last command in the preamble.The class files defines
\parskip
as:so check your code and packages that you not unintentionally have altered this definition.