Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!ira.uka.de!ifistg!ifi!mattes From: mattes@azu.informatik.uni-stuttgart.de (Eberhard Mattes) Newsgroups: comp.text.tex Subject: Re: Problem with TeX character codes Message-ID: Date: 8 Feb 91 13:52:08 GMT References: <1991Feb7.112203.12456@polaris.utu.fi> Sender: news@ifistg.uucp Organization: IfI, Univ. Stuttgart, W Germany Lines: 49 In-reply-to: knuutila@tucos.utu.fi's message of 7 Feb 91 11:22:03 GMT Timo Knuutila wrote: > I have a scandinavian keyboard with special keys for the accented scandinavian > letters (\"a, \"o, \"A, \"O, \aa, \AA) and I'm trying to map these to the > corresponding PostScript character codes. In what follows, suppose that > x, y, X and Y stand for the characters of a-, o-, A- and O-umlaut, > respectively. Here's a file which I used for testing. It tries to work correctly even with circular references like A -> B B -> A which will cause an infinite loop or both A and B being replaced with B (eg) if a simpler method were used. The method below should work correctly with \hyphenation and \write. ----------------------------- test.tex -------------------------------------- {\catcode`^^e3\active \global\let^^e3=^^e4} {\catcode`^^e4\active \global\let^^e4=^^e3} % more redefinitions \catcode`^^e3\active \catcode`^^e4\active % more active characters % for \hyphenation \lccode`^^e4=`^^e4 % this should print ^^e3^^e4 \message{^^e3^^e4} % this shouldn't give an error message \hyphenation{^^e3-a} % this should write ^^e4 to test.aux \openout1 test.aux \write1{^^e4} \closeout1 % this should write ^^e4^^e3 to test.dvi \font\tendmr=dmr10 \tendmr ^^e3^^e4 \bye --------------------------end of test.tex ------------------------------------ -- Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de)