pdflatex 和 \hyphenation

pdflatex 和 \hyphenation

这是一个相当短的乳胶文件。

\documentclass[12pt]{amsart}
\newcommand{\calG}{\mathcal{G}}
\newcommand{\calP}{\mathcal{P}}
\hyphenation{lem-ma none-the-less un-pa-ram-e-ter-ized}
\begin{document}
\subsection{Projection to holes is coarsely Lipschitz}
The following lemma is used repeatedly throughout the paper.
\begin{itemize}
\item
for any hole $X$ for $\calG$, the projection $\pi_X(\calP)$ is an
$A$--unparameterized quasi-geodesic and
\item
foobar.
\end{itemize}
\end{document}

当我使用pdflatex(pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010/Fink)) 时,我收到一对 overfull hbox 错误。如果我将lemmabody 替换为 bylem\-ma并将 替换为unparameterizedby unparame\-terized,警告就会消失。有什么建议吗?

答案1

设置\righthyphenmin为 2,因为amsart使用值 3。然后词根将被连字符连接。包含破折号的单词不会被连字符连接。插入 \hskip0pt。参见示例。

\documentclass[12pt]{amsart}
\newcommand{\calG}{\mathcal{G}}
\newcommand{\calP}{\mathcal{P}}
\righthyphenmin=2
\begin{document}
\subsection{Projection to holes is coarsely Lipschitz}
The following lemma is used repeatedly throughout the paper.
\begin{itemize}
\item
for any hole $X$ for $\calG$, the projection $\pi_X(\calP)$ is an
$A$--\hskip0pt{}unparameterized quasi-geodesic and
\item
foobar.
\end{itemize}
\end{document}

答案2

TeX 不会\lefthyphenmin在连字符前和\righthyphenmin连字符后至少保留一个字母的情况下对单词进行连字符处理。这两个参数是根据每种语言设置的;对于英语,印刷传统要求

\lefthyphenmin=2
\righthyphenmin=3

所以如果你说

\hyphenation{lem-ma}

在文档的序言中:无论如何都不会考虑连字符点。有趣的是,设置\righthyphenmin=2命令

\showhyphens{lemma}

显示lem-ma在终端上。

虽然全局设置\righthyphenmin=2可以解决特定问题,但我不推荐这样做,因为它可能会在文档的其余部分添加许多不正确的连字点。

我认为,“本地”解决方案(即lem\-ma在该位置输入)是可行的方法:明确的自由连字符会覆盖该单词的“最低连字符规则”。

含有明确或自由连字符(-\-)的单词可能会被拆分仅有的$A$-unparameterized在明确的连字符处:你可以通过插入来解决问题\hspace{0pt}

$A$-\hspace{0pt}unparameterized

或者可能,

$A$\mbox{-}\hspace{0pt}unparameterized

这样 TeX 就不会在显式连字符后断开。将这些调整全部留给最终的制作阶段,此时您确信文本和页面参数都是确定的形式。

相关内容