4

I need to remove the dots after the abbreviations in the list of abbreviations. I am using the ACRO package.

enter image description here

My minimum working example (MWE) looks like this:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{longtable}
\usepackage[utf8]{inputenc}
\usepackage{acro}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{enumitem}
\hypersetup{colorlinks=true,urlcolor=blue,linkcolor=black,citecolor=black,filecolor=black}

\DeclareInstance{acro-page-number}{dotfill}{default}{
punct = true,
punct-symbol = \dotfill
}

\acsetup{
list-type = table,
list-style = longtable,
list-table-width=\linewidth,
pages = first,
page-name =  ,
pages-name = ,
page-ref = dotfill
}

\DeclareAcronym{TEX}{%
    short = TEX,
    long = LaTeX,
    extra = (just gettin started)
}


\begin{document}
\tableofcontents
\printacronyms
\newpage
\section{l NEED SOME HELP}
A \ac{TEX} is such a nice thing nowadays. Nevertheless, I have no clue what to do to solve this problem.

\end{document}
cgnieder
  • 66,645
Ami
  • 43
  • @clemens What If I need to do a breakline, and put the description below LaTeX.. in this case the open bracket stays? How to solve this problem? – Ami Aug 30 '15 at 15:11

1 Answers1

2

If you mean the dot after “LaTeX”:

Use

\acsetup{
  extra-style = paren ,
  ...
}

and remove the parentheses from the definition of the acronym:

\DeclareAcronym{TEX}{
    short = \TeX,
    long  = \LaTeX,
    extra = just gettin started
}

Then you'll get

enter image description here


Answer to comment: placing the extra information below the description is also possible:

Define a new instance for the acro-extra object:

\DeclareInstance {acro-extra} {newline} {default}
  { brackets = false , punct = true , punct-symbol = \newline }

or maybe better

\DeclareInstance {acro-extra} {newline} {default}
  { brackets = false , punct = true , punct-symbol = \par }

and then set \acsetup{extra-style = newline }. This will give:

enter image description here

The complete code:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{longtable}
\usepackage[utf8]{inputenc}
\usepackage{acro}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{enumitem}
\hypersetup{colorlinks=true,urlcolor=blue,linkcolor=black,citecolor=black,filecolor=black}

\DeclareInstance{acro-page-number}{dotfill}{default}{
  punct = true,
  punct-symbol = \dotfill
}

\DeclareInstance {acro-extra} {newline} {default}
  { brackets = false , punct = true , punct-symbol = \newline }

\acsetup{
  extra-style = newline,
  list-type = table,
  list-style = longtable,
  list-table-width = \linewidth,
  pages = first,
  page-name =  ,
  pages-name = ,
  page-ref = dotfill
}

\DeclareAcronym{TEX}{%
  short = \TeX,
  long  = \LaTeX,
  extra = just gettin started
}

\DeclareAcronym{foo}{%
  short = foo,
  long  = foo bar baz
}


\begin{document}
\tableofcontents
\printacronyms
\newpage
\section{l NEED SOME HELP}
A \ac{TEX} is such a nice thing nowadays. Nevertheless, I have no clue what to
do to solve this problem. \ac{foo}

\end{document}
cgnieder
  • 66,645
  • No, I meant the dot after LaTeX =) more than enough! – Ami Aug 30 '15 at 14:50
  • @Ami would you want that line break every time the extra property is given? – cgnieder Aug 30 '15 at 15:53
  • @Ami I added something – cgnieder Aug 30 '15 at 16:00
  • Thank you @clemens, it's working perfect. I know these are very specific questions, but is there a way to determine that some of the extra information is depicted on the right side, because there is enough space anyways and in some cases it should be below. – Ami Aug 30 '15 at 16:34
  • @Ami Yes: use extra-style = plain and add \newline within the respective extra property where you want the break to appear. (There currently is a flaw in the plain definition. The correct one is \DeclareInstance {acro-extra} {plain} {default} { brackets = false , punct = true , punct-symbol = }) – cgnieder Aug 30 '15 at 16:43
  • you are my hero! <3 @clemens – Ami Aug 30 '15 at 17:01