From 9201ed678a3b2215d81fa68457c4fbdfdc35b711 Mon Sep 17 00:00:00 2001 From: NT Date: Wed, 18 Aug 2021 15:48:09 +0200 Subject: [PATCH] smaller fixes for PDF generation --- fixup-latex.py | 20 ++++++++++++-------- make-pdf.sh | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/fixup-latex.py b/fixup-latex.py index 0ef66cc..18fab21 100644 --- a/fixup-latex.py +++ b/fixup-latex.py @@ -36,15 +36,19 @@ reSkip.append( re.compile(r"detokenize.references.references" ) ); reSCnt.append #reSkip.append( re.compile(r"") ); reSCnt.append( 1 ) # ugly, manually fix citations in captions one by one +# need manual IDs! recs = []; rect = [] -recs.append( re.compile(r"example prediction from ....hyperlink.cite.references:id6..WKA.20...." ) ) -rect.append( 'example prediction from {[}\\\\protect\\\\hyperlink{cite.references:id6}{WKA+20}{]}' ) # note, quad \ needed! - -recs.append( re.compile(r"parametrized GAN {\[}.hyperlink{cite.references:id2}{CTS.21}{\]}" ) ) -rect.append( "parametrized GAN {[}\\\\protect\\\\hyperlink{cite.references:id2}{CTS+21}{]}" ) - -recs.append( re.compile(r"approach using continuous convolutions {\[}.hyperlink{cite.references:id12}{UPTK19}{\]}" ) ) -rect.append( "approach using continuous convolutions {[}\\\\protect\\\\hyperlink{cite.references:id12}{UPTK19}{]}" ) +# ID4 CTS +recs.append( re.compile(r"parametrized GAN {\[}.hyperlink{cite.references:id4}{CTS.21}{\]}" ) ) +rect.append( "parametrized GAN {[}\\\\protect\\\\hyperlink{cite.references:id4}{CTS+21}{]}" ) +# ID8 WKA +recs.append( re.compile(r"example prediction from ....hyperlink.cite.references:id8..WKA.20...." ) ) +rect.append( 'example prediction from {[}\\\\protect\\\\hyperlink{cite.references:id8}{WKA+20}{]}' ) # note, quad \ needed! +# ID14 UPTK +recs.append( re.compile(r"approach using continuous convolutions {.}.hyperlink{cite.references:id14}{UPTK19}{.}" ) ) +rect.append( "approach using continuous convolutions {[}\\\\protect\\\\hyperlink{cite.references:id14}{UPTK19}{]}" ) +continuous convolutions {\[}.hyperlink{cite.references:id12}{UPTK19}{\]}" ) ) +continuous convolutions {\[}\hyperlink{cite.references:id14}{UPTK19}{]} # fixup unicode symbols diff --git a/make-pdf.sh b/make-pdf.sh index e755bbf..fceae7b 100755 --- a/make-pdf.sh +++ b/make-pdf.sh @@ -23,7 +23,7 @@ mv book.tex book-in.tex mv sphinxmessages.sty sphinxmessages-in.sty mv book.aux book-in.aux mv book.toc book-in.toc -mv sphinxmanual.cls sphinxmanual-in.cls +#mv sphinxmanual.cls sphinxmanual-in.cls python3.7 ../../fixup-latex.py # generates book-in2.tex