Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Fri, 19 Sep 2008 22:22:46 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m8JKMaxd030136 for ; Fri, 19 Sep 2008 22:22:37 +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 m8JKIa5B010448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Sep 2008 22:18:36 +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 m8J9KBg6003767; Fri, 19 Sep 2008 22:18:27 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 41890 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 19 Sep 2008 22:18:27 +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 m8JKIRS9001183 for ; Fri, 19 Sep 2008 22:18:27 +0200 Received: from av11-2-sn2.hy.skanova.net (av11-2-sn2.hy.skanova.net [81.228.8.184]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id m8JKIE1p010285 for ; Fri, 19 Sep 2008 22:18:18 +0200 Received: by av11-2-sn2.hy.skanova.net (Postfix, from userid 502) id 5420838BAC; Fri, 19 Sep 2008 21:27:24 +0200 (CEST) Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av11-2-sn2.hy.skanova.net (Postfix) with ESMTP id 1FB2138B92 for ; Fri, 19 Sep 2008 21:27:24 +0200 (CEST) Received: from [192.168.1.3] (h61n3c1o260.bredband.skanova.com [81.231.34.61]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id 019C037E47 for ; Fri, 19 Sep 2008 21:27:23 +0200 (CEST) User-Agent: Thunderbird 1.5.0.14 (Macintosh/20071210) MIME-Version: 1.0 References: <48D3BE95.3080706@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <48D3FD1B.4090701@residenset.net> Date: Fri, 19 Sep 2008 21:27:23 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?ISO-8859-1?Q?Lars_Hellstr=F6m?= Subject: Re: Saving and restoring catcodes To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <48D3BE95.3080706@morningstar2.co.uk> 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: 19 Sep 2008 20:22:46.0985 (UTC) FILETIME=[7AD2BB90:01C91A95] Status: R X-Status: X-Keywords: X-UID: 5374 Joseph Wright skrev: > Hello all, > > In TeX, to save a series of catcodes one might do something like: > > \edef\savedcatcodes{% > \catcode\string`\string ` \the\catcode\string`\`\relax > \catcode\string`\string = \the\catcode\string`\=\relax I'd suggest using \number`= instead of \string`\string=. The `'s are just so that you don't have to remember the ASCII codes of characters, but decimal digits survive expansion better. In fontinst, a similar macro is defined as follows: \def\a_macro#1{\catcode\number`#1=\the\catcode`#1 } \edef\normalcc{% \a_macro{\ }\a_macro{\^^M}\a_macro{\@}\a_macro{\_}\a_macro{\~} } The \normalcc macro ends up expanding to \catcode32=9 \catcode13=5 \catcode64=12 ... which should be easier to translate. Lars Hellström