[NTG-context] uppercasing accented characters, mappings and \WORD

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu Aug 4 16:44:45 CEST 2005

Taco Hoekwater wrote:
> This works (but it is a bit ugly)
> \def\WORD#1{%
>    \bgroup
>    \the \everyuppercase
>    \let \smallcapped \firstofoneargument
>    \let \WORD \firstofoneargument
>    \pushmacro \dohandleaccent
>    \pushmacro \dohandlecommand
>    \pushmacro \dohandlecharacter
>    \keepencodedtokens
>    \edef\tempa{#1}%
>    \popmacro \dohandleaccent
>    \popmacro \dohandlecommand
>    \popmacro \dohandlecharacter
>    \expandafter \uppercase \expandafter {\tempa}%
>    \egroup }

Thank you, Taco!

I cannot judge about the elegance of the solution as I have never seen
any elegant TeX macro definitions :), but it works (at least on my
examples) which is the most important part. Also the cp1250 regime
(where no mappings were defined) is now happy with it :)

Just for fun, I also tried it on greek (just copy-pasted some letters
from http://www.unics.uni-hannover.de/nhtcapri/multilingual1.html). It
doesn't work there, but I didn't even expect it to work as I should
probably provide the proper fonts and encodings first anyway. I've
seen some strange Greek stuff a while ago, which could have been
definitions of capitals, but as I neither understand Greek nor "TeX",
I can't judge about it.

> do you have a zipped example?

Is this still relevant? Well, as it was only 11kb, I attached it anyway.

Thank you,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: word.zip
Type: application/zip
Size: 10592 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20050804/74b6e796/word-0001.zip

More information about the ntg-context mailing list