#pdf #handlebars-template #latex

tex_tmpl_rs

Render a LaTeX & Handlebars template into PDF

5 releases

0.2.2 Feb 21, 2025
0.2.1 Aug 9, 2024
0.1.2 Jan 7, 2023
0.1.1 Dec 8, 2021
0.1.0 Dec 8, 2021

#198 in Template engine

Download history 10/week @ 2024-12-02 5/week @ 2024-12-09 5/week @ 2025-02-10 131/week @ 2025-02-17 20/week @ 2025-02-24 10/week @ 2025-03-03

162 downloads per month

MIT license

8KB
143 lines

tex_tmpl_rs

A small wrapper library for rendering a LaTeX / Handlebars template into a PDF document using Tectonic.

Example

\documentclass{article}
\begin{document}
    Hello, {{foo}}!
\end{document}
let mut data = HashMap::new();
data.insert("foo", "boo");

let t = TemplateRecipe {
    template: &tex_path,
    output: &pdf_path,
    data: &data,
    helpers: None,
};

let _ = render_pdf(&t);

Dependencies

Fedora:

dnf install freetype-devel graphite2-devel libicu-devel fontconfig-devel gcc-c++ libpng-devel

Optional

cargo install -F external-harfbuzz tectonic

Dependencies

~39–71MB
~1M SLoC