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:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 18 Sep 2008 13:11:13 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
Will Robertson wrote:
> 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!!

No, that seems a little odd: I assume there is some reason for this.

>> 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 {`\%}


I'd suggest:

\char_make_letter:n
\char_make_other:n
\char_make_comment:n
\char_make_ignore:n
\char_make_active:n

as the obvious choices.  If people (e.g. me) want to mess with making
things into maths shift, superscript, etc., characters they probably
know they will need to do things by hand.  On the other hand, a complete
set of functions might be more consistent and easier to read down the
line.  Any thoughts?  As expl3 already has \token_if_<whatever>:NTF, I'd
say the ConTeXt approach is probably overkill.

However it's done, a clue for existing coders on \@makeother would be
sensible.  I do quite a lot of searches through the code for TeXnotes on
existing macros, and this is one I'd expect to find.
-- 
Joseph Wright

ATOM RSS1 RSS2