bug-texinfo
[Top][All Lists]
Advanced

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

Re: @math alternative


From: Werner LEMBERG
Subject: Re: @math alternative
Date: Mon, 29 Apr 2002 10:24:52 +0200 (CEST)

> > > > Using the --iftex option fails, of course:
> > > 
> > > Of course.  Did you try to use @tex instead of @iftex?
> > 
> > This doesn't help.
> 
> It doesn't?  What Texinfo source did you try, and what did makeinfo
> moan about?  Your example, slightly modified below, works for me.

Have you actually run tex on the produced file?

> > Hmm, I now believe what I really need is this:
> > 
> >   @atom{foo}
> > 
> > After this command, makeinfo accepts @foo{...} as if it were a
> > built-in command but ignoring it completely.
> 
> If by ``ignoring'' you mean that it should leave it alone in
> macro-expanded source, then try this:
> 
>   @alias angles = r
> 
> or something similarly no-op'ish, like
> 
>   @alias angles = w

This sounds like a good idea, but how shall this work?  @alias is
interpreted by texinfo.tex also.  My @atom would be a no-op in TeX --
the user had to provide a proper definition for `atomized' commands.

> Here's an example that works for me with "makeinfo --iftex":
> 
>   \input texinfo
> 
>   @setfilename yyy
> 
>   @ifnottex
>   @macro angles{text}
>   <\text\>
>   @end macro
>   @end ifnottex
> 
>   @tex
>   @macro angles{text}
>   \\angleleft \text\ \\angleright
>   @end macro
>   @end tex
> 
>   This is a @angles{test}.
> 
>   @table @asis
>   @item This is a @angles{test}.
>   @end table
> 
>   @bye

Saying `makeinfo -E zzz --iftex yyy.texinfo', I get this in `zzz':

  \input texinfo

  @setfilename yyy

  @ifnottex
  @macro angles{text}
  <\text\>
  @end macro
  @end ifnottex

  @tex
  @end tex

  This is a \angleleft test \angleright.

  @table @asis
  @item This is a @angles{test}.
  @end table

  @bye

This fails for two reasons: `\angleleft' and `\angleright' should be
@angleleft and @angleright, respectively.  And @angles is undefined.
Even worse, I can't do this:

  @tex
  \def\angles#1{...}
  @end tex

makeinfo complains about the braces.

Sigh.  Until now, I couldn't find a better solution than my @atom
suggestion.

BTW, why is @tex ... @end tex expanded by --iftex also?  First, it is
not logical, since --iftex strongly resembles @iftex and not @tex.
Second, it makes it impossible to define something which is seen by
TeX but ignored by makeinfo (this makes my @atom suggestion work for
macros defined in texinfo.tex only).  I suggest to make --iftex really
handle only @iftex.  Since it isn't documented yet I see a possibility
to revert that decision.


    Werner



reply via email to

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