1

I'm having trouble using the ACRO package. In particular with the styling of the printacronyms list. I want the list to have the same style as the table of contents. Compare the following two pictures: Table of contents

=================================================================== Acronyms

I want the dots in the printacronyms list (second picture), to have the same style as in the table of contents (first picture). The minimal code to produce the above is the following:

\documentclass[
  a4paper,
  12pt
]{report}

\usepackage{hyperref}
\usepackage{acro}

\acsetup{
  make-links,
  pages/display = first,
}

\DeclareAcronym{cms}{
  short = CMS,
  long = Content Management System,
}

\begin{document}
\tableofcontents
\printacronyms
\newpage

\chapter{Title}
\section{Section 1}
\ac{cms}
\section{Section 2}

\end{document}

I tried setting list/template = lof or list/template = toc in the \acsetup but that wont compile for me, even though thats how it's documented here. I'm using ACRO version 3.2.

Any ideas?

3
  • What does “wont compile for me” mean exactly? Does it give errors? And if yes, which one is the first error? Is your tex distribution up to date? Many times people tell acro wouldn't work because they updated the package only instead of the whole distribution.
    – cgnieder
    Sep 8, 2020 at 7:49
  • If you suspect a bug please report it via acro's issue tracker
    – cgnieder
    Sep 8, 2020 at 7:49
  • I'm using MiKTeX for windows SetupVersion: 20.6.29 and CurrentVersion: 20.7. When I compile with list/template = toc in \acsetup for example, I get something about: Undefined control sequence. <argument> \TemplateName l.23 The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., '\hobx'), type 'I' and the correct spelling (e.g., 'I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.
    – Jens
    Sep 8, 2020 at 11:15

1 Answer 1

0

You can copy the relevant part in the definition of \@dottedtocline in the LaTeX kernel

\makeatletter
\newcommand*\dotsfill{%
  \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
}
\makeatother

and set acro's option pages/fill accordingly:

\acsetup{ pages/fill = \dotsfill }

With your example this gives

enter image description here

\documentclass[
  a4paper,
  12pt
]{report}

\usepackage{hyperref}
\usepackage{acro}

\makeatletter
\newcommand*\dotsfill{%
  \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
}
\makeatother

\acsetup{
  pages/fill = \dotsfill ,
  make-links,
  pages/display = first,
}

\DeclareAcronym{cms}{
  short = CMS,
  long = Content Management System,
}

\begin{document}
\tableofcontents
\printacronyms
\newpage

\chapter{Title}
\section{Section 1}
\ac{cms}
\section{Section 2}

\end{document}
1
  • Thanks, have not tried this out but will soon.
    – Jens
    Dec 19, 2020 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .