stretching smallcaps with a style command
Hello Everyone: I'm an intermediate-skilled user trying to typeset notes for my CompTIA A+ certification course with ConTeXt, but I'm having trouble with styling abbreviations. I would like to letterspace (I think that is a correct typographical term, I'm a little new at typesetting, sorry) and smallcap my dozens of abbreviations, and I can get it to work manually but not with \setupsynonyms. Googling the wiki, mailing lists, etc. didn't help and I'm not enough of a TeX programmer to understand the definitions in the source code in this case. I run TeXLive 2008 on Gentoo Linux with ConTeXt version: CtxTools | context version: 2008.05.21 15:21 (/usr/share/texmf-dist/tex/context/base/context.tex) CtxTools | context version: 2008.05.21 15:21 (/usr/share/texmf-dist/tex/context/base/cont-new.tex) http://live.contextgarden.net/ doesn't seem to be working for anything at the moment, so I don't know if it works there or not. Below is a small sample input I made to illustrate my attempts; I tried to make it as transparent as possible. I would greatly appreciate any help. Thank You Very Much, Bob \setupcolor [hex] \definecolor [LightBlue] [h=8080FF] \setupcolors [state=start] \setupbodyfont [10pt] \setupcapitals [sc=yes] \def\stretchedspaceamount {.1em} \define [1] \StretchedSmallCaps {\smallcaps {\stretchedlowercase {#1}}} \define \Term {\color [LightBlue]} % \setupsynonyms [abbreviation] [textstyle=\StretchedSmallCaps] % I would like this to work, but it doesn't % \setupsynonyms [abbreviation] [textstyle=\italic] % other commands like this work \abbreviation {CPU} {central processing unit} \starttext \Term {\StretchedSmallCaps {CPU}} = \Term {\infull {CPU}} % this produces the output that I want \Term {\smallcaps {\lowercase {CPU}}} = \Term {\infull {CPU}} % this is what it looks like without stretching \Term {\CPU} = \Term {\infull {CPU}} % this is what I want to type to produce the stretched, smallcaps output \stoptext
Bob Reynolds wrote:
\define [1] \StretchedSmallCaps {\smallcaps {\stretchedlowercase {#1}}}
You need a more low-level definition of this command because of macro expansion issues inside the logo processing. It works fine with this: \unexpanded\def\StretchedSmallCaps#1% {\smallcaps {\stretchedlowercase {#1}}} It is not easy to explain why precisely this is needed, so I am not going to try :-) Best wishes, Taco
participants (2)
-
Bob Reynolds
-
Taco Hoekwater