Jinja LaTeX Templates


jtex is a command line tool (CLI) for rendering LaTeX\LaTeX documents from Jinja-style templates. This package uses nunjucks (a port of Jinja) as the template engine with a modified environment and syntax that plays well with LaTeX\LaTeX's markup.

Looking for Templates?

MyST Templates are available in the myst-templates organization on GitHub. You can also see all listed community templates using myst templates list, or browse the api if you are into JSON.

To create your own template see Create a Template.

Project GoalsΒΆ

  • Provide a data-driven templating markup for LaTeX\LaTeX
  • Provide validation of templates and supplied options when rendering a template
  • Work with standardized frontmatter to make authors, affiliations, etc. easy to template
  • Work with the MyST ecosystem of tools
  • Support many user supplied templates, local templates, etc.

Not Goals


Install the package globally using npm:

npm install -g jtex

and confirm correct installation by typing:

jtex --version

Usage with MySTΒΆ

The main usage for jtex is with myst and curvenote command line tools, both of which can compile markdown into LaTeX\LaTeX for templating with jtex.

Simple ExampleΒΆ

A document can be used very simply with the document as doc, the contents of which are documented in Document Model. Be sure to include the [-IMPORTS-] and the [-CONTENT-].

% template.tex


\author{[-doc.authors[0].name-] ([-doc.authors[0].email-])}



The End!