Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an overfull box in a French text which looks like this:

overfull box

The sequence at the end of the line is:

d'Ananias~: \og Vous

"Vous" cannot be hyphenated and \og inserts a non-secable space, so the only place where it could be cut is after the colon.

I'm using XeTeX with microtype (2.5 beta6 for XeTeX support). How can I fix this overfull box?

Do I have to allow lines to stretch more (and how)?

share|improve this question
    
I think that the best and easiest thing to do is recomposing the phrase before the colon! –  Spike Jun 13 '11 at 8:27
    
@Spike: I'm afraid that is not an option. –  ℝaphink Jun 13 '11 at 8:30
1  
@Raphink: I don't use XeTeX, but with pdfTeX, passing the draft document class option to the microtype package will disable all micro-typographic extensions. Solution: Load microtype with the final option -- this may influence line-breaks. –  lockstep Jun 13 '11 at 9:08
    
@lockstep: I haven't passed the draft option. Instead, I use \overfullrule=1mm in the preamble, so only overfull boxes are debugged without affecting the rest. –  ℝaphink Jun 13 '11 at 9:32
1  
Try to add \emergencystretch=1.5em in the preamble. –  lockstep Jun 13 '11 at 9:39

2 Answers 2

up vote 4 down vote accepted

The link Overfull gives "More satisfactory is to make small changes to \tolerance, incrementally, and then to look to see how the change affects the result; very small increases can often do what’s necessary."

%!TEX TS-program = xelatex
\documentclass[draft,12pt]{article} 
\usepackage{fontspec} 
\usepackage{xunicode}
\usepackage{lmodern} 
\usepackage[textwidth=13cm]{geometry} 
\usepackage[french]{babel}

\usepackage[protrusion = true,
            final]{microtype}    

\begin{document}

%\tolerance=270
  Voici l'accusation que Pierre a formulée à l'encontre d'Ananias: \og Vous avez menti à l'Esprit-Saint. \fg{} Il est également possible de blasphémer contre le Ciel, contre les saints, contre la vertu.

\end{document}

enter image description here

With \tolerance=270 enter image description here

I think expansion does not work with xelatex

share|improve this answer
    
The result is indeed nicer this way. Thank you. –  ℝaphink Jun 13 '11 at 12:17

Try to add \emergencystretch=1.5em in the preamble. This way, TeX's line-breaking algorithm will try a third time with the value of \emergencystretch added to the allowed space between words per line. (1.5em is half the value of \sloppy which should only be used as a last resort.)

share|improve this answer
    
This (on top of microtype) actually fixes 3/4 of my overfull lines. Thanks! –  ℝaphink Jun 13 '11 at 10:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.