Kalman-and-Bayesian-Filters.../pdf/to_pdf.py
2015-04-04 10:30:50 -07:00

15 lines
386 B
Python

from __future__ import print_function
import io
import IPython.nbconvert.exporters.pdf as pdf
import fileinput
for line in fileinput.input('book.tex', openhook=fileinput.hook_encoded("iso-8859-1")):
# print(line.replace('\chapter{Preface}', '\chapter*{Preface}'), end='')
line.replace('\chapter{Preface}', '\chapter*{Preface}')
p = pdf.PDFExporter()
p.run_latex('book.tex')