LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 14 Sep 2008 08:19:10 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
Hello,

It might be handy to have a check to see if a value is any quark, for
"make safe" code. So far, I've ended up with:

\def_new:Npn \if_quark:NT #1 {
  \exp_after:NN \exp_after:NN \exp_after:NN \if_quark:w
    \exp_after:NN \token_to_string:N #1 \q_stop
}

\def_new:Npn \if_quark:wT #1#2#3\q_stop {
 \int_compare:nNnT {\char_value_uccode:n{#2}} = {`Q}
}

which seems to work but I'm worried may not be suitable more generally.
 Any ideas?
-- 
Joseph Wright

ATOM RSS1 RSS2