Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!ifistg!raichle From: raichle@informatik.uni-stuttgart.de (Bernd Raichle) Newsgroups: comp.text.tex Subject: Re: (Another) puzzler for wannabe wizards -- (Another) Solution Message-ID: Date: 11 Jun 91 09:59:46 GMT References: Sender: news@ifistg.uucp Reply-To: raichle@azu.informatik.uni-stuttgart.de Distribution: comp Organization: Informatik, Univ. Stuttgart. W.Germany Lines: 30 In-reply-to: raichle@informatik.uni-stuttgart.de's message of 5 Jun 91 10:56:23 GMT I'm very impressed on the solutions.... Thanks to all. But nobody thought of a very simple mechanism... \begingroup \catcode`\*=\active \catcode`\"=12 \uccode`\*=`\" \uppercase{\endgroup \def*{"}}% And in a generalized macro: \begingroup \catcode`\*=\active \catcode`\+=12 \gdef\makenonactive#1{\begingroup \uccode`*=#1\relax \uccode`+=\uccode`* \uppercase{\endgroup \def*{+}}} \endgroup With this macro you can locally redefine a (possible) active character to expand to its non-active counterpart, e.g. \makenonactive{`"} redefines the active " to expand to a non-active ". (Note: \makenonactive{0} does *not* work...) -bernd __________________________________________________________________________ Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source privat: Stettener Str. 73, D-7300 Esslingen | de malentendus" email: raichle@azu.informatik.uni-stuttgart.de | (A. de Saint-Exupery)