bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo macros and m4


From: Karl Berry
Subject: Re: Texinfo macros and m4
Date: Sat, 3 Sep 2011 22:44:22 GMT

    note the crucial detail that plagued "makeinfo -E": the macro
    expansion must know about @ifset/@ifclear, and only expand those
    parts that the user expects.  So a completely external solution will
    probably not DTRT.

I don't see it.  It seems to me it is exactly the other way around: a
completely external solution is the only thing that *can* be reliable,
because attempting to parse @ifXYZ will end up being tantamount to
parsing the entire document.  Attempting to handle this is one of the
things which made makeinfo -E (and texi2dvi -E) useless.

It seems to me it can be handled by documents that need to do so.

define([[mymac]], [[dnl
@iftex
do something for tex $1
@end iftex
@ifnottex
another thing for everything else $2
@end ifnottex
]])dnl

mymac([[texstuff]], [[nontexstuff]])

.. you get the idea ... attempting to integrate anything like this into
the Texinfo language just seemed like a doomed repetition of the same
failure to me.

(I'm randomly using [[...]] for m4 quoting here, of course.)


I really want an external solution, for all the reasons that have been
discussed.  I am not attached to m4 specifically, but I don't see any
better candidate.

k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]