<div dir="ltr">Hi<div><br></div><div>I have implemented a  preprocessor that say convert a filename.tex to filename.ltx (it puts LTR words, small sentences inside \LRE macro). I want to automate the process via \write18 so that when a user has filename.tex and runs pdflatex on filename.tex, then automatically via write18:</div>
<div><br></div><div><ul><li>preprocessor is called and converts filename.tex to filename.ltx</li><li>pdflatex is run on filename.ltx (pdflatex filename.ltx)</li><li>deletes filename.ltx when PDF output is produced</li></ul>
<div><br></div></div><div>What I find impossible is the second one. I can not have a second run of pdflatex inside the first pdflatex run. Is there any solution to this problem?</div></div>