I wanted to keep together a paragraph and following quote on a document written in LaTeX. However, the \nopagebreak command does not work properly in this case. Indeed, \nopagebreak does not suppress the page breaks that are deliberately inserted around environments like {quote}. The solution was enclosing the text I want to keep in the same page within {samepage} environment. Something like this:
\begin{samepage}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit:
\begin{quote}
Quisque leo.
\end{quote}
\end{samepage}
17 comments:
I'm sure you have no idea who I am, but I want you to know that you're my hero right now.
^^^agreed
For the third time, you're a hero
Oh my god you are my hero too.
interestingly, even two years down the road, this little blogpost is an important and invaluable find. Thank you.
I suppose I should throw my gratitude in. You're my hero, as well.
I tip my hat as well
That helped, thanks!
I'm gonna just add my name to the list of hero worshippers!!!!
Good stuff, thank you! (and you're my hero,too.)
You're my hero as well. Thanks! -B
Holy *** this is so exactly what I was looking for.
You are a superhero
It did not work with me. I use ledmac-ledpar to typeset a double text parallelly. Does any one know another way to play the same trick?
5 years later and this post is still badass. Thanks man
This post is like a lamppost in the dark.
I just wanted to say that for me, samepage does not workthat well. The text came by far too close to the page numbers.
Post a Comment