Take the 2-minute tour ×
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.

In my text, I'd like to have in first use of \ac the result (all my text is typed using \ac or \acp):

PC (Personal Computer)

So, normally the result is opposite:

Personal Computer (PC)

How to customize it?

share|improve this question
add comment

2 Answers

If you don't find a better solution declare a new command combining short and long forms, something like (not tested)

\newcommand{\firstac}[1]{\acl{#1} (\acs{#1})}
share|improve this answer
add comment

Change the definition of the macros \acfa and \@acf (EDIT: and their plural couterparts).

\documentclass{article}

\usepackage{acronym}

\makeatletter
\renewcommand*{\acfa}[1]{%
%    \texorpdfstring{\protect\@acf{#1}}{\AC@acl{#1} (#1)}}% DELETED
   \texorpdfstring{\protect\@acf{#1}}{#1\ (\AC@acl{#1})}}% NEW
\renewcommand*{\@acf}[1]{%
    \ifAC@footnote
       \acsfont{\AC@acs{#1}}%
       \footnote{\AC@placelabel{#1}\AC@acl{#1}{}}%
    \else
       \acffont{%
%           \AC@placelabel{#1}\AC@acl{#1}% DELETED
          \AC@placelabel{#1}\AC@acs{#1}% NEW
          \nolinebreak[3] %
%           \acfsfont{(\acsfont{\AC@acs{#1}})}% DELETED
          \acfsfont{(\acsfont{\AC@acl{#1}})}% NEW
        }%
     \fi
     \ifAC@starred\else\AC@logged{#1}\fi}
\renewcommand*{\acfpa}[1]{%
   \texorpdfstring{\protect\@acfp{#1}}{\AC@acsp{#1} (\AC@aclp{#1})}}
\renewcommand*{\@acfp}[1]{%
   \ifAC@footnote
      \acsfont{\AC@acsp{#1}}%
      \footnote{\AC@placelabel{#1}\AC@aclp{#1}{}}%
   \else
      \acffont{%
         \AC@placelabel{#1}\AC@acsp{#1}%
         \nolinebreak[3] %
         \acfsfont{(\acsfont{\AC@aclp{#1}})}%
         }%
   \fi
   \ifAC@starred\else\AC@logged{#1}\fi}
\makeatother

\begin{document}

Some text about the \ac{PC}~\dots

More about the \ac{PC}~\dots

\begin{acronym}
\acro{PC}{Personal Computer}
\end{acronym}

\end{document}
share|improve this answer
add comment

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.