On 4 March 2015 at 16:25, Gavin Smith <[email protected]> wrote:
> I found another option to makeinfo that could be used to expand the
> macros: "-c DUMP_TEXI=1 --macro-expand=-" - this avoids generating
> Info output that is discarded, and reduces the amount of error
> messages related to document structuring. Unlike "-c
> TEXINFO_OUTPUT_FORMAT=plaintexinfo -o-" it will manage to output the
> macro expansion even if there is an error, like "menu before Top
> node". I think the "menu before Top node" error, if it is annoying,
> could be best dealt with by changes in the input Texinfo files to
> include the menu within the @ifnottex conditional.
Something like this gets rid of the pages of errors and warnings when
using "texi2dvi" on a larger Texinfo file, leaving just one or two
error messages.
Index: util/texi2dvi
===================================================================
--- util/texi2dvi (revision 6156)
+++ util/texi2dvi (working copy)
@@ -1275,7 +1275,7 @@
# happens with gettext 0.14.5, at least.
$SED "$comment_iftex" "$command_line_filename" \
| eval $makeinfo --footnote-style=end -I "$in_dir" $miincludes \
- -o /dev/null --macro-expand=- \
+ -c DUMP_TEXI=1 --macro-expand=- \
| $SED "$uncomment_iftex" >"$in_src"
# Continue only if everything succeeded.
if test $? -ne 0 \