Explorar el Código

Wrap listings in minipage to prevent page breaks

Igor Wiedler hace 12 años
padre
commit
129a061318
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      doc/make-pdf.sh

+ 2 - 2
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