# Acronym generates abnormal spacing

I'm using the acronym package but I just realized that it has some problem with spacing. It is the last version (2012). Every time an acronym starts a new line, at the end of the previous line there is a small white space, very annoying to me!

How can I fix this?

\documentclass[a4paper,11pt,twoside,openright]{book}
\usepackage[utf8]{inputenc}
\usepackage[italian,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[artemisia]{textgreek}
\usepackage{acronym}
\usepackage[version-1-compatibility,group-separator={,}]{siunitx}

\begin{document}

Just after (less than \SI{5}{\minute}) exogenous stimuli on a preadipocyte, \ac{CREB} is phosphorylated and
increase expression of \ac{CEBP}, in particular the two isoforms
\ac{CEBPb} and \ac{CEBPd}. This two transcription factors are inactive, this means that they are not able
to bind DNA, and thus they accumulate in the cytosol.
During the passage from G1 to S phase of cell cycle, \ac{CEBPb} is hyperphosphorylated and activated by
\ac{GSK3b} and \ac{MAPK}. Phosphorylation allow \ac{CEBPb} to homodimerize and to bind DNA, starting
mitotic clonal expansion of preadipocyte.
Subsequently \ac{CEBPb} and \ac{CEBPd} induce expression of \ac{CEBPa} and \ac{PPARg},
the two main transcription factor for adipocyte development.\ac{PPARg} dimerize with \ac{RXR}, thus being activated.
Once both \ac{PPARg} and \ac{CEBPa} are activated they regulate each other, maintaining high expression
levels and decreasing the ones of \ac{CEBPb} and \ac{CEBPd} (see \figurename{}
\ref{img:cebps}).

\begin{acronym}[AAAAAA]
\acro{CEBP}[C/EBP]{CCAAT/enhancer binding protein}
\acro{CEBPa}[C/EBP\textalpha]{CCAAT/\-en\-hanc\-er binding protein alpha}
\acro{CEBPb}[C/EBP\textbeta]{CCAAT/\-en\-hanc\-er binding protein beta}
\acro{CEBPd}[C/EBP\textdelta]{CCAAT/\-en\-hanc\-er binding protein delta}
\acro{PPARg}[PPAR\textgamma]{peroxisome pro\-life\-rator-activated receptor gamma}
\acro{MSC}{mesenchimal stem cell}
\acro{RXR}{retinoid X receptor}
\acro{GSK3b}[GSK3\textbeta]{glycogen synthase kinase-3 beta}
\acro{MAPK}{mitogen-activated protein kinase}
\acro{CREB}{cyclic AMP response element-binding protein}
\end{acronym}

\end{document}


• Welcome to TeX.sx! Could you please post a minimal working example (MWE) demonstrating the problem? – clemens Jun 23 '13 at 15:39
• unfortunately I cannot post a picture of the result! – Stefano_g Jun 23 '13 at 15:45
• You might consider using the glossaries package instead. In my question tex.stackexchange.com/questions/120677/restore-headings-section I posted a minimal example. – Matthias Pospiech Jun 23 '13 at 15:47
• @Stefano_g the easiest way: load the etoolbox package and then add (between \makeatletter and \makeatother twice \patchcmd\@acf{\hskip\z@}{}{}{}. This will remove both occurrences of \hskip\z@ where in this case the second one is the important one. – clemens Jun 23 '13 at 17:08
• Great!!! It works! Thanks a lot! @cgnieder you should answer it officially! – Stefano_g Jun 23 '13 at 17:11

It seems that acronym introduced \hskip\z@ in the definition of \@acf as „fix for non hyphenation of first word in long form“ in v1.37. This seems to be the cause of the spurious space. Indeed, removing it by saying

\usepackage{etoolbox}
\makeatletter
\patchcmd\@acf{\hskip\z@}{}{}{}
\patchcmd\@acf{\hskip\z@}{}{}{}
\makeatother


gives the correct output again. The \hskip\z@ needs to be removed twice as the first one is used in the footnote version of the long form and only the second one in the default appearance:

% definition of \@acf in v1.38:
\newcommand*{\@acf}[1]{%
\ifAC@footnote
\acsfont{\AC@acs{#1}}%
\footnote{\AC@placelabel{#1}\hskip\z@\AC@acl{#1}{}}%
\else
\acffont{%
\AC@placelabel{#1}\hskip\z@\AC@acl{#1}%
\nolinebreak[3] %
\acfsfont{(\acsfont{\AC@acs{#1}})}%
}%
\fi
\ifAC@starred\else\AC@logged{#1}\fi}


You might want to treat \@acfp the same way - it contains the same two instances of \hskip\z@.