Wrap listings in minipage to prevent page breaks
parent
674a0b12a6
commit
129a061318
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue