[XeTeX] newcommand with optional arguments

Morten Høgholm morten.hoegholm at latex-project.org
Tue Mar 4 08:58:42 CET 2008


On Mon, Mar 3, 2008 at 10:30 PM, Ross Moore <ross at ics.mq.edu.au> wrote:

> A more bullet-proof approach is:

*The* bulletproof (and purely expandable) method of testing whether an
argument is empty is this:

\long\def\tlist at if@empty at nTF #1{%
  \expandafter\ifx\expandafter\\\detokenize{#1}\\%
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}

See l3tlp.dtx for details. It also contains a bullet-proof test for
testing if an argument is blank.

Just my 2 øre,
-- 
Morten


More information about the XeTeX mailing list