I have two Latex files for a weekly document I create. template.tex
contains a large list of variables that get changed each week:
\newcommand{\var}{foo}
\newcommand{\othervar}{bar}
Then the template.tex
imports document.tex
which is the actual document with each variable in the right spot.
I would like to update this with Python. Currently I have a Python script that finds the appropriate variables in a Google Docs spreadsheet and saves them as a toml file. I would like Latex to read that toml (or json or yaml it doesn't matter the format to me) and then assign the values of those variables based on it.
Best Answer
Space separated values are simpler to parse than JSON, for example
From a text file
vars.txt
and a tex file