# Smallcaps for acroynms

Suppose I have lots of acronyms in my document , e.g. NASA. I want all my acronymns to be smallcaps by default. Is there a package that can recognise consecutive capital letters and make them smallcaps?

I know that I can write \textsc{nasa} or make a macro and write \NASA, but is there a package that can take away that complication by spotting say more than 2 consecutive capitals and setting smallcaps?

It's realy difficult. A solution can consist to change all upper cased into active command see :

For this you sould look like to : An environment which parses periods differently to redefine their behavior http://en.wikibooks.org/wiki/TeX/catcode it's permit to set.

secondly you should check the second char to check if it's upper (see the xstring packge for it with the ifCase}. if it's upper, begin selecting textst and print the two char.

finaly set the space to be active and disable the previos biavior (you should define a global macro and undefine it on the space related command).

• hmm, this is a start. are you saying that no solution exists? – innisfree May 12 '14 at 9:31
• A solution exists, but it's terribly messy. I would also consider the possibility where you wouldn't want the input automatically changed and how you could possibly stop it from doing so. Usually, 'automatic' is just an alternate spelling for 'annoying'. – Sean Allred May 12 '14 at 14:45

With

\newcommand\acronym[1]{\textsc{\MakeLowercase{#1}}


you type any sequence of letters into smallcaps, whether you type \acronym{NASA}, \acronym{nasa} or \acronym{NasA}.

• Your idea it's not realy that people need, but it's can be usefull in some case. This man need an automatic detection of acronym – alexises May 12 '14 at 9:23
• thanks, but this doesn't answer my question. – innisfree May 12 '14 at 9:30