Is there a way to run pdflatex such that it outputs only the warning messages?
Thanks.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communitypdflatex
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).
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:
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