[XeTeX] Alternative to tree-dvips?

Jonathan Kew jonathan_kew at sil.org
Mon Apr 11 00:55:28 CEST 2005


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



More information about the XeTeX mailing list