Suppose I define a new command
\newcommand{\abbreviate}[2]{ #2 (#1)}
In the text, \abbreviate{USSR}{Union of Soviet Socialist Republics} will appear as "Union of Soviet Socialist Republics (USSR)"
However, that's a lot to type, so I'd prefer to be able to define \ussr to do the same thing, and then \usa to expand to 'United States of America (USA)', and so forth. What I really want to do is to be able to say
Code: Select all
\abbreviate{USSR}{Union of Soviet Socialist Republics}
\abbreviate{USA}{United States of America }
Code: Select all
\newcommand{\abbreviate}[2]{
\newcommand{\#1}{#2 (#1)}
}
I know there's a package out there that will do this for me, but as I said this is mostly pedagogical -- I'm trying to take my first murky steps into Latex programming. Any help appreciated.