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
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 19 Sep 2008 21:27:23 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1; format=flowed
From:
Lars Hellström <[log in to unmask]>
Parts/Attachments:
text/plain (25 lines)
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

ATOM RSS1 RSS2