[texhax] testing if a control sequence is primitive

Vafa Khalighi vafaklg at gmail.com
Sat Oct 8 17:20:20 CEST 2011


Thanks. but I should also add that there is one more requirement. If \cs is
primitive but also redefined, e.g. \par or \input in LaTeX, it should return
Macro not primitive like:

\ifprimitivecs{par}{Primitive}{Macro}

should return macro. Can \token_if_primitive:NTF do that?

On Sun, Oct 9, 2011 at 2:13 AM, Philipp Stephani <p.stephani2 at googlemail.com
> wrote:

> 2011/10/8 Vafa Khalighi <vafaklg at gmail.com>:
> > How can you test if a control sequence is primitive or not?
>
> See the function \token_if_primitive:NTF in l3token (documentation is
> in source3.pdf) for a possible solution.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111009/589fe7ac/attachment.html>


More information about the texhax mailing list