[XeTeX] default fonts for text and math in xelatex (ubuntu, texlive 2011)

Ross Moore ross.moore at mq.edu.au
Thu Sep 29 21:49:11 CEST 2011

Hello Peter,

On 30/09/2011, at 4:07 AM, peter knezel <peter.knezel at gmail.com> wrote:

> Hmm, I have tried a short xe.tex file
> ===
> \documentclass{article}
> \usepackage[math]{mathspec}
> \newfontfamily\mymono{DejaVu Sans Mono}
> \newfontfamily\mymathmono{DejaVu Sans Mono}
> \begin{document}
> {\mymono this is with mono}  changed {\mymathmono $E=mc^2$} back as normal
> \end{document}
> ===
> for which xe.pdf is created
> Using: 
> pdffonts -f 1 xe.pdf
> name                                 type              emb sub uni object ID
> ------------------------------------ ----------------- --- --- --- ---------
> MQBWCL+DejaVuSansMono                CID TrueType      yes yes yes      5  0
> AEDUWP+LMRoman10-Regular-Identity-H  CID Type 0C       yes yes yes      7  0

These handle the words in the text.

> FETFUV+CMMI10                        Type 1C           yes yes no       8  0

Math identifiers: E  m  c .

> ZYNKTW+CMR10                         Type 1C           yes yes no       9  0

The page number; presumably  1 .

> LKHLTI+CMR7                          Type 1C           yes yes no      10  0

The superscripted  2 .

> which really shows what fonts are used. As far as I understood well, words "changed", "back as normal" are set with  LMRoman10-Regular-Identity-H (Latin Modern as you wrote). \mymono changed "this is with mono" to DejaVu Sans Mono.
> But what font is used for "$E=mc^2$"? Is it CMMI10,CMR10 and CMR7? Where can I get more info about these fonts? 
> Why isn't the the equation written in DejaVu Sans Mono as defined with \mymathmono?

Because anything written in math mode obeys a different set of typesetting rules to what is used in ordinary text. This involves spacing, positioning and sizing of super- and subscripts as well as choice of font face for each class of character or symbol. This is what makes TeX output look so much more attractive than what any other software produces.
To change things, you'll need to study the  mathspec  or  unicode-math  packages, if I've got the names correct. Otherwise study the LaTeX Companion, for ways to handle Math Alphabets using non-XeTeX methods, which should still work, but with a limited range of fonts.

> Kind regards,
> Peter

Hope this helps,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110930/0c44fa6c/attachment.html>

More information about the XeTeX mailing list