u/klettercraft

▲ 7 r/LaTeX

pdflatex doesnt work in script

Hello I have created a custom script in Termux, but it only throws this message.
The strange thing is that if i put every command on its own in the command line it works but in the script it only thorws this error.

Edit: I use the programm texlive

Can Someone please tell me what i did wrong?

Script:

cd $Directory 
/data/data/com.termux/files/usr/bin/texlive/pdflatex $File 
sleep 5s 
termux-open $CompiledFile

Error:

This is pdfTeX Version 3. 141592653-2.6-1.40.29 (TeX Live 2026/Termux) (preloaded format=pdflatex) restricted Awrite18 enabled.
$84
kpathsea: Running mktexfmt pdflatex. fmt mktexfmt: No such file or directory can't find the format file pdflatex. fmt'!
reddit.com
u/klettercraft — 5 days ago
▲ 3 r/termux

pdflatex doesnt work in script

Hello I have created a custom script in Termux, but it only throws this message.
The strange thing is that if i put every command on its own in the command line it works but in the script it only thorws this error.

Can Someone please tell me what i did wrong?

Script:

cd $Directory 
/data/data/com.termux/files/usr/bin/texlive/pdflatex $File 
sleep 5s 
termux-open $CompiledFile

Error:

This is pdfTeX Version 3. 141592653-2.6-1.40.29 (TeX Live 2026/Termux) (preloaded format=pdflatex) restricted Awrite18 enabled.
$84
kpathsea: Running mktexfmt pdflatex. fmt mktexfmt: No such file or directory can't find the format file pdflatex. fmt'!
reddit.com
u/klettercraft — 9 days ago