Getting StartedΒΆ
Run latest script from the command line
$ latest template data
where
- template is the path to a template file and
- data is the path to a yaml formatted data file.
An example template file can be something like
\documentclass{article}
\title{{%title%}}
\author{<<<{%author%}>>>}
\date{<<<Biella (IT), {%date%}>>>}
\begin{document}
<<<content::x = {%x%} so that $x^2$ = {%x**2%}>>>.
\section{Prime Numbers}
\begin{itemize}
<<<content::primes::\item {%n%}>>>
\end{itemize}
\section{Fibonacci}
<<<content::fibonacci::{%_index%}. {%_value%}>>>
\end{document}
while a yaml formatted data file can be something like
title: Testing latest
author: Flavio Grandin
date: Today
content:
x: 3
primes:
- n: 2
- n: 3
- n: 5
- n: 7
- n: 11
fibonacci:
- 1
- 1
- 2
- 3
- 5
- 8
- 13
The expected output is
\documentclass{article}
\title{Testing latest}
\author{Flavio Grandin}
\date{Biella (IT), Today}
\begin{document}
x = 3 so that $x^2$ = 9.
\section{Prime Numbers}
\begin{itemize}
\item 2
\item 3
\item 5
\item 7
\item 11
\end{itemize}
\section{Fibonacci}
0. 1
1. 1
2. 2
3. 3
4. 5
5. 8
6. 13
\end{document}