I need to be able to change the value of a parameter inside a LaTeX document without having to change it manually. I'll explain:
There is one main program that executes another smaller one. This smaller program computes some things and creates a .txt-file with a specific name and all its results inside. Then the main program executes the LaTeX file I have to create which will process the created .txt-file into a nice pdf (using commands such as \openin\txtfile=\filename.txt
and the package datatool
).
Problem is that LaTeX needs to know the name of the newly created .txt-file. The main program knows the name it and will call the LaTeX file by using the cmd command > latex texfile.tex
. But this won't change the value of \filename
in any way.
Is there actually any possible way to change a value (of \filename
) inside the LaTeX file using the cmd? Because I have absolutely no clue and Google doesn't help me either...
pdflatex \def\filename{abc}\input{texfile}