"For abbreviations and acronyms in the midst of normal text, use spaced small caps."—Bringhurst
What I generally see is that people wrap acronyms in something like \acro
, as in TUGboat:
https://www.tug.org/tugboat/sampleart.ltx
I've been using something like the following in my own documents:
\usepackage{relsize}
\newcommand{\acro}[1]{{\textsmaller[0.5]{#1}}}
and of course there are other ways to do this.
Question: Any good solutions for doing this automatically? Like, could (La)TeX recognize that a word is all capitals and automatically typeset it accordingly? I'm happy to give it a list of words. I know I could write a script (e.g., python) that would replace all instances of each of those strings with \acro{string}
, and maybe that's the only way to do it, but it would be nice to be able to do this within LaTeX as opposed to having to turn to an outside script.
Edit: Strongly prefer pdflatex solutions; I don't want to switch LaTeX engines just to solve this one small problem.