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?

  • @Sebastiano Please be careful when updating old links - don't randomly link to packages which are unrelated to the question! If you are not sure to which site the old link pointed to, you can use the waybackmachine.org to check. And as always when editing foreign posts: if your are not 1000% sure, don't do it!!! A broken link is better then a wrong link which changes the meaning of a question. – samcarter_is_at_topanswers.xyz Apr 2 '18 at 20:04
  • @samcarter I have seen that several site are empty, wrongs or inactive. I am 1000% sure. Can you prove it. However I remember your notices very well. Thanks a lot for waybackmachine.org. – Sebastiano Apr 2 '18 at 20:13
  • @Sebastiano Sorry, try this link web.archive.org – samcarter_is_at_topanswers.xyz Apr 2 '18 at 20:19
  • @samcarter I have finded a new link thank to you. Happy Eastern. Can you verificate the others old post that I have you modificate, please? Thanks again. – Sebastiano Apr 2 '18 at 20:22

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\]
| 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
  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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