[texinfo-pretest] conditional macros problem

Karl Berry karl at freefriends.org
Sun Feb 13 17:59:37 EST 2005


    @le and @ge for correct mathematical spacing.

Drat.  I wondered about that.  Ok, back on the list it goes.

    I can't see an advantage to define a macro which eats the space
    after it.

I agree, and I was imagining that braces would always be required, both
for the definition and the call.
    
    Or do you mean something different?

Yes, I mean something like this:
@newmacro @mymac {
line1
line2
@quotation
whatever
@end quotation
}

The problem is that commands like @quotation are delimited by an ^^M
char, so ^^M will have to be active when the @newmacro definition is
read.  But ^^M shouldn't always mean a new line, of course -- e.g., the
one after line1.  I'm not sure exactly what the implications are, but I
doubt it will be fun.

Interaction with conditionals will also probably be near-impossible.
Sigh.

But here's the real stumper for me: how to handle calling macros when
there's more than one arg.  Usual Texinfo convention is the stupid comma
separation, as in @bigmac{actual1,actual2,actual3}.  This is not easily
parsable with TeX, but we definitely want to use TeX's builtin argument
parsing or we'll be nearly as bad off as we are now.  The closest we can
come is delimited args:
@newmacro @bigmac @arg1, at arg2, at arg3{...whatever...}

Which could be called like @bigmac actual1,actual2,{actual3} ...
not really nicely integrated with the rest of the language, or fun to
implement in makeinfo.  Well, maybe we can strip off outer braces
at each call and let TeX do the rest.

Just have to set it up and do some testing, I guess.

Cheers,
karl


More information about the texinfo-pretest mailing list