Alex S.
Alex S.

Reputation: 1214

Jinja2 templates for latex - tutorials

I was wondering if someone can point me to the tutorials on how to create custom Jinja2 templates for LaTeX, so that I can use it in with nbconvert to convert Jupyter notebook into LaTeX?

Upvotes: 1

Views: 1302

Answers (2)

James Hirschorn
James Hirschorn

Reputation: 7994

I found this tutorial from the IPython/Jupyter Workshop at the NGCM Summer Academy (official jupyter github).

Upvotes: 0

Matt
Matt

Reputation: 27843

Unfortunately that is highly undocumented. I would suggest asking on the mailing list or directly open an issue on GitHub (jupyter/nbconvert repo)

The normal template informations you find will work with one difference that you need to replace the template extension from .tpl to .tplxand replace the jinja delimiters: {% to ((* for blocks , {{ to ((( for variable interpolations and {# to ((= for comments + all the symetric closing markers. The reasoning is that latex uses { heavily and you want to avoid conflict.

Otherwise there is close to no difference between latex and non-latex templates.

Upvotes: 1

Related Questions