[XeTeX] strange results of measuring boxes

Fr. Michael Gilmary FrMichaelGilmary at MaroniteMonks.org
Fri Jul 24 18:37:04 CEST 2009


Marcin Woliński wrote:


> In an application I'm trying to set the width of a ‘p’ column in LaTeX
> tabular to the minimal width which will accommodate for a certain word.
> On the TeX level that means I'm measuring the width of an \hbox
> containing the word, than use this value to set \hsize within a \vbox
> (see the attached file).  In pdfTeX this seems to work reliably.  In
> XeTeX the word sometimes gets broken.  As shown in the example, a rather
> large value of \emergencystretch is necessary (however, the default
> value used by multicol is enough to trigger the problem).  The word
> being measured needs to contain a hyphen, either explicit or
> discretionary.  And it seems that XeTeX has to be using OpenType fonts,
> but then the problem is not specific to TeX Gyre Heros used in the
> example.
>   

Hi Marcin!

I tried your sample file. The result with the TeX Gyre Heros font does 
as you have said. If, however, I run it with pdfLaTeX in sffamily, it 
runs fine. Also, if I use a different sans font in XeLaTeX, it works 
without a problem.

Maybe it's the Heros font?



-- 
United in adoration of Jesus, 



fr. michael gilmary, mma

Most Holy Trinity Monastery
67 Dugway Road
Petersham, MA 01366-9725





More information about the XeTeX mailing list