diff --git a/README.md b/README.md index 8f15937..f9fd100 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,11 @@ To produce formulas and values, I use an another tool I an developing: `mapytex # bopytex_config.py from mapytex import Expression from random import random + +direct_access = { + "Expression": Expression, + "random": random +} ``` 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 \documentclass[12pt]{article} -\title{Bopytex with Mapytex example -- \Var{ number }} +\title{Bopytex with Mapytex example -- \Var{ subject.name }} \begin{document} @@ -79,8 +84,19 @@ Every variables, objects or function inside this file will be available inside t \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 -$ bopytex tpl_simple.tex -q 3 -c bopytex_config.py +$ bopytex tpl_simple.tex -s students.csv -c bopytex_config.py ```