[tex-eplain] [solved] Re: Position of optional argument

Oleg Katsitadze olegkat at gmail.com
Wed Apr 29 05:52:44 CEST 2009


On Tue, Apr 28, 2009 at 06:41:13PM +0100, Rodolfo Medina wrote:
> > ...But still, something strange: I can't put the \@optionalarg in
> > \definexref, and I need to:
> >
> > \input /home/rodolfo/macros/eplain-3.2
> >
> > \catcode`@=\letter
> > \def\mymacro#1{%
> >   \def\temp <at> arg{#1}%
> >   \@getoptionalarg\@mymacro}
> >
> > \def\@mymacro{%
> >   \ifx\@optionalarg\empty
> >   \else
> >     \definexref{\@optionalarg}{label}{}
> >   \fi
> >   \temp <at> arg
> > }
> >
> > \mymacro{John}[Mary]
> >
> > \bye
> >
> >
> > There are problems, as one can see processing the above example with tex or
> > pdftex.
> 
> 
> It seems that the problem disappears when closing \definexref in braces:
> 
>  {\definexref{\@optionalarg}{label}{}}

Works for me without braces, both with tex and pdftex, and with Eplain
3.1 and 3.2.

Oleg


More information about the tex-eplain mailing list