16.7.2 ‘#line’ and TeX

As mentioned, texi2any recognizes the ‘#line’ directives described in the previous section. However, texinfo.tex does not and cannot. Therefore, such a line will be incorrectly typeset verbatim if TeX sees it. The solution is to use texi2any’s macro expansion options before running TeX. There are three approaches:

One last caveat regarding use with TeX: since the #line directives are not recognized, the line numbers emitted by the @errormsg{} command (see Conditional Commands), or by TeX itself, are the (incorrect) line numbers from the derived file which TeX is reading, rather than the preprocessor-specified line numbers.