Kalman-and-Bayesian-Filters.../pdf/to_pdf.py
Roger Labbe a3cd023d3b Code cleanup
Removed commented out code and unneeded imports.
2015-05-01 10:49:12 -07:00

16 lines
338 B
Python

import IPython.nbconvert.exporters.pdf as pdf
f = open('book.tex', 'r', encoding="iso-8859-1")
filedata = f.read()
f.close()
newdata = filedata.replace('\chapter{Preface}', '\chapter*{Preface}')
f = open('book.tex', 'w', encoding="iso-8859-1")
f.write(newdata)
f.close()
p = pdf.PDFExporter()
p.run_latex('book.tex')