I need to write a command that read a line from a text file and expand to the content of this line, the next command read the next line and so on.
...
\command{arg}
...
\command{arg}
...
\command{arg}
...
the macro argument can't be used as an index in the external file, and that the external file is produced by a python script.
Ethan:: the text file contain Arabic text generated in a line by line form by the python script... in a first pass of LateX (XeLateX) each \command write its argument in a fileIn.txt (Arabic text)... the python script take this file and produce fileOut.txt... in the second pass of Latex each \command will read its corresponding Line from fileOut.txt... The two text files contain simple line by line Arabic text...
line one
line two
.
.
.
last line
here is a MnWE:
usepackage{}
...
...
\newcommand{\command}[1]{....#1...}
...
\begin{document}
...
...
\command{arg0}
...
...
\command{arg1}
...
...
...
\command{arg2}
...
...
\command{arg3}
...
\end{document}
in the first pass \command{..} is typically like \index{..} wich WRITE content in an external file... but in second pass i havn't any idea about the command in ()TeX wich PUTS a content from an external file... hope all is clear now.
