# How to change the format of acronyms?

I use the acronym package. Please help me to change a gap between the acronym and full name of acronym and to put a dash between them like this:

PG       - some text

HRoT     - some text some text some text some text some
text some   text some text some text some text some text


Also I would like to make the acronyms shown in Roman text-style (by default it's in Bold)

  \documentclass[12pt]{report}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[no-sscript]{xltxtra}
\usepackage[babel=false]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguages{german,english,greek,polish,russian}
\setmainfont[Mapping=tex-text]{Linux Libertine}
\usepackage{acronym}

\makeatletter
\def\uplabel#1{{\normalfont{\textsf{#1}}\hfill}-}
\renewenvironment{AC@deflist}[1]%
{\ifAC@nolist%
\else%
\raggedright\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change 2em to the desired value
\setlength{\leftmargin}{\labelwidth}%
\renewcommand{\makelabel}{\uplabel}}%
\fi}%
{\ifAC@nolist%
\else%
\end{list}%
\fi}%
\makeatother

\begin{document}
\begin{acronym}
\acro{Esj}{some text some text some text some text some text some text some text some text some textsome text some text some text}

\acro{At}{some text some text some text some text some text some text some text some text some text some text some textsome textsome text some text some text}
\end{acronym}
\end{document}


EDIT: Extra dash

-

The file acronym.sty uses \bflabel to typeset the label in boldface and using small capitals; I defined a new macro \uplabel which uses \normalfont instead of boldfaced series and includes a hyphen to separate the acronym and its definition; this command will be used in the environment AC@deflist which formats the list of acronyms and will have to be redefined to increase the separation between the acronyms and their definitions. The acronym environment will also have to be redefined.

Add the following lines to the preamble (after the acronym package has been loaded) and change the used values according to your needs:

\documentclass[12pt]{report}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[no-sscript]{xltxtra}
\usepackage[babel=false]{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguages{german,english,greek,polish,russian}
\setmainfont[Mapping=tex-text]{Linux Libertine}
\usepackage{acronym}
\usepackage{enumitem}

\renewcommand\acsfont{\normalfont}

\makeatletter
\def\uplabel#1{{\normalfont{\textsf{#1}}\hfill}-}
\renewenvironment{acronym}[1][1]{%
\providecommand*{\acro}{\AC@acro}%
\providecommand*{\acroplural}{\AC@acroplural}%
\long\def\acroextra##1{##1}%
\def\@tempa{1}\def\@tempb{#1}%
\ifx\@tempa\@tempb%
\global\expandafter\let\csname ac@des@mark\endcsname\AC@used%
\ifAC@nolist%
\else%
\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change according to your needs
\setlength{\leftmargin}{\labelwidth}%
\renewcommand{\makelabel}{\uplabel}}
\fi%
\else%
\begin{AC@deflist}{#1}%
\fi%
}%
{%
\ifx\AC@populated\AC@used\else%
\ifAC@nolist%
\else%
\item[]\relax%
\fi%
\fi%
\expandafter\ifx\csname ac@des@mark\endcsname\AC@used%
\ifAC@nolist%
\else%
\end{list}%
\fi%
\else%
\end{AC@deflist}%
\fi}%
\renewenvironment{AC@deflist}[1]%
{\ifAC@nolist%
\else%
\raggedright\begin{list}{}%
{\settowidth{\labelwidth}{\normalfont{\textsf{#1}}\hspace*{3em}}% change according to your needs
\setlength{\leftmargin}{\labelwidth}%
\renewcommand{\makelabel}{\uplabel}}%
\fi}%
{\ifAC@nolist%
\else%
\end{list}%
\fi}%
\makeatother

\begin{document}
\begin{acronym}
\acro{Esj}{some text some text some text some text some text some text some text some text some textsome text some text some text}

\acro{At}{some text some text some text some text some text some text some text some text some text some text some textsome textsome text some text some text}
\end{acronym}
\end{document}


EDIT: acronym environment redefined.

-
@Gonzalo Medina Thank you. :) But it doesn't work in my text. In code I've just put (your code in preamble) and in the document: \begin{acronym} \acro{DG}{some text} \end{acronym}. Maybe I do something wrong? –  filokalos Apr 13 '11 at 18:09
@filokalos: can you please add to your question a minimal working example including my code and illustrating the problem that you are experiencing? –  Gonzalo Medina Apr 13 '11 at 18:26
@Gonzalo Medina Shure. Sorry. One moment, please. –  filokalos Apr 13 '11 at 18:27
@Gonzalo Medina I've changed. –  filokalos Apr 13 '11 at 18:37
@Rabarberski please feel free to open a new fresh question. –  Gonzalo Medina May 8 at 14:33