9

Here is a fairly short latex file.

\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}

When I use pdflatex (pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010/Fink)) I get a pair of overfull hbox errors. If I replace lemma in the body by lem\-ma and replace unparameterized by unparame\-terized then the warnings go away. Suggestions?

6
  • 6
    Works for me, so you'll have to provide a minimal working example (MWE) that illustrates your problem.
    – lockstep
    Jan 7, 2012 at 12:04
  • 1
    Are you using babel and multiple languages?
    – egreg
    Jan 7, 2012 at 12:07
  • 3
    Please post a separate second question for the second question.
    – Stefan Kottwitz
    Jan 7, 2012 at 12:07
  • With regard to @egreg's comment: Have a look at tex.stackexchange.com/questions/37934/…
    – lockstep
    Jan 7, 2012 at 12:14
  • Lockstep - Ok, I'll try to do that. Egreg - English only. Stefan - I'll split off the question.
    – Sam Nead
    Jan 7, 2012 at 14:38

2 Answers 2

11

Set \righthyphenmin to 2, because amsart uses the value 3. Then lemma will be hyphenated. And words including a dash are not hyphenated. Insert a \hskip0pt. See example.

\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}
7
  • This is a fine example of why minimal working examples are important.
    – lockstep
    Jan 7, 2012 at 15:17
  • @Herbert - I've expanded the example. Perhaps there are two different issues here?
    – Sam Nead
    Jan 7, 2012 at 15:41
  • @Sam Nead: see my edited answer
    – user2478
    Jan 7, 2012 at 15:52
  • @Herbert - Ah. I see! Thank you very much for your answers. So, in short, the line starting \hyphenation is totally irrelevant. LaTeX knows how to hyphenate these words, but there are other rules that are overriding the hyphenations (number of letter and dashes). ... So, if I have to cure each problem individually then it seems cleaner to just insert \- in the appropriate places (after fixing all other typesetting issues). Does that sound right?
    – Sam Nead
    Jan 7, 2012 at 16:06
  • yes, except of righthyphenmin. That is easier than lem\-ma ...
    – user2478
    Jan 7, 2012 at 16:25
6

TeX won't hyphenate words without leaving at least \lefthyphenmin letters before the hyphen and \righthyphenmin letters after it. These two parameters are set on a per language basis; for English, the typographic traditions require

\lefthyphenmin=2
\righthyphenmin=3

so it's immaterial if you say

\hyphenation{lem-ma}

in the document's preamble: the hyphenation point will not be considered anyway. It's interesting to know that, setting \righthyphenmin=2, the command

\showhyphens{lemma}

shows lem-ma on the terminal.

While globally setting \righthyphenmin=2 will solve the particular problem, I wouldn't recommend it, since it may add many improper hyphenation points in the rest of the document.

A "local" solution, that is, inputting lem\-ma at that spot is, in my opinion, the way to go: an explicit discretionary hyphen overrides the "minimum hyphenation rules" for that word.

Words containing an explicit or discretionary hyphen (- or \-) are possibly split only at the explicit hyphens: you can solve the problem with $A$-unparameterized by inserting \hspace{0pt}:

$A$-\hspace{0pt}unparameterized

or, maybe,

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

so that TeX won't break after the explicit hyphen. Leave all these adjustments for the final stage of production, when you're sure that the text and the page parameters are in definitive form.

1
  • I think there may be more than one issue here. I've expanded the example to try and show this.
    – Sam Nead
    Jan 7, 2012 at 15:52

You must log in to answer this question.

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