Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Sep 2008 14:16:12 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m8ICG3r1012832 for ; Thu, 18 Sep 2008 14:16:06 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id m8ICBTl7019016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Sep 2008 14:11:30 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id m8HM1hNj005980; Thu, 18 Sep 2008 14:11:27 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 45424 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 18 Sep 2008 14:11:26 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id m8ICBQBj004309 for ; Thu, 18 Sep 2008 14:11:26 +0200 Received: from mailgate5.uea.ac.uk (mailgate5.uea.ac.uk [139.222.130.185]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id m8ICBBDP018703 for ; Thu, 18 Sep 2008 14:11:15 +0200 Received: from [139.222.128.187] (helo=ueams04.uea.ac.uk) by mailgate5.uea.ac.uk with esmtp (Exim 4.50) id 1KgILo-0000A8-Kw for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 18 Sep 2008 13:11:12 +0100 Received: from [139.222.200.93] by ueams04.uea.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1KgILo-0007JW-Jp for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 18 Sep 2008 13:11:12 +0100 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 References: <48D22952.9000204@morningstar2.co.uk> <27990a880809180405v7d5b816fk93b12cd51c6f442e@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID: <48D24561.9000901@morningstar2.co.uk> Date: Thu, 18 Sep 2008 13:11:13 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: \char_set_catcode:nn To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <27990a880809180405v7d5b816fk93b12cd51c6f442e@mail.gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.599 () BAYES_00 X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 18 Sep 2008 12:16:12.0178 (UTC) FILETIME=[56F2F720:01C91988] Status: R X-Status: X-Keywords: X-UID: 5352 Will Robertson wrote: > On Thu, Sep 18, 2008 at 7:41 PM, Joseph Wright > 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_: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