Setting the PdfLaTeX command from the default of
pdflatex -synctex=1 -interaction=nonstopmode %.tex
to, say, the sequence of commands
ls | pdflatex -synctex=1 -interaction=nonstopmode %.tex,
and then compiling a file with errors using this command will cause future compiles not to work. For more details, see here
You've setup the build system in a way that is a grey area where the behavior is not guaranteed: The commands on the command panel should only be single build system commands. Note that
|chains build system command (see the manual).Background: Why does it fail?
txs:///pdflatexis internally marked as a compilation command, i.e. it checks for errors in the log file and stops if there are any. For technical reasons, this is performed on every subcommand (which we expect only to be one, namely the pdflatex call). In your case, once you have an error in your log an runls, the compilation is aborted and you never get to a new pdflatex call to update the log.What you should do:
You have several ways to fix the configuration:
sh -c "ls & pdflatex ...", or put all the commands in a shell script and call this.The both variants differ slightly in the behavior for automatic recompilation: TXS checks if the log contains information that a rerun is necessary and then runs pdflatex again (configurable in
Build -> Build Options, enabled by default). While first case runslswith every rerun, i.e.ls pdflatex ls pdflatex ..., the second case runslsonly oncels pdflatex pdflatex.ls, there are also other variants, e.g.Build -> Meta Commands -> Precompile. Which is run only once per build (Note that compile is run twice in case of a bibliography:compile bibliography compile).added a warning when running such a configuration
hg 6506 (2260b9cd08a5)