/latex-jinja

Latex templating with Jinja and PDF conversion.

Primary LanguagePythonMIT LicenseMIT

Latex Jinja

Latex templating with Jinja and PDF conversion.

Review Version Downloads Quality Coverage

Example

Copy the template files:

python -m latex-jinja init
INFO Copied "inputs.json"
INFO Copied "template.tex.j2"

This creates a Jinja latex template and an inputs file:

template.tex.j2

\documentclass[12pt]{article}
\begin{document}

\title{ {{title}} }
\maketitle

...

\end{document}

inputs.json

{
  "author": "Author",
  "title": "Title"
}

Run the Jinja templating engine and produce a PDF:

python -m latex-jinja build
INFO Loaded inputs from "inputs.json"
INFO Rendered the template "template.tex.j2
INFO Created "article.pdf"

This will populate the template and produces a PDF:

Example

Installing

Download the TeX distribution, this includes pdflatex which is used by this package.

pip install latex-jinja

Documentation

Documentation and more detailed examples are hosted on Github Pages.

Tooling

Dependencies

To install dependencies:

yarn install
pip install .[all]

Tests

To run tests:

thx test

Documentation

To generate the documentation locally:

thx docs

Linters

To run linters:

thx lint

Formatters

To run formatters:

thx format

Contributing

Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.

This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.

Bump2version is used to version and tag changes. For example:

bump2version patch

Contributors

Remarks

Lots of love to the open source community!

Be kind to your mind Love each other It's ok to have a bad day