LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced 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:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 18 Sep 2008 20:35:13 +0930
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
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

ATOM RSS1 RSS2