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.

in Default Lyx PDF output, (I presumed it is pdflatex), I used fontdimen2/3/4 to control the interword space, stretch and shrink. In a project, I had to use XeTeX for a particular font. However, the fontdimen2/3/4 doesn't work on the regular text anymore under XeTeX. Only works on fancyhdr.

My Preamble as regards to the text sizes are following:

 %Set word space
\fontdimen2\font=0.15em% interword space
  \fontdimen3\font=0.15em% interword stretch
  \fontdimen4\font=0.1em% interword shrink

%set font size

In order to test the functioning, I set all fontdimen to 0, as you observed in the following example, only the fancyhdr is affected. the font I am using is Van Dijck MT Std with Old Style Figures on.

fontdimen to 0

share|improve this question
@DavidCarlisle accidentally pasted that in, wasn't being relevant, thanks for pointing it out. –  Shi Yuan Oct 2 '12 at 15:43
You should supply an example, in particular the font you're using. Notice that special spacing is used when XeCJK is involved. –  egreg Oct 2 '12 at 16:05
@egreg thanks for the suggestion, I have updated the question. –  Shi Yuan Oct 3 '12 at 11:49
Did you try with other fonts? –  egreg Oct 3 '12 at 11:59
@egreg, just tried Adobe Garamond, Adobe Caslon and the Arial, all have the same problem. –  Shi Yuan Oct 3 '12 at 12:18

1 Answer 1

my own problem, found the answer. I used ragged2e to make the type set ragging right. However, it needs to be placed under the everysel. if everysel is before ragged2e, the fontdimen won't work.

share|improve this answer
Which shows why we always ask for a minimal working example (MWE). In this particular case, ragged2e uses \spaceskip for the interword spacing, so the \fontdimen parameters are ignored. –  egreg Oct 3 '12 at 12:43

Your Answer


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.