I'm working on a large LaTeX document (over 1000 pages). I'm using \include liberally, and there are 47 .tex files in play. At the end of the run I get these diagnostics:
(\end occurred when \iftrue on line 366 was incomplete)
(\end occurred when \ifnum on line 366 was incomplete)
The version of TeX I'm using announces itself as follows:
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=latex 2015.5.11) 29 DEC 2015 17:28
My question: how do I find the offending command? I've used Awk to print line 366 of each .tex file in the directory, but none of these files seem to have any kind of conditionals there. I've also looked in the .aux files. Local .sty files are not in play because none of them is 366 lines.
Where should I be looking? What should I be looking for? Is there a way to persuade TeX to disgorge the name of the offending file and not just the line number? Perhaps some luatex trickery?
(I don't know how to provide a minimal example. If I did, I probably could solve the problem.)
\newcommandin your preamble (and it has a mistake), and then you use that same command in line 300, then your error will appear on line 300, but it's actually originating in your\newcommanddefinition in the preamble. – Alenanno Dec 29 '15 at 22:46