# Acronyms with same style as LOT?

I use the acronym package with page numbers. Now I would like to have the dots between the acronym and the page number in same style as in the ListofTables: same spacing between the dots and between the last dot and the page number.
The line spacing should be the same as well, but the dots have the higher priority.
(In addition the alignment among the acronyms does not seem to work well in the mini example, but fine in my document.)

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[printonlyused,withpage]{acronym}
\begin{document}
\parskip 6pt% space between paragraphs
\renewcommand{\baselinestretch}{1.2}\normalsize% leading -- space between two lines
\section*{List of Abbreviations}
\begin{acronym}[MSC]
\acro{IMO}{International Maritime Organization}
\acro{MSC}{Maritime Safety Committee}
\end{acronym}
\listoftables
\begin{table}\begin{tabular}{c} \ac{MSC}\end{tabular}\caption{a}\end{table}
\begin{table}\begin{tabular}{c} \ac{IMO}\end{tabular}\caption{b}\end{table}
\end{document}

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  karlkoeller Feb 6 '14 at 11:49

Add the following code to your preamble:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\AC@@acro}
{\dotfill\pageref{acro:#1}}
{\nobreak\leaders\hbox{$\mkern -7mu \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu \mkern 7mu$}%
\hfill\nobreak\makebox[1.3em][r]{\pageref{acro:#1}}}
{}
{}
\makeatother


In this way we patch the command responsible of writing the lines in the acronym list to behave like the one responsible for placing the lines in the LoT.

Complete MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[printonlyused,withpage]{acronym}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\AC@@acro}
{\dotfill\pageref{acro:#1}}
{\nobreak\leaders\hbox{$\mkern -7mu \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu \mkern 7mu$}%
\hfill\nobreak\makebox[1.3em][r]{\pageref{acro:#1}}}
{}
{}
\makeatother

\begin{document}
\parskip 6pt% space between paragraphs
\renewcommand{\baselinestretch}{1.2}\normalsize% leading -- space between two lines
\section*{List of Abbreviations}
\begin{acronym}[MSC]
\acro{IMO}{International Maritime Organization}
\acro{MSC}{Maritime Safety Committee}
\end{acronym}
\listoftables
\begin{table}\begin{tabular}{c} \ac{MSC}\end{tabular}\caption{a}\end{table}
\begin{table}\begin{tabular}{c} \ac{IMO}\end{tabular}\caption{b}\end{table}
\end{document}


Output:

-