I am wondering if there is a bash tool available that I can pipe my latex output through and retrieve a more user-friendly output (i.e. file and line number of error). Currently, I am using a bash script to run pdflatex and bibtex. I develop in Atom and don't want to use any of the graphical Latex editors.
Asked
Active
Viewed 71 times
2 Answers
2
There is ltx2any which will not only automatically compile your latex document but also produce a beautiful summary of any warnings and error messages (several different file formats are available). An example of the output from its website:
See https://github.com/reitzig/ltx2any for more information
Cuniye Datacu
- 272
2
It is easier to find the line numbers if you use --file-line-error then given bb831.tex looking like
\documentclass{article}
\begin{document}
aaaa \zzzzz
bbbb }
\end{document}
The bash command line
pdflatex -interaction=scrollmode --file-line-error bb831 | grep -A2 '^\.[^\.]*\.tex:'
produces terminal output of just
./bb831.tex:6: Undefined control sequence.
l.6 aaaa \zzzzz
./bb831.tex:9: Too many }'s.
l.9 bbbb }
David Carlisle
- 757,742
