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
    Commented Aug 6, 2010 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
    Commented Mar 30, 2012 at 1:15
  • 1
    Regarding the second part of the question: A separate question is available
    – Hotschke
    Commented May 15, 2014 at 11:36
  • related: tex.stackexchange.com/questions/198583/…
    – user6853
    Commented Sep 1, 2014 at 3:28
  • @BenCrowell: duplicate?
    – Neil G
    Commented Sep 1, 2014 at 6:13

14 Answers 14


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.

  • 1
    (Note: this is the answer to (only) the "also" part of the question. For the answer to the main question, see other answers below.)
    – user202729
    Commented Nov 12, 2021 at 7:45
  • This does not seem to work with lualatex
    – Nasser
    Commented Apr 15, 2022 at 16:22
  • Recent versions of bibtex now read the max_print_line environment variable and report 3 is a bad bad if it is >= 20000, the hard-coded initial value of BUF_SIZE. tug.org/svn/texlive/trunk/Build/source/texk/web2c/… Commented Jan 4 at 22:21

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
    Commented Jan 4, 2014 at 12:01
  • At least MikTeX requires the commandline parameter to be -interaction=batchmode (no whitespace separator).
    – Twonky
    Commented May 15, 2017 at 10:23
  • 1
    but -interaction batchmode also do not show compile errors! which is not good.
    – Nasser
    Commented Apr 15, 2022 at 16:10

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

  • 7
    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
    Commented Aug 5, 2010 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
    Commented Aug 6, 2010 at 5:45
  • 5
    +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
    Commented Mar 30, 2012 at 11:33
  • @martin-heller Hi, I'm new to LaTeX, could be please an example for how to use it ?
    – SebMa
    Commented Jun 19, 2018 at 9:49
  • 3
    @SebMa please see the documentation: texdoc.net/pkg/silence . Simply call \WarningsOff[package] after loading the silence package to eliminate warnings from package. Commented Jun 19, 2018 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
    Commented Aug 6, 2010 at 2:43
  • Please fix the link: rubber.sf.net Commented Aug 6, 2010 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
    Commented Apr 3, 2012 at 9:06
  • 1
    I'd recommend using latexmk being also part of MikTex and Texlive.
    – Hotschke
    Commented May 15, 2014 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
    Commented Aug 26, 2014 at 11:48

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.

  • 1
    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
    Commented Mar 15, 2012 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
    Commented Mar 15, 2012 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
    Commented Mar 15, 2012 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
    Commented Mar 15, 2012 at 14:31
  • 2
    @Daniel I implemented (parts of) your suggestion in the new version of pydflatex.
    – Olivier
    Commented Aug 24, 2013 at 13:42

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
    Commented Aug 6, 2010 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". Commented Aug 6, 2010 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
    Commented Aug 6, 2010 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
    Commented Aug 6, 2010 at 8:09
  • 5
    I ignore macports entirely.
    – Leo Liu
    Commented Aug 6, 2010 at 8:24

The modern solution is latexmk.

  • 1
    Is there any intermediate between -silent and -verbose?
    – user34010
    Commented Mar 28, 2016 at 20:04
  • @JoëlMeyer-Hamme I have no idea. Perhaps make another question?
    – Neil G
    Commented Mar 28, 2016 at 20:04
  • 1
    I'll keep looking. --interaction=batchmode looked promising but suppresses all warnings.
    – user34010
    Commented Mar 28, 2016 at 20:09
  • @JoëlMeyer-Hamme You could use and maybe modify an output parser like pplatex listed as another answer here.
    – Neil G
    Commented Mar 28, 2016 at 20:35
  • errors - Use latexmk to filter the log file - TeX - LaTeX Stack Exchange ... but it doesn't have any solution that too late uses latexmk.
    – user202729
    Commented Nov 13, 2021 at 1:47

This is a comparison of the existing methods (plus a new suggestion by me below)

If you come across this question, you most likely want to quickly find the parts that you're interested in in the log file/output.

(the question itself only concern terminal output (stdout), but the errors/messages are in both the log file and terminal)

In my experience, the parts that you're possibly interested in are

  • (most frequent) The errors raised by TeX.
  • (less frequent, only if you do some TeX programming) Debug error messages printed by \show, \showtokens, \tl_show:n, \regex_show:n or similar.
  • The warnings produced by TeX.
  • Whether it can parse an existing file. (so you don't need to change your existing compilation command)

The table below compares the tools, with respect to the conditions above. The first line is my new suggestion.

The file in (7) is used.

Tool On error On \show (3) On warning Parse log file
texfot cat a.log Configurable Configurable Continue Yes
pulp a.log Configurable ? Configurable Yes
xelatex a.tex Prompt (4) Prompt Continue No
xelatex a.tex < /dev/null Stop Stop Continue No
latexmk [-g] a.tex Stop Stop Continue No
texfot xelatex a.tex Stop Stop Continue Partial (6)
xelatex a.tex < <(yes "") Continue Continue Continue No
latexmk [-g] -latexoption=-interaction=nonstopmode a.tex Continue Continue Continue No
texfot xelatex -interaction=nonstopmode a.tex Continue Continue Continue Partial
xelatex -interaction batchmode Hide and continue Hide and continue Hide No
latexmk -silent [-g] -latexoption=-interaction=nonstopmode a.tex Hide and continue Hide and continue Hide No
xelatex -interaction batchmode with manual \nonstopmode ... \batchmode Hide and continue (1) Configurable Hide No
rubber-info a.tex Configurable Hide Configurable Yes
pplatex -i a.log (5) Configurable Hide Configurable Yes
silence package ? ? ? No
pydflatex a.tex ? ? ? ?

(1): The user could wrap it manually, but it requires knowing where the error is in the first place.
(2): About texfot --interactive xelatex a.tex: The flag doesn't have any effect, see pdflatex bash script to supress all output except error messages?
(3): The "Stop" case can always be converted to "Continue". See How can I make TeX stop on the first error, but do not stop on \show (or \tl_show:n)? (disclaimer: my question)
(4): See How can one stop LaTeX compilation? for what to do with the prompt.
(5): May requires compilation from source if the provided binary does not work. Supports cmake.
(6): "Partial" means being able to run the compiler with any option, but requires re-run to filter.
(7): The example file:



\def \a {123}
\show \a
\tl_show:N \a
\tl_analysis_show:n {123}

Some example formula x^2+1=0

Regardless of the method, because LaTeX log file is relatively unstructured, any solution that parses the log file is subject to error.

Looks like Pulp is not mentioned in the other answers. This is a quote from its README:

What is pulp?

Do you find LaTeX's output too voluminous? Do you wish it would get straight to the point and just tell you the errors and where they occurred? When you see this:

Underfull \hbox (badness 3679) in paragraph at lines 278--282
[]\OT1/cmr/m/n/12 Shin-Cheng Mu, Zhen-jiang Hu, and

Underfull \hbox (badness 10000) in paragraph at lines 318--323
[]\OT1/cmr/m/n/12 Yingfei Xiong,

) [279] (./paper.aux)

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 ) )
(\end occurred when \iftrue on line 2 was incomplete) 
Here is how much of TeX's memory you used:
 14398 strings out of 495035
 257795 string characters out of 6181701
 330613 words of memory out of 5000000
 17235 multiletter control sequences out of 15000+600000
 23715 words of font info for 95 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 66i,21n,72p,680b,1562s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on paper.pdf (285 pages, 1369913 bytes).
PDF statistics:
 1660 PDF objects out of 1728 (max. 8388607)
 1107 compressed objects within 12 object streams
 0 named destinations out of 1000 (max. 500000)
 224 words of extra memory for PDF output out of 10000 (max. 10000000)

...do your eyes automatically skip to the line about cross-references without conscious effort? Then you need pulp. Compare LaTeX's spew with what pulp has to say about that file:

./delta.tex:133-133: LaTeX warning: Float too large for page by 4.64713pt on input line 133.
./delta.tex:2649-2649: LaTeX warning: Float too large for page by 74.48848pt on input line 2649.
./delta.tex:3817-3817: LaTeX warning: Float too large for page by 99.13847pt on input line 3817.
./delta.tex:3923-3923: wrapfig warning: Collision between wrapping environments on input line 3923.
./delta.tex:3925-3925: wrapfig warning: Stationary wrapfigure forced to float on input line 3925.
./delta.tex:3951-3951: wrapfig warning: Collision between wrapping environments on input line 3951.
./delta.tex:3954-3954: wrapfig warning: Stationary wrapfigure forced to float on input line 3954.
./skeleton_dissertation.tex:36-?: LaTeX warning: Label(s) may have changed. Rerun to get cross-references right.
2-2: (\end occurred when \iftrue on line 2 was incomplete) 

Not only is the label warning more clearly highlighted, a number of other errors -- which were scrolled way the heck off the terminal ages ago if you were just using pdflatex -- are more clearly visible, together with information about which source file and line number caused the problem. (In fact, even messages which do not have a line number directly in them will have a "best guess" assigned to them by pulp to give you an idea of where in the file to start looking.)

  • Side note, texfot has the disadvantage that it does not show the full \errorcontextlines (only one line), so you can view the log later.
    – user202729
    Commented Aug 4, 2022 at 15:26
  • There are a few other ones e.g. texlogfilter although I haven't used it. Now I just use vimtex's built-in filtering.
    – user202729
    Commented Dec 22, 2023 at 7:52

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

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


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.


Today I got very tired of pdflatex trashing my console at each run.

So after too many years of compliance I wrote this script for my .bashrc.

# Compile tex file containing svg
svgtex () {
    pdflatex -shell-escape -halt-on-error -output-directory="out" \
        $1 1> /dev/null
    [[ $? = 0 ]] || echo `grep Error out/${$1/tex/log}`

I share it as OP asked for a script, and latexmk is not to be found on my distro. Defining a function in .bashrc works like an alias, except you can pass it arguments (e.g. filename=$1)

I pass the following options:

  • -shell-escape: required to include svg files, which my defense slides contain
  • -halt-on-error: stop killing the terminal by hanging in batchmode or whatever
  • -output-dir: stop trashing the source directory with .nav .toc .out .log .aux .snm files... am I forgetting any?

I just use it as svgtex file.tex and no output is produced.

N.B. Although only stdout is redirected to /dev/null, no error messages are printed in case of failure, so it seems pdflatex does not use stderr. Hence the last line to check the return code pdflatex and print only error lines.

You can always do less out/file.log if you want to know all about it.


On GNU/Linux I've found texfot to be the most reliable, and it comes packaged with TexLive. It filters the output of the command you pass it:

texfot pdflatex …options your-document.tex

See this answer for more details.


As mentioned in other answers, there are many tools that may help with this. I have recently uploaded texlogsieve to CTAN, which is my own attempt at a texlua script to filter the LaTeX log file. I like it :) . The main selling points are

  1. Lots of options to choose what to show/hide;
  2. Reliable line unwrapping;
  3. Multi-line messages are treated as a single entity.

Note that it does not treat error messages specially (they are just dumped to the output together with the other unfiltered messages). Still, calling texlogsieve -l unknown --no-page-delay --no-shipouts --no-summary LOGFILE should give you something very close to "only error messages".


You can use ltx2any to compile your document. This will not only compile your document, but also produce a summary of errors and warnings:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .