[XeTeX] MetaPost with XeTeX

Jonathan Kew jonathan_kew at sil.org
Mon Apr 10 18:47:04 CEST 2006

On 10 Apr 2006, at 5:36 pm, Robert Spence wrote:

> Dear List Members,
> Just two quick questions concerning MetaPost:
> 1) Is it possible to get MetaPost to call XeTeX, instead of normal  
> TeX, to typeset labels within diagrams using some of the fonts that  
> XeTeX can access?
> 2) Is it possible to call MetaPost from within XeTeX (using  
> something like mfpic.sty or emp.sty)?

I don't really know anything about (1), but my guess is probably  
not.... if it calls TeX and then uses the output, it probably does so  
by interpreting the DVI output from TeX, and won't understand XeTeX's  
extended DVI (.xdv). That's if MP calls TeX at all.... are you sure  
it doesn't "typeset" labels itself, using the TFM files directly?  
(See, I really don't know anything about it, just speculating!)

The answer to (2) is probably "yes, in principle", as XeTeX can use  
the \write18 mechanism to execute shell commands (provided you enable  
this option in your configuration or via the command line). I assume  
this is how such things are done. But if the result is a Postscript  
or EPS drawing, it'll need to be converted to PDF in order to use it  
within XeTeX, so some adaptation is likely to be needed. Someone  
familiar with these packages might have a clearer idea of how the  
pieces work together.


More information about the XeTeX mailing list