Kalman-and-Bayesian-Filters.../pdf/to_pdf.py

15 lines
386 B
Python
Raw Normal View History

from __future__ import print_function
import io
import IPython.nbconvert.exporters.pdf as pdf
import fileinput
2015-04-04 19:30:50 +02:00
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()
2015-04-04 19:30:50 +02:00
p.run_latex('book.tex')