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}
I'm sure you have no idea who I am, but I want you to know that you're my hero right now.
ReplyDelete^^^agreed
ReplyDeleteFor the third time, you're a hero
ReplyDeleteOh my god you are my hero too.
ReplyDeleteinterestingly, even two years down the road, this little blogpost is an important and invaluable find. Thank you.
ReplyDeleteI suppose I should throw my gratitude in. You're my hero, as well.
ReplyDeleteI tip my hat as well
ReplyDeleteThat helped, thanks!
ReplyDeleteI'm gonna just add my name to the list of hero worshippers!!!!
ReplyDeleteGood stuff, thank you! (and you're my hero,too.)
ReplyDeleteYou're my hero as well. Thanks! -B
ReplyDeleteHoly *** this is so exactly what I was looking for.
ReplyDeleteYou are a superhero
ReplyDeleteIt 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?
ReplyDelete5 years later and this post is still badass. Thanks man
ReplyDeleteThis post is like a lamppost in the dark.
ReplyDeleteI just wanted to say that for me, samepage does not workthat well. The text came by far too close to the page numbers.
ReplyDelete