I have this orignal file
%file simples.tex
\documentclass[12pt]{report}
\begin{document}
\end{document}
which I want to compile. During compilation via pdflatex simple.tex there is output shown and I would like to be informed about at which line (point) the compilation is.
To make it clear I would like a feature like this
\typeout{line1}%file simples.tex
\typeout{line2}\documentclass[12pt]{report}
\typeout{line3}\begin{document}
\typeout{line4}\end{document}
which would output line1,line2,line3..... linen during the compilation.
I have made myself some shell script to inject those \typeout{line#} into a temporary copy of my .tex file.
My question, is there are pdflatex tex native way to output (or echo) what is currently done?
Motivation and background
People (imho rightly) complain that tex's output in case of errors is rather cryptic, which is because there is not always a guarantee that the output features a line number of where the error has been caused, but where the error eventually caused a problem, so it would benefit me greatly that at an error prompt I could always see in which line the compilation has last been.
- a resulting pdf file simple.pdf
- output to the console
- a simple.log file
Is there away to include in the output each source file line before it becomes evaluated during the compilation process?
\the\inputlinenoto get the line number of the current file (which is the number that would be used in l.xxx if an error occurred at that point) – David Carlisle Aug 14 '16 at 18:31\processoptionskvquestion the error is reported at the line number of processoptionskv as tex has not yet read the rest of the package. – David Carlisle Aug 14 '16 at 18:33\the\inputlinenodoesn't seem to work with macros,which is exactly how I need to use it... and I do not want simple printing out but I need to record them(in lualatex) and know them relative to my macro and the current page. It's such an easy thing but tex makes it so hard... seems to be typical of how tex works ;/ – AbstractDissonance Feb 07 '17 at 08:08\include. Page = 1, Line = 71 [1] Page = 2, Line = 71 [2] --Caching starts here Page = 3, Line = 3 [3] Page = 4, Line = 5 [4] Page = 5, Line = 5 [5]) Page = 6, Line = 2 [6] Page = 7, Line = 2 --Caching ends here [7] Page = 8, Line = 81 [8] Page = 9, Line = 81 [9] Page = 10, Line = 83 [10] Page = 11, Line = 85.It works fine when the caching does not take place. Which simply means I insert the code in place rather than dump it to a file and use
– AbstractDissonance Feb 07 '17 at 11:30\include.\inputlinenoisn't affected by\include(other than the obvious effect that it refers to lines in the other file) but as I said above it relates to where tex has got to in the source files, and only has a slight accidental connection to the page any text gets typeset on in the end, but this isn't a discussion forum there are far too many comments here and the system will start objecting soon:-) – David Carlisle Feb 07 '17 at 12:12