On 12.06.2016 22:48, Paul A. Rubin wrote:
racoon <xracoonx <at> gmx.de> writes:
Unfortunately, the absolutelynotpagebreak environment does not work
either. Sometimes it just leaves have a page blank before the
environment even though it is only three lines that are kept together...
Maybe someone has another idea?
Not sure this will be any better, but you can try the following.
1. Start a new standard environment just before the label. In it, in a TeX
box, put \samepage{. (Omission of the closing brace is intentional.) Note
that this needs to be in a standard environment, not part of the Description
environment.
2. After the quote, in a standard environment, put a TeX box containing the
closing brace }. Again, this needs to be in a separate environment, not part
of the quote.
In your test document, this drags the last line Roman gibberish into the
second page, so spacing may not be ideal ... but at least it's fairly easy
to try.
Thanks. That seems to work. I have included it in a module.
Daniel
#\DeclareLyXModule{Sampage}
#DescriptionBegin
# Environment and Custom Inset to keep stuff on the same page
#DescriptionEnd
Style Sampage
Category MainText
Margin Static
LatexType Environment
LatexName samepage
NextNoIndent 1
ToggleIndent Never
LabelType No_Label
End
InsetLayout Flex:Samepage
LyXType custom
LatexType command
LatexName samepage
Decoration classic
MultiPar true
LabelString "Samepage"
End