[XeTeX] math

Jonathan Kew jonathan_kew at sil.org
Thu Sep 6 00:24:46 CEST 2007


On 5 Sep 2007, at 10:53 pm, Peter Dyballa wrote:

>
> Am 05.09.2007 um 19:35 schrieb Michael Zedler:
>
>> Is something of this kind possible with xetex's special packages?
>
> No. The Fourier package won't work with XeTeX or XeLaTeX.

I suspect it will provided you use the xdvipdfmx driver. (Only an  
issue on Mac OS X, not other platforms, where there's no other option.)

>
>> Or would I have to resort to a manual, vf-based solution similar to
>> what fouriernc does?
>
> Virtual fonts do not work in XeTeX.

.vf support is an output driver issue, not a TeX engine issue. They  
work in xetex with xdvipdfmx.

>
>> Or is there some even better approach to typeset math with Meta?
>
> Simply use Unicode! In (La)TeX and in font.

That statement doesn't really give much help, does it?

To typeset math, you need to define several fonts -- symbol and  
extension fonts as well as the main "text" fonts -- and for at least  
the large operators, extensible delimiters, etc., there need to be  
either TFM files with the special math TFM data (for legacy TeX  
fonts) or OpenType 'MATH' table support (for Unicode fonts). There's  
more to setting math than simply printing Unicode characters.

The main font I've been using to test Unicode math support is  
Microsoft's Cambria Math (available with Vista or with various other  
products). This works pretty well in pre-release versions of 0.997  
(support in 0.996 is much more limited).

Assuming MetaPro has no 'MATH' support, you wouldn't be able to use  
it exclusively, as the variable-size characters won't work. But it  
would be possible to configure the math fonts so as to take letters,  
digits, etc., from such a font, and operators, delimiters, etc., from  
Cambria (or one of the legacy TeX math fonts).

As an example, I'm attaching a PDF that shows a small equation set  
entirely in Cambria, and then the same thing set in a mixture of  
Minion Pro (alphanumerics) and Cambria (large operators, etc). The  
spacing (e.g. of "f(x)") is sometimes less than ideal...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: math-sample.pdf
Type: application/pdf
Size: 20184 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070905/0f8fc1a5/attachment-0001.pdf 
-------------- next part --------------

The source for this sample simply reads:

%%%%%
\input CambriaMath

$$ f(x) = a_0 + ?^?_{n=1}
      \left( a_n \cos {n?x\over L}
        + b_n \sin {n?x\over L} \right) $$

\input MinionMath

$$ f(x) = a_0 + ?^?_{n=1}
      \left( a_n \cos {n?x\over L}
        + b_n \sin {n?x\over L} \right) $$
%%%%%

where the two \input files define the math fonts and set \mathcode  
values, etc., as discussed in The TeXbook, but using Unicode throughout.

Note, however, that I have *not* created full macro support packages  
for Unicode math; I have only done a bare minimum to be able to run  
some tests. For real-life use, much more complete sets of math  
character definitions will be needed. Mostly just tedious listings of  
character names and code values, but it needs to be done...

JK



More information about the XeTeX mailing list