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 am trying to use DejaVu Sans Light as a math font. It doesn't have a comprehensive set of math characters, but it has what I need (Roman numerals, beta, gamma, epsilon, and just a few other characters).

I've tried to select the font using

\setmathfont(Greek,Latin,Digits){DejaVu Sans ExtraLight}

in my preamble. (The "Light" font must be called "ExtraLight" in the preamble; it won't load otherwise.) This gives me a document with digits set in the Light font. But no other characters are set in that font. Instead, they are set in a heavier version of the same typeface: DejaVu Sans Oblique. Here is a complete working example:

\setmathfont(Greek,Latin,Digits){DejaVu Sans ExtraLight}  
  Inline math: $\hat{\beta} = (X'X)^{-1}X'Y, 1234$.\\  
  Display math: $$\hat{\beta} = (X'X)^{-1}X'Y, 1234$$

And here is the result:

the result

This behavior puzzles me. I can't see anything in the log file or the mathspec documentation that speaks to it. And it's not as though the Light font has glyphs that the Oblique font lacks. Is there a way to make sense of what mathspec is doing –– or at least to get it to render $\beta$, $\gamma$, and a few other characters in the Light font, while still using XeLaTeX?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

There is no oblique version of DejaVu Sans ExtraLight on my system. So I get the normal weight too. But you could use the FakeSlant-Option:

\documentclass[letterpaper, 12pt, oneside]{article}
\setmainfont[ItalicFont={DejaVu Sans ExtraLight},
             ItalicFeatures={FakeSlant=0.2}]{DejaVu Sans ExtraLight}
\setmathfont(Greek,Latin,Digits)[ItalicFont={DejaVu Sans ExtraLight},
                                 ItalicFeatures={FakeSlant=0.2}]{DejaVu Sans ExtraLight}
X123 \itshape X124 \slshape X124

  Inline math: $\hat{\beta} = (X'X)^{-1}X'Y, 1234$.\\
  Display math: \[\hat{\beta} = (X'X)^{-1}X'Y, 1234\]
share|improve this answer
Thank you -- that may prove helpful. But for the present, I want to avoid both the Oblique typeface and the FakeSlant option altogether. Instead, I want all math characters to be set in ExtraLight -- and I therefore want to stop mathspec from substituting Oblique for ExtraLight. Do you know whether there is a way to do this? –  user697473 Nov 27 '12 at 14:08
But what should mathspec do instead? Print the variables upright? –  Ulrike Fischer Nov 27 '12 at 14:55
Better to print them slanted in the lighter–weight typeface. Which is exactly what your example does. (I misunderstood it at first, but now I see that it solves my problem.) Thank you. –  user697473 Nov 27 '12 at 19:42

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.