When I run pdfLaTeX, I get very verbose output:


Is there a script to soak up all the verbose output and allow the important stuff to pass through, like errors, overfull hboxes, and so on?

Also, is there a reason why it sends a hard return to the console for lines longer than 79 characters?

  • 2
    This is not a pdfLaTeX thing: the file comments are TeX itself, and so you get them with all of the engines. – Joseph Wright Aug 6 '10 at 5:44
  • @JosephWright: I don't think the (presumably renamed) {latex-project} was appropriate, but I don't know which tex tag belongs here. Could you please add it (and get rid of then-obsolete comments)? – doncherry Mar 30 '12 at 1:15
  • Regarding the second part of the question: A separate question is available – Hotschke May 15 '14 at 11:36
  • @BenCrowell: duplicate? – Neil G Sep 1 '14 at 6:13

The line feed after 79 characters is defined in Web2C's configuration file, called texmf.cnf. The variable name is max_print_line which you can change in the file (not recommended in general, but in that case the setting is really harmless); and if you run TeX from a shell you can also set this variable in the environment (export max_print_line=1048576 for Korn-like shells, set max_print_line 1048576 for C shells).

I am not aware of a way to forbid line breaks entirely; I only set the variable to a very large value when this behaviour annoys me.


The solution is

  1. Either use the -interaction batchmode switch or put \batchmode at the start of the document(or anywhere you want to stop displaying output).

  2. Use \scrollmode, \nonstopmode, or \errorstopmode anywhere you want to enable output generation. \errorstopmode enables errors interaction.

  3. Use \batchmode anywhere you want to disable output generation.

    • To reduce clutter use the command line switch, and use the following template.



This will only show output from latex between the the \scrollmode and \batchmode and very little else.

If you are using WinEdt(or possibly some other automated process) it seems to like to open 0 length pdf's for no reason. It also doesn't seem to have an easy way to check for 0 length files.

  • Add the follow to the ExecCompiler.edt file in the \Exec directory right after the string "// Check if the Output was Generated ...". (It is near the bottom)


Run('DeleteFileIfEmpty.exe "%P\%N.pdf"','%P',0,0,'%N.pdf',0,0,1);
IfFileExists("%P\%N.pdf", "Relax;", !"JMP('Exit');");
  • Here is C code of for a simple tool that deletes a file if it is empty.


#include <tchar.h>
#include <Windows.h>

long GetFileSize(const TCHAR *fileName)
    if (NULL == fileName) return -1;
    if (!GetFileAttributesEx(fileName, GetFileExInfoStandard, (void*)&fileInfo)) return -1;
    return (long)fileInfo.nFileSizeLow;

int _tmain(int argc, _TCHAR* argv[])
    argv = CommandLineToArgvW(GetCommandLine(), &argc); if (argc < 2) return -1;

    _TCHAR *fn = new _TCHAR[1000]; ZeroMemory(fn, 1000*sizeof(_TCHAR)); _TCHAR *fn2 = fn; 
    for(int i = 1; i < argc; i++) { _tcscpy(fn2, argv[i]); fn2 += _tcslen(argv[i]); _tcscpy(fn2++, _T(" ")); } fn2--;
    if (GetFileSize(fn) > 0) return -1;

    return 1;

You can download this file at


Put the DeleteFileIfEmpty.exe in a path that is in the %path% environment or the bin dir that WinEdt is setup to use.

This was tested with WinEdt6 and works. Reduces output clutter(no package loading msgs, banners, etc...) and doesn't open up empty files when there is an error.

  • 1
    This is a great solution. You can put \batchmode whenever you want to get rid of messages and \scrollmode whenever you want to see the warnings and other staffs. – mahmood Jan 4 '14 at 12:01
  • At least MikTeX requires the commandline parameter to be -interaction=batchmode (no whitespace separator). – Twonky May 15 '17 at 10:23

This is what the silence package is intended to help with.

  • 4
    This is great, thank you. Do you know how to get rid of this stuff, though? (/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amssymb.sty (/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) – Neil G Aug 5 '10 at 23:48
  • 2
    That's TeX: it tells you what files its using. I've never seen a way to turn it off. – Joseph Wright Aug 6 '10 at 5:45
  • 3
    +1, could you add a little more information to this answer? E.g. an example of filtered output (if that makes any sense) or just quote the short CTAN package description. – doncherry Mar 30 '12 at 11:33
  • @martin-heller Hi, I'm new to LaTeX, could be please an example for how to use it ? – SebMa Jun 19 '18 at 9:49
  • 1
    @SebMa please see the documentation: texdoc.net/pkg/silence . Simply call \WarningsOff[package] after loading the silence package to eliminate warnings from package. – Martin Heller Jun 19 '18 at 19:31

Rubber has (among other things) some filtering capabilities, and generally gives errors in a very compressed form. You can also tell it to give you only certain kinds of warnings using --warn=.

  • I haven't installed this yet, but I'll mark this as correct after I try it out. – Neil G Aug 6 '10 at 2:43
  • Please fix the link: rubber.sf.net – Jukka Suomela Aug 6 '10 at 7:51
  • 1
    Is it not true that rubber is fairly outdated? No release since 2006-03-17. I think mklatex is the way to go by now. – jmc Apr 3 '12 at 9:06
  • 1
    I'd recommend using latexmk being also part of MikTex and Texlive. – Hotschke May 15 '14 at 8:59
  • 1
    @NeilG — Feel free to do it yourself. (Currently I don't have the inspiration for a good review/recommendation of latexmk. But maybe later this week.) Also, I am in the process of studying arara (better late then never), and I have the feeling that it might deserve mention in an answer to this question. Currently I do not have the expertise yet to write a good answer. – jmc Aug 26 '14 at 11:48

I have used rubber-info and it is the best TeX error parser I have seen. The package is not actively maintained though. I have it report error through growl as in this screenshot:

TeX error report through growl

  • Great. Do I have to install rubber to get this to work, or can I just \usepackage something? – Neil G Aug 6 '10 at 7:27
  • Rubber is a Python script, not a Latex package. You install rubber and simply run "rubber -Wall foo.tex" instead of something like "pdflatex foo; bibtex foo; pdflatex foo". – Jukka Suomela Aug 6 '10 at 7:53
  • 1
    rubber is similar to latexmk. but you can use rubber-info to parse the log and continue using any compilation process you are using already. – Leo Liu Aug 6 '10 at 8:08
  • Great. I will check it out. I tried installing with macports, which lists Tex as a dependency, so I was avoiding the huge install: [~] port deps rubber: Library Dependencies: python26 Runtime Dependencies: texlive – Neil G Aug 6 '10 at 8:09
  • 5
    I ignore macports entirely. – Leo Liu Aug 6 '10 at 8:24

In order to neatly format the output, I created my own solution: pydflatex. You would compile a file with

pydflatex myfile.tex

And get an output along the lines of

pydflatex run

On top of giving a neat, condensed output, it will also hide the auxilliary files, so as not to clutter your folder.

Edit It is now also possible to run

pydflatex -l file.tex

which will parse an existing log without typesetting.

  • This looks pretty nice Olivier! However, I personally would prefer a more UNIX-like "one tool, one task" philosophy. So is it possible to get the output formatting only (without all that wrapper and cons stuff). That is, get a similar output by pdflatex file | pyformat or cat file.log | pyformat? – Daniel Mar 15 '12 at 7:54
  • I'm not sure I understand... what you describe is what pydflatex does, just typeset a document with pydflatex doc.tex instead of pdflatex doc.tex | pyformat. You will get a similar result. So pydflatex does only the formatting. (Independently from pydflatex, I advocate using scons to ensure that pdfLaTeX will be run sufficiently many times, the bibliography will be built, etc.) – Olivier Mar 15 '12 at 9:57
  • I do not want to use another tool for the typesetting, just for the output formatting, so I can easily plug it in existing generation processes (based on makefiles, different tex engines, ...). So in fact my process is some-tool-that-produces-pdflatex-like-log-output | pyformat. Furthermore, it would be great to filter already generate log files through it, that is, be able to do a cat file.log | pyformat. Generally speaking, this is about separation of concerns: Engine invocation is a concern that could (and should) be separated from output formatting, so both can be used independently. – Daniel Mar 15 '12 at 10:20
  • Ah, that makes sense. I will try to make that available with pydflatex (should be easy, because it is already what happens inside pydflatex, first execution, then log parsing). Good point. – Olivier Mar 15 '12 at 14:31
  • @Daniel I implemented (parts of) your suggestion in the new version of pydflatex. – Olivier Aug 24 '13 at 13:42

The modern solution is latexmk.

  • Is there any intermediate between -silent and -verbose? – Joel Hamme Mar 28 '16 at 20:04
  • @JoëlMeyer-Hamme I have no idea. Perhaps make another question? – Neil G Mar 28 '16 at 20:04
  • 1
    I'll keep looking. --interaction=batchmode looked promising but suppresses all warnings. – Joel Hamme Mar 28 '16 at 20:09
  • @JoëlMeyer-Hamme You could use and maybe modify an output parser like pplatex listed as another answer here. – Neil G Mar 28 '16 at 20:35

Consider also following tool:

Pretty Print LaTeX: pplatex

pplatex --cmd <yourlatexbinary> -q -- latexfile.tex

Based on the parser of kile.

Note about availability:
Not part of MikTex or TexLive and not contained in Debian/Ubuntu repositories and there is also no Mac OSX homebrew formula. However, custom installation is not difficult. Update 2016: links on github to pre-compiled binaries for linux-x64 and windows are available.


Having read the answers, I ended up with this lightweight solution:

pdflatex -interaction=nonstopmode paper.tex 1> log || cat log

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.