# Change order in acronym

I am using \usepackage[printonlyused,withpage]{acronym} to use acronyms in my thesis But I want to get

I am using the following code:

\documentclass{article}
\usepackage[printonlyused,withpage]{acronym}
\begin{document}

\section{Intro}
Analisis de Componentes Principales (\em{\ac{PCA}}). \ac {PCA}.

\section{Acronyms}
\begin{acronym}
\acro{PCA}{Principal Component Analysis}
\end{acronym}

\end{document}

-

You'll need to redefine the internal command that typesets the first appearance of an acronym, \@acf. This will change all first appearances of acronyms, though. If you only want it for the one instance it's easier just to place \acs and \acl manually.

\documentclass{article}
\usepackage[printonlyused,withpage]{acronym}

\makeatletter
\renewcommand*{\@acf}[1]{%
\ifAC@footnote
\acsfont{\AC@acs{#1}}%
\footnote{\AC@placelabel{#1}\hskip\z@\AC@acl{#1}{}}%
\else
\acffont{%
\acfsfont{\acsfont{\AC@acs{#1}}}% I removed the brackets and switched this line ...
\nolinebreak[3] %
\AC@placelabel{#1}\hskip\z@\AC@acl{#1}% ... with this one
}%
\fi
\ifAC@starred\else\AC@logged{#1}\fi}
\makeatother

\begin{document}

\section{Intro}
Analisis de Componentes Principales (\emph{\ac{PCA}}). \ac {PCA}.

\section{Acronyms}
\begin{acronym}
\acro{PCA}{Principal Component Analysis}
\end{acronym}

\end{document}


Note that I also replaced \em with \emph, see “What is the difference between \em and \emph?” for a discussion of the differences.

-