GitHub | Gitlab | Feed | Privacy Policy | Contact & Impressum

Squelch Annoying LaTeX Output

pdflatex has ridiculously verbose output. Compiling a simple Hello World kind of document is already too much for me.

$ cat hworld.tex
Hello world!

$ pdflatex hworld.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.17
(TeX Live 2016/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
No file hworld.aux.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./hworld.aux) )
Output written on hworld.pdf (1 page, 9887 bytes).
Transcript written on hworld.log.

In the specific case of pdflatex, you might try to use the --interaction=batchmode, but (1) this does not squelch all of the output, (2) not all programs have such an option and, most importantly, (3) while the output usually isn't interesting, in case of an error it certainly is.

So I wrote a script called trusting available on Github. It runs a command trusting that it will succeed, squelching stdout and stderr. If errors do occur, i.e. the command exists with a non-zero exit code, the full stdout and stderr output will be printed after that error has occurred.

Show trust in your programs and let them be quiet.