Skip to content

Commit

Permalink
Update the LaTeX and PDF template to new style
Browse files Browse the repository at this point in the history
Have not tested it works.
  • Loading branch information
ageorgou committed Oct 4, 2022
1 parent 383f477 commit 18d7c17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ default: _site
jupyter nbconvert --to notebook --allow-errors --ExecutePreprocessor.timeout=120 --execute --stdout $< > $@

notes.pdf: combined.ipynb $(PNGS) Makefile
jupyter nbconvert --to pdf --template latex.tplx $<
jupyter nbconvert --to pdf --template latex_template $<
mv combined.pdf notes.pdf

combined.ipynb: $(EXECUTED)
python nbmerge.py $^ $@
sed -i -e 's/\.svg/\.png/g' $@

notes.tex: combined.ipynb $(PNGS) Makefile
jupyter nbconvert --to latex --template latex.tplx $<
jupyter nbconvert --to latex --template latex_template $<
mv combined.tex notes.tex

notebooks.zip: ${NBV2}
Expand Down
8 changes: 8 additions & 0 deletions latex_template/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"base_template": "latex",
"mimetypes": {
"text/latex": true,
"text/tex": true,
"application/pdf": true
}
}
2 changes: 1 addition & 1 deletion latex.tplx → latex_template/index.tex.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

% Default to the notebook output style
((* if not cell_style is defined *))
((* set cell_style = 'style_ipython.tplx' *))
((* set cell_style = 'style_ipython.tex.j2' *))
((* endif *))

% Inherit from the specified cell style.
Expand Down

0 comments on commit 18d7c17

Please sign in to comment.