1

I would like to display the list of acronyms in the following way:

  • in the number list there should be only the page with the first use of the acronym
  • the number should be aligned on the right, with a line of dots from the acronym to the number, just like in the table of content

I use the following package options:

\usepackage[nomain,
      acronym,
      xindy,toc, 
      section=chapter, 
      numberedsection=nolabel]{glossaries} 
\makeglossaries 
....
\printglossary[type=\acronymtype]

Any help is much appreciated.

3

For your first requirement, you can use the package option indexonlyfirst. Your second requirement can can be dealt with by defining a new style similar to the listdotted style:

\documentclass{report}

\usepackage[nomain,
      acronym,
      xindy,toc, 
      section=chapter, 
      numberedsection=nolabel,
      indexonlyfirst]{glossaries} 
\makeglossaries

\setlength{\glslistdottedwidth}{0.7\textwidth} % adjust to suit

\newglossarystyle{mydottedstyle}{%
 \glossarystyle{list}%
 \renewcommand*{\glossaryentryfield}[5]{%
    \item[]\makebox[\glslistdottedwidth][l]{%
      \glsentryitem{##1}\glstarget{##1}{##3 (##2)}%
      \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##5}%
}

\glossarystyle{mydottedstyle}

\newacronym{sample}{short}{long}

\begin{document}

First use on page 1: \gls{sample}.

\newpage

Next use on page 2: \gls{sample}.

\printglossary[type=\acronymtype]

\end{document}

This produces:

Resulting text

You can adjust the value of \glslistdottedwidth as necessary. For example

\setlength{\glslistdottedwidth}{0.8\textwidth}

It depends on how wide your acronyms are. If you only want the short form to appear in the list of acronyms, you can modify the style, like this:

\newglossarystyle{mydottedstyle}{%
 \glossarystyle{list}%
 \renewcommand*{\glossaryentryfield}[5]{%
    \item[]\makebox[\glslistdottedwidth][l]{%
      \glsentryitem{##1}\glstarget{##1}{##2}%
      \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}##5}%
}
  • Interestingly, indexonlyfirst is not documented in the user guide. – mafp Apr 25 '13 at 14:27
  • 1
    @mafp I added indexonlyfirst to v3.02, but it looks like I forgot to document that option. I'll add it to the user guide for the next release. – Nicola Talbot Apr 25 '13 at 15:44
  • thank you very much. that's exactly what i was looking for. – Daniel Apr 25 '13 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.