[XeTeX] Using MetaPost together with XeTeX

Evgenie Medvedev medvedev at project7.ru
Wed Jul 4 18:04:07 CEST 2007


I'm trying to typeset an old thesis of mine with XeLaTeX. It includes
lots of charts and I wish to generate those anew using MetaPost and
include them as PDFs. (I'd rather XeLaTeX did this automatically for me,
but I guess I can't have everything...) Since I need multiple languages
in those, and prefer to keep the number of fonts used to a minimum, I
wish to generate them through XeTeX as well.

The obvious way of doing it as detailed in various MetaPost documentation:

---------
verbatimtex
%&xelatex
\documentclass{article}
\begin{document}
\input{<some reasonable preamble>}
etex
...<metapost commands to draw my chart>
---------

Well, that doesn't work, because MetaPost wants access to DVI to extract
whatever got printed, and XeTeX doesn't generate one, so the compilation
does not complete.

And yet, somehow it is possible, as demonstrated by an example I found
on the MetaPost mailing list, which I'm including here. It does indeed
generate the legend just like I would want it, with xdvipdfmx written
prominently as the generator in file properties. Unfortunately, that
example is generated through ConTeXt somehow, and I can't make heads or
tails of how the MetaPost commands work in it, and no further
instructions came with it -- so while I can see it can be done, I can't
actually do it like this.

What's the proper way to do it?

-- 
Evgenie Medvedev
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: odd.tex
Url: http://tug.org/pipermail/xetex/attachments/20070704/2c96f02f/attachment.pl 


More information about the XeTeX mailing list