From 129a061318743d5800e21645c285893b028504f5 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 31 Aug 2012 02:33:37 +0200 Subject: [PATCH] Wrap listings in minipage to prevent page breaks --- doc/make-pdf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/make-pdf.sh b/doc/make-pdf.sh index 91032e178..648e4003c 100755 --- a/doc/make-pdf.sh +++ b/doc/make-pdf.sh @@ -63,8 +63,8 @@ echo >> book.tex echo "\end{document}" >> book.tex # apply to whole book -sed -i.bak 's/\\begin{verbatim}/\\vspace{1em} \\begin{lstlisting}/g' book.tex -sed -i.bak 's/\\end{verbatim}/\\end{lstlisting}/g' book.tex +sed -i.bak 's/\\begin{verbatim}/\\begin{minipage}{\\textwidth} \\begin{lstlisting}/g' book.tex +sed -i.bak 's/\\end{verbatim}/\\end{lstlisting} \\end{minipage}/g' book.tex rm book.tex.bak pdflatex book.tex