[NTG-context] Capitalized headings

Adam Lindsay atl at comp.lancs.ac.uk
Wed May 4 00:58:56 CEST 2005


Ville Voipio said this at Wed, 4 May 2005 00:32:59 +0300:

>As \uppercase is a plain TeX macro, fixing it is not a good
>choice, especially because it is known to be bad. However,
>if \WORD could be built on \cap but without the font size
>changing, it would work fine. The odd behaviour of \uppercased
>(and the reasons to use it instead of the other choices) remains
>unclear to me.

I'm not entirely sure what's going on here, either, but as you've
observed, the smallcaps mechanism handles these things very robustly. I
was mucking about in this area recently, so here's a hack that hooks into
that mechanism (hopefully without ruining the rest of the smallcaps).
Insert disclaimers here ;) 

\unprotected
\def\useallcaps
  {\def\cap@@uppercase{\the\everyuppercase\uppercased}%
   \def\cap@@lowercase{\the\everylowercase\lowercased}%
   \def\cap@@visualize{}}
\protected
\def\CAPITALIZED#1{\bgroup\useallcaps\smallcapped{#1}\egroup}

\CAPITALIZED{abcABCåäöÅÄÖ}

\smallcapped{abcABCåäöÅÄÖ}

\userealcaps
\smallcapped{abcABCåäöÅÄÖ}


This is new stuff to me, so I can't really articulate what's happening at
the moment. The code in core-fnt.tex isn't too tough to follow, though,
if you want to examine further.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept.     atl at comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



More information about the ntg-context mailing list