[Tex/LaTex] Redefine the style of acronyms (glossaries)

acronymsglossaries

In a paper I'm writing I would like to enter a list of acronyms used, and I'm trying to do with the use of glossaries package. The problem is the style in which they appear acronyms. A compilable code is this:

% arara: pdflatex: {synctex: yes}
% arara: makeglossaries
% arara: pdflatex: {synctex: yes}

\documentclass{article}

\usepackage{glossaries}
\usepackage{etoolbox}

\DeclareRobustCommand*{\acronimo}[1]{%
  \mbox{\sffamily\scshape\MakeLowercase{#1}}}

\makeglossaries
\newacronym{AAA}{AAA}{Abcde Abcde Abcde}

\begin{document}

\gls{AAA}

\printglossaries

\end{document}

I would like to get all the acronyms in the short form (the acronym in fact, and without parentheses), also the first use of \gls. Also I wish this acronym was with the style that is defined by the command \acronym. Of course, the list of acronyms, next to each of them, it must appear to his description (in my example "Abcde Abcde Abcde"). You can do this? Is there anyone who can give me a hand?

Best Answer

You're asking quite a few things...

  1. To always show the short form of acronyms, you have to use the command \glsunsetall after defining all of them with \newacronym commands.

    If you want this behavior only for a specific acronym you can put the optional argument first=\glstext{<acronym>} in \newacronym as in

    \newacronym[first=\glstext{AAA}]{AAA}{aaa}{Abcde Abcde Abcde}
    
  2. To have the acronyms printed in the way you've described, you have to write the line

    \renewcommand*{\glstextformat}[1]{\textsf{\textsc{#1}}}
    

    Note that you can not use \MakeLowercase here, since the command refers to the acronym label. To achieve what you want, you have to write the second argument of \newacronym in lowercase, as in

    \newacronym{AAA}{aaa}{Abcde Abcde Abcde}
    
  3. If you want the same font shapes in the List of Acronyms, you have to write the line

    \renewcommand{\glsnamefont}[1]{\textsf{\textsc{\mdseries #1}}}
    

Ultimately, the following MWE

% arara: pdflatex: {synctex: yes}
% arara: makeglossaries
% arara: pdflatex: {synctex: yes}
% arara: pdflatex: {synctex: yes}

\documentclass{article}

\usepackage[acronym]{glossaries}
\usepackage{etoolbox}

\DeclareRobustCommand*{\acronimo}[1]{%
  \mbox{\sffamily\scshape\MakeLowercase{#1}}}

\renewcommand*{\glstextformat}[1]{\textsf{\textsc{#1}}}
\renewcommand{\glsnamefont}[1]{\textsf{\textsc{\mdseries #1}}}

\makeglossaries
\newacronym{AAA}{aaa}{Abcde Abcde Abcde}
\glsunsetall

\begin{document}

\noindent First use: \gls{AAA}, and second use: \gls{AAA}.

\printglossaries

\end{document} 

gives the following output:

enter image description here