Sender: |
|
Date: |
Thu, 18 Sep 2008 20:35:13 +0930 |
Content-Disposition: |
inline |
Reply-To: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
|
Content-Type: |
text/plain; charset=UTF-8 |
From: |
|
Parts/Attachments: |
|
|
On Thu, Sep 18, 2008 at 7:41 PM, Joseph Wright
<[log in to unmask]> wrote:
>
> I was wondering about \char_set_catcode:nn. The docs don't say if the
> character has to be escaped or not, although I assume it does.
You're right that should be documented better. Right now this command
is equivalent to
\catcode #1 = \numexpr #1\relax
Not that you're going to be using the \numexpr very often!!
So it's actually looked for a number for its first argument. So I
don't see why the next sentence (of the docs) says to use the :w form
if you're using braces!
I guess we need to write another function that does a `\csname
#1\endcsname --type thing (if that's robust enough) under the name
\char_set_catcode:Nn.
> Also, any plans to have any shortcuts of the \@makeother type?
Well, depends what you have in mind :)
I don't see why not...something like \char_set_catcode_other, I
suppose. I actually quite like ConTeXt's approach (what little I know)
of giving names to the catcode classes. So perhaps instead of the
above, we could write
\char_set_catcode:nn {`\%} {\g_catcode_other}
Nah, actually. I prefer
\char_set_catcode_other:n {`\%}
Will
|
|
|