![acmart:丑陋的电子邮件地址——如何避免断行?](https://linux22.com/image/361824/acmart%EF%BC%9A%E4%B8%91%E9%99%8B%E7%9A%84%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6%E5%9C%B0%E5%9D%80%E2%80%94%E2%80%94%E5%A6%82%E4%BD%95%E9%81%BF%E5%85%8D%E6%96%AD%E8%A1%8C%EF%BC%9F.png)
acmart
在我的一些同事的电子邮件地址中创建了非常难看的换行符,我不知道如何解决这个问题,因为诸如\small
(减小字体大小)和\hbox
(避免换行)之类的操作在这里不起作用。有没有办法让 LaTeX 避免破坏电子邮件地址?
以下是代码示例:
\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}
结果如下:
答案1
您可以通过重新定义 \UrlFont 来缩小所有电子邮件的字体。您可以通过重新定义 \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}