[NTG-context] Macro for acronyms

Aditya Mahajan adityam at umich.edu
Sat Mar 19 04:08:33 CET 2011

On Sat, 19 Mar 2011, Cecil Westerhof wrote:

> At the moment I have I my document:
> {\switchtobodyfont[1.25em]\bf M}ust
> {\switchtobodyfont[1.25em]\bf S}hould
> {\switchtobodyfont[1.25em]\bf C}ould
> {\switchtobodyfont[1.25em]\bf N}ot now
> But I like to have a macro for this, so I could just do:
> \Acronym{Must Should Could Not~now}
> Is more readable and when I want a change (for example another color for the
> first letter), this is much easier to implement. How should I implement such
> a macro?

Use recursion!




   {\dostartAcronym#1 \dostopAcronym}

\def\dostartAcronym#1 #2\dostopAcronym
       {\FancyUppercase{#1} %space
        \dostartAcronym#2 \dostopAcronym}}

\Acronym{Must Should Could Not~now}


More information about the ntg-context mailing list