I am compiling a latex document, and when I have errors, I get nice messages like
l.1041 \end{frame}
which tells me that there is an error somewhere before line 1041. So far, so good. I can use my text editor and quickly find line 1041.
But sometimes I have a latex document (say, main.tex
) that includes something like
\input{../my_headers}
at the beginning of the file. Now if latex tells me there is an error on line 1041, it is referring to the source code consisting of main.tex
with my_headers.tex
inserted into it. So if I edit the actual file main.tex
, line 1041 doesn't correspond to the error location. The location I want is 1041 minus the number of lines in my_headers.tex
.
So, I can manually calculate it, or make a script, but it seems like there must be a simple option to tell latex to ignore the input/include files when calculating line numbers.
Any ideas?
-file-line-error
to the call of the typesetting engine. How you do it depends on the way you use for launching the typesetting. However, the line number always refer to the current file being read in.pdflatex
), and turning it on makes no difference.