Using the \batchmode command at the top of the file helps getting rid of some lines, but I'm still left with a few lines, for example:

(/usr/local/texlive/2011/texmf-dist/tex/latex/base/t1enc.def)) (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.sty (/usr/local/texlive/2011/texmf-dist/tex/generic/babel/english.ldf

and so on. I am unable to find a way to clear up my command line so that any warnings or lines that get printed to tell me something more useful don't just get lost in the sea of LaTeX output.

Any ideas?


You can start batchmode earlier by specifying it on the commandline

pdflatex -interaction=batchmode   myfile.tex

Or if you don't even want

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode

You could use

pdflatex  myfile > /dev/null

or whatever null output stream is applicable to your operating system.

  • Unfortunately I don't think I'm able to use that command, since pdflatex is being called by another program. The line in the makefile that uses pdflatex does not allow these options to used. Aug 14 '13 at 12:36
  • @user1488804 Well that's a Makefile problem, not a TeX one! Even so, I don't see that it makes sense either: you can happily redirect/add options in a Makefile.
    – Joseph Wright
    Aug 14 '13 at 12:40
  • I understand, but I do have freedom to add things to the latex preamble, so I was hoping the solution could be found there. Aug 14 '13 at 13:01
  • And the line in the makefile isn't: pdflatex ... myfile.tex. Instead it's sphinx-build ... latex myfile.tex. Unfortunately, this program, sphinx, is a bit restrictive to what can be added here. Default pdflatex options don't work Aug 14 '13 at 13:02
  • Ahah! the outputting stdout to /dev/null works in this case as it's not latex specific. Thanks! Aug 15 '13 at 9:41

When redirecting to /dev/null is a good solution for you, you might consider using grep to suppress "almost everything". I use this (with GNU grep 3.1) to find out whether another run of latex is needed (feel free to extend):

egrep "Rerun to get cross-references right|\
There were undefined references|\
Citation .* on page .* undefined on input"

I know this type of matching is dangerous (future versions, localization, etc.), but it works ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.