jtex
is a command line tool (CLI) for rendering 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 's markup.
Create a Template π
Learn how to create a template for a scientific journal article or Beamer presentation using jtex
and MyST Markdown.
Browse Templates π
Our templates are curated by the MyST community and include templates to render over 400 journals!
Command Line Interface β¨
Use jtex
to list templates, quickly render content, or fix your template.yml
, or parse your files for used packages.
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
- 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
- Translation of MyST to , instead see
myst-to-tex
or using pandoc withjtex
InstallationΒΆ
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 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
\documentclass{article}
[-IMPORTS-]
\title{[-doc.title-]}
\author{[-doc.authors[0].name-] ([-doc.authors[0].email-])}
\begin{document}
\maketitle
[-CONTENT-]
The End!
\end{document}