texinfo-devel
[Top][All Lists]
Advanced

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

Re: @value an user macro expansions in ignored @inline*?


From: Patrice Dumas
Subject: Re: @value an user macro expansions in ignored @inline*?
Date: Thu, 5 Sep 2013 00:05:52 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Tue, Sep 03, 2013 at 11:21:38PM +0000, Karl Berry wrote:
>     I can't see why ignored @inlineraw wouldn't have side effects, while
>     ignored @inlinefmt would have.
> 
> I certainly agree in principle.  Can you show me an example so I can
> check TeX?  My expectation is that the ignored text has to be
> syntactically valid (e.g., no unmatched braces) but doesn't have side
> effects.

Actually, I just tested with

\input texinfo.tex

@setfilename g.info

@node Top
@top top

@macro mymacro{}
aaa
@end macro

@inlinefmt{html,
@unmacro mymacro
@macro mymacro{}
ggg
@end macro
}

@inlinefmt{tex,
@unmacro mymacro
@macro mymacro{}
hhh
@end macro
}


@mymacro{}

but TeX doesn't like it:

./g.texi:24: Missing @endcsname inserted.
<to be read again> 
                   @let 
@recursivefalse ->@let 
                       @ifrecursive address@hidden 
@macro ->@recursivefalse 
                         @parsearg @macroxxx 
<argument> mymacro @macro 
                          mymacro{} hhh @end macro @fi 
@\unmacro #1->@if address@hidden ismacro.#1
                                     @endcsname @global @cslet
{#1}{macsave....
l.24 }
      

>     The second issue is about @value and user defined macro expansions.
>     Is it really right to have those expanded in ignored @inline*?  
> 
> No expansion sounds like the right thing to do.
> 
>     What does TeX do?
> 
> I think it is just thrown away, no expansion.
> Can you show me the example?

I con't really imagine an example that shows something for TeX, as TeX
does not allow fancy stuff that could help test whether value or macros
are expanded.  Here is an example for texi2any, but that is certainly
invalid for TeX:

@set closebrace }

@inlinefmt{html,
truc @value{closebrace}
machin

-- 
Pat



reply via email to

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