[OS X TeX] pstricks in xetex

Michael Gedalin gedalin at bgumail.bgu.ac.il
Wed Oct 13 07:02:49 CEST 2004


First, thanks to Jonathan for fixing \write18 in less than a couple of 
hours !
The following produced and included pstricks graphics for me:

%%%%%%%%%  start file
  \documentclass[11pt]{article}
  \usepackage{moreverb}
\usepackage[xetex]{graphicx}
\newenvironment{psinputs}{\verbatimwrite{input.temp}}{\endverbatimwrite}
\begin{psinputs}
\usepackage{pstricks}
  \end{psinputs}
\begin{document}

test

\begin{verbatimwrite}{fi1.tex}
\documentclass{article}
\input input.temp
\pagestyle{empty}
\begin{document}
\begin{pspicture}(0,0)(6,6)
\psline(0,1)(5,2)
\end{pspicture}
\end{document}
\end{verbatimwrite}

\write18{./pstoxetex fi1}

\includegraphics[width=0.6\textwidth]{fi1.pdf}
  \end{document}
%%%%%%% end file

(partly taken from pdftricks)
where the shell script pstoxetex looks like that

#! /bin/bash
latex $1.tex
dvips -o $1.ps $1.dvi
ps2eps -f $1.ps
epstopdf $1.eps
rm $1.dvi $1.ps $1.eps $1.log $1.aux

The idea is to write a separate file for each inclusion, process it 
outside xetex, convert to pdf, and eventually include as usual. So far 
I failed to put all the needed stuff in a separate .sty.

******************************************
* Michael Gedalin
* Department of Physics
* Ben-Gurion University
* 84105 Beer-Sheva, Israel
* tel: 972-8-6461645
* fax: 972-8-6472904
* email: gedalin at bgumail.bgu.ac.il
* http://burster.bgu.ac.il/~gedalin
*******************************************

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the Macostex-archives mailing list