[tex-eplain] \optionalarg delimitation

Oleg Katsitadze olegkat at gmail.com
Fri May 15 19:11:13 CEST 2009


On Fri, May 15, 2009 at 06:28:41PM +0100, Rodolfo Medina wrote:
> .  From the above example you can see that the only way to avoid a plus-space
> after `\myhallo' seems to put a `%' after it: \myhallo[i]%.

I may be misunderstanding something, but why not do something like
this:

    \def\@myhallo{%
      Hallo,%
      \ifx\@optionalarg\empty
      \else \bgroup\definexref{\@optionalarg!}{}{}\egroup
      \fi
    }

Or, if you are worried that \definexref is now attached to "Hallo,"
instead of the following word, try this:

    \def\@myhallo{%
      Hallo,
      \ifx\@optionalarg\empty
      \else \bgroup\definexref{\@optionalarg!}{}{}\egroup
      \fi
      \ignorespaces
    }

Oleg


More information about the tex-eplain mailing list