Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the acronym package, so as to automatically expand acronyms when they are first used. For example, I can simply type \ac{RMS} and LaTeX automatically expands this to "Resource Management System (RMS)" or "RMS".

However, a problem occurs when using indefinite articles. The most common style, Abbreviation verbalised, requires to use "a Resource" and "an RMS". Is there an easy way to deal with this in LaTeX?

Otherwise, have you seen articles where they use Word verbalised style?

share|improve this question

1 Answer

up vote 6 down vote accepted

You can use the test that \ac uses to test for first use but make it make other texts, an and a here: (Please in future provide a working example, it would have made it much easier to answer).

enter image description here

\documentclass{article}

\usepackage{acronym}

\newacro{RMS}[RMS]{Resource Management System}

\makeatletter
\def\acrousedTF#1{%
\expandafter\ifx\csname ac@#1\endcsname\AC@used%
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\makeatother

\begin{document}

zzzz \acrousedTF{RMS}{an}{a} \ac{RMS}  zzzz \acrousedTF{RMS}{an}{a}  \ac{RMS}  
\end{document}
share|improve this answer
I guess you could save yourself some keystrokes defining \def\acart#1{\acrousedTF{#1}{an}{a} \ac{#1}} – Seamus Jul 17 '12 at 22:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.