pbdl-book/make-pdf.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

2021-04-04 07:48:21 +02:00
# source this file with "." in a shell
2021-06-30 22:03:39 +02:00
echo
echo WARNING - still requires one manual quit of first pdf/latex pass, use shift-x to quit
echo
2021-06-30 17:03:07 +02:00
2021-08-06 20:02:59 +02:00
# do clean git checkout for changes from json-cleanup-for-pdf.py?
2021-08-17 21:11:13 +02:00
# git checkout diffphys-code-burgers.ipynb diffphys-code-ns.ipynb diffphys-code-sol.ipynb physicalloss-code.ipynb bayesian-code.ipynb supervised-airfoils.ipynb
2021-06-29 18:02:09 +02:00
# warning - modifies notebooks!
python3.7 json-cleanup-for-pdf.py
2021-06-30 17:03:07 +02:00
# clean / remove _build dir ?
2021-06-29 18:02:09 +02:00
# GEN!
/Users/thuerey/Library/Python/3.7/bin/jupyter-book build . --builder pdflatex
cd _build/latex
2021-06-30 22:03:39 +02:00
#mv book.pdf book-xetex.pdf # failed anyway
2021-06-29 18:02:09 +02:00
2021-06-30 17:03:07 +02:00
rm -f book-in.tex sphinxmessages-in.sty book-in.aux book-in.toc
2021-06-29 18:02:09 +02:00
mv book.tex book-in.tex
mv sphinxmessages.sty sphinxmessages-in.sty
2021-06-30 17:03:07 +02:00
mv book.aux book-in.aux
mv book.toc book-in.toc
2021-07-14 18:16:27 +02:00
mv sphinxmanual.cls sphinxmanual-in.cls
2021-06-29 18:02:09 +02:00
python3.7 ../../fixup-latex.py
# generates book-in2.tex
2021-08-17 21:11:13 +02:00
# remove unicode chars via unix iconv
2021-06-29 18:02:09 +02:00
iconv -c -f utf-8 -t ascii book-in2.tex > book.tex
2021-06-30 22:03:39 +02:00
# finally run pdflatex, now it should work:
2021-06-30 17:03:07 +02:00
# pdflatex -recorder book
2021-04-04 07:48:21 +02:00
pdflatex book
2021-08-07 18:50:37 +02:00
pdflatex book
2021-04-04 07:48:21 +02:00
2021-08-17 21:11:13 +02:00
# for convenience, archive results in main dir
2021-06-30 22:03:39 +02:00
mv book.pdf ../../book-pdflatex.pdf
tar czvf ../../pbdl-latex-for-arxiv.tar.gz *
2021-04-04 07:48:21 +02:00