2

I have an offical document template in LaTeX, which I would like to fill programatically, i.e. providing script with values for selected variables (e.g. name, surname or boolean value for Mr./Mrs.) and compiling .tex into .pdf.

  1. How do I correctly create a document with such variables, is there some common format for inserting such templated variables into LaTeX?
  2. How do I compile such template from a script (I need just pointing into the right direction, the right way to do these kind of things, I will know where to go from there)?

closed as unclear what you're asking by Johannes_B, Bobyandbob, Mensch, moewe, Stefan Pinnow Mar 25 '18 at 10:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    An idea: variables could just be ordinary TeX macros, defined in a file which is \input(ted) by the main file; you should then use the piped input facility to generate this definition file dynamically and feed it to the TeX compiler. – GuM Jul 18 '16 at 7:21
  • 1
    You might want to have a look at the datatool package, too. – GuM Jul 18 '16 at 7:30
  • tex.stackexchange.com/a/89803/11604 – Fran Jul 18 '16 at 20:19
  • Is there any news here? – Johannes_B Aug 2 '16 at 10:47
  • 1
    The question states a template is available and then asks how to create on. It might be possible this question is asking about template engines. I vote to close as unclear. – Johannes_B Mar 25 '18 at 8:33

Browse other questions tagged or ask your own question.