[XeTeX] Alternative to tree-dvips?

Herb Schulz herbs at wideopenwest.com
Mon Apr 11 01:28:57 CEST 2005

On 4/10/05 5:55 PM, "Jonathan Kew" <jonathan_kew at sil.org> wrote:

> On 10 Apr 2005, at 11:05 pm, Jonas Wellendorf wrote:
>> Tree-dvips is incompatible with pdftex, so I am looking for an
>> alternative I can use with xetex.  The document I am typesetting
>> requires me to draw arrows such as this one:
>> I would like to have an arrow from here to here
>>                                                                   |
>>           ^
>> |______|
> I don't know anything about tree-dvips, but I can imagine the sort of
> thing you're wanting to do--and I doubt any existing package will work
> with xetex. A resourceful programmer/TeXpert could probably come up
> with a solution but I wouldn't expect existing packages designed for
> dvips or pdfTeX or any other specific back-end to be directly usable in
> xetex.
> One possible strategy, if someone cares to attempt it, would be to make
> use of the fact that the xdv2pdf driver records the precise location of
> all \special commands that start with "pdf:" in an auxiliary
> ".pdf.marks" file during generation of the main .pdf output. This file
> is then post-processed by the xdv2pdf_mergemarks script (found in the
> binaries directory) to add the hyperref features that xetex currently
> supports.
> If you modify that script so that it doesn't automatically delete the
> .pdf.marks file when finished with it, you could arrange to run
> additional scripts that look for particular \specials in that file, and
> create the appropriate graphics as individual pdf images. This could be
> done, for example, using the Python/Quartz bindings to create new pdf
> graphics. Then these graphics could either be added to the main pdf
> using the PDF::Reuse module, like the mergemarks script does for
> hyperlinks, or they could be included via \XeTeXpdffile in a second
> typesetting run.
> So I think it's feasible, just a Small Matter Of Programming. The
> details are left as an exercise for the reader..... ;-)
> JK


Interestingly, pdftricks along with pstricks works fine in XeLaTeX with one
caveat. I've just run a simple document through it and all went well.

The pdftricks package stores all of the pstricks information for the
pstricks pictures in separate files which are then processed through
latex->dvips->ps3pdf->pdfcrop (at least in the adapted version I have been
using) or some other line of commands that lead to a pdf version of the
figure with the correct Bounding Box. It then uses the graphicx package to
simply include the graphic.

The caveat is that the font used in the figure will be CM.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

More information about the XeTeX mailing list