Next: ‘#line’ Syntax Details, Previous: ‘#line’ Directive, Up: External Macro Processors: Line Directives [Contents][Index]
As mentioned, makeinfo
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 makeinfo
’s macro expansion options before running
TeX. There are three approaches:
texi2dvi
or its variants (see Format with texi2dvi
), you can pass -E and texi2dvi
will run makeinfo
first to expand macros and eliminate
‘#line’.
makeinfo
or its variants (see texi2any
: The Generic Translator for Texinfo), you can specify --no-ifinfo
--iftex -E somefile.out, and then give somefile.out to
texi2dvi
in a separate command.
makeinfo
will then call
texi2dvi -E
.
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. This is another example of why we recommend running
makeinfo
for the best diagnostics (see makeinfo
Advantages).