5

Possible Duplicate:
lualatex and line breaks after em-dashes

I am working on a manuscript that can be compiled with either with xelatex or lualatex.

The PDF output from xelatex looks better and is more tightly spaced but gives me lots of "black boxes" in draft mode.

The output from lualatex appears fainter, is more loosely spaced, but seems better hyphenated, and suffers from fewer overfull boxes.

I have stripped everything down to this MWE:

\documentclass[10pt,mdemyvopaper,draft]{memoir}

\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}

\usepackage[no-math]{fontspec}
    \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
    \setmainfont[Numbers=OldStyle,BoldFont={* Semibold}]{Minion Pro}

\usepackage[british]{babel}

\begin{document}
Whether you are eight or eighty, whether you are in the thick of high school studies, or have retired from the workplace\textemdash and want to realize your schoolday dreams of reciting Shakespeare or mastering mathematics\textemdash this book is written for you.
\end{document}

I have included what I think is essential but nothing more to allow further investigation.

The output from xelatex is enter image description here

The output from lualatex is enter image description here

How might I get the hyphenation performance of lualatex from xelatex? I am using a current, updated TeXLive 2012 installation.

chandra
  • 3,084
  • 5
    LuaTeX uses a slightly different hyphenation algorithm from XeTeX (which uses the one inherited from TeX). This is a case where it shows. – egreg Dec 28 '12 at 17:32
  • Thanks, @egreg. Is it possible to choose the hyphenation algorithm or is it hard-coded into the formats? I ask because I prefer the output from xelatex. (There is a side issue about whether the existence of the MinionPro package and the fonts for it on my system, mean that xelatex and lualatex are using different fonts, i.e., otf and pfb versions respectively.) – chandra Dec 28 '12 at 17:46
  • 3
    the problem is the \textemdash. Put a space before it and you'll get the same output. Or put a \hskip0pt before it, which is the shorthand "" in babel for ngerman –  Dec 28 '12 at 17:49
  • 1
    The hyphenation algorithm is hard-wired in the programs; you get the same behavior with LuaLaTeX if you use --- instead of \textemdash – egreg Dec 28 '12 at 17:50
  • 2
    the hyphenation "mathem-atics" is just plain wrong in english. (plain) tex hyphenates it correctly: "math-e-mat-ics". for this reason, if no other, i'd avoid this luatex problem. – barbara beeton Dec 28 '12 at 18:17
  • @barbarabeeton With the British patterns I get math-em-at-ics – egreg Dec 28 '12 at 18:37
  • 3
    See http://tex.stackexchange.com/questions/62800/lualatex-and-line-breaks-after-em-dashes for explanations of and two good solutions for the em-dash problem. – Thérèse Dec 28 '12 at 18:42
  • @egreg -- interesting. i've just looked up the word in the oxford dictionary on line. for u.s. english, it gives the syllabification (on which u.s. hyphenation is based) as "(math·e·mat·ics)". for british english, it gives no syllabification or any indication of how it might be hyphenated. however, the pronunciation is essentially the same in both instances, with the "e" (pronounced as schwa) separate from the consonants on either side. so i'm suspicious. i have a print copy of the oed at home, and will try to check this there. – barbara beeton Dec 28 '12 at 18:50

0 Answers0