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}