fixes for pdf output

This commit is contained in:
NT 2021-08-07 18:50:37 +02:00
parent 1b37720b45
commit cc71b43dc8
2 changed files with 22 additions and 12 deletions

View File

@ -25,6 +25,10 @@ reSkip.append( re.compile(r"set....font{Free") ) ; reSCnt.append( 7 )
reSkip.append( re.compile(r"ucharclasses") ) ; reSCnt.append( 1 ) reSkip.append( re.compile(r"ucharclasses") ) ; reSCnt.append( 1 )
reSkip.append( re.compile(r"unicode-math") ) ; reSCnt.append( 1 ) reSkip.append( re.compile(r"unicode-math") ) ; reSCnt.append( 1 )
# latex fixup, remove references chapter
reSkip.append( re.compile(r"chapter.References" ) )
reSkip.append( re.compile(r"detokenize.references.references" ) )
#reSkip.append( re.compile(r"") ) #reSkip.append( re.compile(r"") )
#reSkip.append( re.compile(r"") ) #reSkip.append( re.compile(r"") )
#reSkip.append( re.compile(r"") ) #reSkip.append( re.compile(r"") )
@ -44,12 +48,14 @@ rect.append( "approach using continuous convolutions {[}\\\\protect\\\\hyperlink
# fix backslashes... saves at least typing a few of them! still needs manual \ -> \\ , could be done better # fix backslashes... saves at least typing a few of them! still needs manual \ -> \\ , could be done better
tt =( 'hrule\n' + tt =( 'hrule\n' +
'\\vspace{5cm}\n' + '\\vspace{4cm}\n' +
'\\centering{\n' + '\\begin{center}\n' +
'\\sphinxstylestrong{\\Huge \\textsf{Physics-based Deep Learning}} \\vspace{0.2cm} \n' + '\\sphinxstylestrong{\\Huge \\textsf{Physics-based Deep Learning}} \\\\ \\vspace{0.5cm} \n' +
'\\sphinxstylestrong{\\LARGE \\textsf{\\url{http://physicsbaseddeeplearning.org}}} \\vspace{2cm} \n' + '\\sphinxstylestrong{\\LARGE \\textsf{\\url{http://physicsbaseddeeplearning.org}}} \\\\ \\vspace{3cm} \n' +
'\\noindent\sphinxincludegraphics[height=220\\sphinxpxdimen]{{teaser}.jpg} \\vspace{2cm} \n' + '\\noindent\\sphinxincludegraphics[height=220\\sphinxpxdimen]{{teaser}.jpg} \\\\ \\vspace{2cm} \n' +
'\\centering{ \\textsf{\\large N.\@{} Thuerey, P.\@{} Holl, M.\@{} Mueller, P.\@{} Schnell, F.\@{} Trost, K.\@{} Um}} \n' ) '\\textsf{\\large N. Thuerey, P. Holl, M. Mueller, P. Schnell, F. Trost, K. Um} \n' +
'\\end{center}\n' )
#print(tt); #print(tt);
recBST1 = re.compile(r"\\") recBST1 = re.compile(r"\\")
recBST1t = '\\\\\\\\' recBST1t = '\\\\\\\\'
@ -69,6 +75,7 @@ recs.append( re.compile(r"date{(.*)}") )
rect.append( r'date{\\centering{\1}}' ) rect.append( r'date{\\centering{\1}}' )
# --- # ---
# only do replacements via recs for book.tex , via applyRecs=True # only do replacements via recs for book.tex , via applyRecs=True
@ -151,12 +158,14 @@ parseF(inf,outf,reSkip,reSCnt)
#--- #---
inf = "sphinxmanual-in.cls" # disable for now?
outf = "sphinxmanual.cls" if 0:
inf = "sphinxmanual-in.cls"
outf = "sphinxmanual.cls"
# remove openright option from style # remove openright option from style
reSkip = [] ; reSCnt = [] reSkip = [] ; reSCnt = []
reSkip.append( re.compile(r"PassOptionsToClass.openright...sphinxdocclass") ) ; reSCnt.append( 1 ) reSkip.append( re.compile(r"PassOptionsToClass.openright...sphinxdocclass") ) ; reSCnt.append( 1 )
parseF(inf,outf,reSkip,reSCnt) parseF(inf,outf,reSkip,reSCnt)

View File

@ -34,6 +34,7 @@ iconv -c -f utf-8 -t ascii book-in2.tex > book.tex
# finally run pdflatex, now it should work: # finally run pdflatex, now it should work:
# pdflatex -recorder book # pdflatex -recorder book
pdflatex book pdflatex book
pdflatex book
mv book.pdf ../../book-pdflatex.pdf mv book.pdf ../../book-pdflatex.pdf