4

Is there a way to run pdflatex such that it outputs only the warning messages?

Thanks.

1
  • 2
    On my system pdflatex --help gives the available options for pdflatex and what you are asking for is not listed as an option. On the other hand,pdflatex --interaction=nonstopmode <filename> | grep Warning would do roughly want you want on a unix-like system (I have no idea if there is a similar command for windows). – user30471 May 23 '17 at 10:58
1

pdflatex does not seem to support only outputting warnings.

Using pdflatex --interaction=nonstopmode <filename> | grep Warning (due to @Andrew) has the disadvantage of cutting off warnings that span across multiple lines.

Instead, I am currently using this command:

pdflatex --interaction=nonstopmode <filename> | awk 'BEGIN{IGNORECASE = 1}/warning|!/,/^$/;'

It runs pdflatex in nonstopmode (continues on errors), and then filters the output using awk. The filter captures warning (case insensitive) and exclamation marks (sometimes used to indicate an error).

1

To get a list of all warnings in your document, you could use the building ltx2any. It parses the .log file and creates neat list with all error messages and warnings in different file formats.

One example of what such a list can look like:

enter image description here

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.