Re: [NTG-context] uppercasing accented characters, mappings and \WORD
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, Mojca
Mojca Miklavec wrote:
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 :)
i'll add a sightly shorter variant to the kernel; i'll also fix teh case map tables since they have holes and wrong entries (nobody ever checked those chars i never use-)
Is this still relevant? Well, as it was only 11kb, I attached it anyway.
i googled a bit -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Mojca Miklavec