4

acmart is creating very ugly line breaks in some of my colleagues' email addresses, and I don't know how to fix this since things like \small (to reduce font size) and \hbox (to avoid line breaking) don't work here. Is there a way I can convince LaTeX to avoid breaking the email addresses?

Here's an example of the code:

\documentclass[sigconf]{acmart}

\begin{document}

\title{Paper Title}

\author{Author 1}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author 2}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author 3}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author With Long Email 1}
\email{long\_long\_long\[email protected]}
\affiliation{Affiliation}

\author{Author With Long Email 2}
\email{long\_long\_long\[email protected]}
\affiliation{Affiliation}

\maketitle

\end{document}

And here's the result:

enter image description here

1 Answer 1

3

You can make all emails smaller by redefining \UrlFont. You can avoid the break by redefining \UrlBreakPenalty:

\documentclass[sigconf]{acmart}

\begin{document}

\title{Paper Title}

\author{Author 1}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author 2}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author 3}
\email{[email protected]}
\affiliation{Affiliation}

\author{Author With Long Email 1}
\email{long\_long\_long\[email protected]}
\affiliation{Affiliation}

\author{Author With Long Email 2}
\email{long\_long\_long\[email protected]}
\affiliation{Affiliation}

\begingroup
 %\def\UrlFont{\ttfamily\scriptsize} %smaller email
\mathchardef\UrlBreakPenalty=10000
\maketitle

\endgroup
\end{document}

enter image description here

3
  • Awesome, exactly what I was looking for! Thanks!
    – della
    Commented Sep 13, 2017 at 10:31
  • Are there any other ways to do this? It didn't work for my use case (possibly because the email domain contains a hyphen). Commented Aug 27, 2021 at 18:55
  • @ElliottSlaughter if you have a new question ask a new question (with a full example). Don't ping individual people. Commented Aug 27, 2021 at 18:56

You must log in to answer this question.

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