Fixed formatting for PDF.
I finally learned that the raw cells let you put latex directly into the output. So now I have the appendix being created without the [1] %%latex showing up in the output. Also wrote code to parse the .tex file to make the Preface a chapter without numbering, so it is now a proper preface, and not "chapter 0". I have not touched the Windows generation tools, so PDF generation in Windows is now broken. I don't think I care.
This commit is contained in:
13
pdf/to_pdf.py
Normal file
13
pdf/to_pdf.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from __future__ import print_function
|
||||
import io
|
||||
|
||||
import IPython.nbconvert.exporters.pdf as pdf
|
||||
import fileinput
|
||||
|
||||
for line in fileinput.input('Kalman_and_Bayesian_Filters_in_Python.tex', inplace=True):
|
||||
print(line.replace('\chapter{Preface}', '\chapter*{Preface}'), end='')
|
||||
|
||||
|
||||
p = pdf.PDFExporter()
|
||||
p.run_latex('Kalman_and_Bayesian_Filters_in_Python.tex')
|
||||
|
||||
Reference in New Issue
Block a user