I have a LaTeX project that I compile using the following Bash script:
pdflatex -draftmode -interaction=nonstopmode thesis.tex > /dev/null
find -name "*.aux" -execdir bibtex {} > /dev/null ";"
pdflatex -draftmode -interaction=nonstopmode thesis.tex > /dev/null
pdflatex -synctex=1 -interaction=nonstopmode thesis.tex > /dev/null
I call this script directly from TeXstudio with a simple user defined command, bash compile.sh | txs:///view-pdf and it takes about ~5 seconds to compile the full document (~300 pages).
The only problem with compiling via an external Bash script is that TeXstudio is not able to catch errors properly. So I made a new user command with the content of the Bash script as
pdflatex -draftmode -interaction=nonstopmode thesis.tex > /dev/null | find -name "*.aux" -execdir bibtex {} > /dev/null ";" | pdflatex -draftmode -interaction=nonstopmode thesis.tex > /dev/null | pdflatex -synctex=1 -interaction=nonstopmode thesis.tex > /dev/null | txs:///view-pdf
This takes about ~8 sec to run. Why is this slower when both the commands do the same amount of work?
.bashrcso may be different PATH, or different TEXINPUTS or ... – David Carlisle Aug 12 '23 at 12:50PATHis not modified, I tried calling utilities that were defined in the.basrcbut texstudio > bash could not find it. – Eular Aug 12 '23 at 14:47%with the file name etc.). Maybe it just takes longer to do the parsing with your longer user command? – samcarter_is_at_topanswers.xyz Aug 12 '23 at 15:10