Feat: update README
This commit is contained in:
parent
5bf9d8b7c1
commit
ae09d37523
22
README.md
22
README.md
@ -57,6 +57,11 @@ To produce formulas and values, I use an another tool I an developing: `mapytex
|
|||||||
# bopytex_config.py
|
# bopytex_config.py
|
||||||
from mapytex import Expression
|
from mapytex import Expression
|
||||||
from random import random
|
from random import random
|
||||||
|
|
||||||
|
direct_access = {
|
||||||
|
"Expression": Expression,
|
||||||
|
"random": random
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Every variables, objects or function inside this file will be available inside the template.
|
Every variables, objects or function inside this file will be available inside the template.
|
||||||
@ -65,7 +70,7 @@ Every variables, objects or function inside this file will be available inside t
|
|||||||
% tpl_example.tpl
|
% tpl_example.tpl
|
||||||
\documentclass[12pt]{article}
|
\documentclass[12pt]{article}
|
||||||
|
|
||||||
\title{Bopytex with Mapytex example -- \Var{ number }}
|
\title{Bopytex with Mapytex example -- \Var{ subject.name }}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
@ -79,8 +84,19 @@ Every variables, objects or function inside this file will be available inside t
|
|||||||
\end{document}
|
\end{document}
|
||||||
```
|
```
|
||||||
|
|
||||||
Then I can produce multiple documents (3 here)
|
Information about my students are stored in a csv file (here `students.csv`)
|
||||||
|
|
||||||
|
``` csv
|
||||||
|
"Name","Age","Email","fraction level","calculus level"
|
||||||
|
"Spike Tucker","22","s.tucker@randatmail.com","7","3"
|
||||||
|
"Martin Payne","21","m.payne@randatmail.com","7","3"
|
||||||
|
"Kimberly Baker","20","k.baker@randatmail.com","1","8"
|
||||||
|
"Emma Bailey","29","e.bailey@randatmail.com","2","5"
|
||||||
|
"Nicholas Taylor","28","n.taylor@randatmail.com","3","3"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then I can produce a subject for each of my student
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
$ bopytex tpl_simple.tex -q 3 -c bopytex_config.py
|
$ bopytex tpl_simple.tex -s students.csv -c bopytex_config.py
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user