Browse Source

Wrap listings in minipage to prevent page breaks

Igor Wiedler 12 năm trước cách đây
mục cha
commit
129a061318
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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