# Hyphenate long acronyms

I'm using the package acronym but I have a problem. I have a very long acronym "ADD1/SREBP1". I defined it like this:

\acro{srebp}[ADD1/\-SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}


But in the text it is not separated and it creates a badbox. How can I fix this problem?

I add a MWE:

\documentclass[a4paper,11pt,titlepage,twoside,openright,draft]{book}

\usepackage[italian,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{acronym}
\usepackage{etoolbox}

\makeatletter
\patchcmd\@acf{\hskip\z@}{}{}{}
\patchcmd\@acf{\hskip\z@}{}{}{}
\makeatother%this patch fixes white spaces after acronyms

\begin{document}

I cite the acronym first here \ac{srebp}. Then in the end of a row like this
but depends pf course on margins \ac{srebp}.

\begin{acronym}[AAAAAAA]
\acro{srebp}[ADD1\slash SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}

\end{acronym}

\end{document}

• You can try ADD1\slash SREBP1 – clemens Aug 1 '13 at 8:58
• I tried both ADD1\slash SREBP1 and ADD1\slash\- SREBP1 but they are not working... – Stefano_g Aug 1 '13 at 9:02
• Then please add a minimal working example (MWE) – clemens Aug 1 '13 at 9:10
• You should add some \- to differentiation-dependent as currently it is only allowed to hyphenate at the dash. (Maybe it would be a good idea to add ngerman's shorthands to english.) Also I think that determination-and is missing a space. – clemens Aug 1 '13 at 10:03
• @cgnieder Re:shorthands: The OP might be interested in tex.stackexchange.com/questions/27198/… – lockstep Aug 1 '13 at 10:10

## 1 Answer

Redefine the internal macro \AC@acs so that it doesn't use \mbox (which prevents line breaks).

\documentclass[a4paper,11pt,titlepage,twoside,openright,draft]{book}

\usepackage[italian,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{acronym}

\makeatletter
\renewcommand*\AC@acs[1]{%
\expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}}
\makeatother

\begin{document}

I cite the acronym first here \ac{srebp}. Then in the end of a row like
this but debpnds pf course on margins \ac{srebp}.

\begin{acronym}[AAAAAAA]
\acro{srebp}[ADD1\slash SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}

\end{acronym}

\end{document}


• Or \patchcmd\AC@acs{\mbox}{\@firstofone}{}{} since etoolbox is used by the OP already. – clemens Aug 1 '13 at 9:50