<div dir="ltr">Hi Ross, <i>Alan Munn, </i><i>Kirk Lowery
and others</i><br><br>you can use pdftricks directly in xetex.<br><br><br>As far as I have tested pdftricks works in xetex but there is an isuue which I will talk about in a minute:<br><br>say we only want to draw a line by pstricks, then you can have<br>
<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\documentclass{article}<br>\usepackage{pdftricks}<br>\begin{psinputs}<br>\usepackage{pstricks}<br>\end{psinputs}<br>\begin{document}<br>\begin{pdfdisplay}<br>\TeXtoEPS<br>\begin{pspicture}(0,0)(2,2)<br>
\psline(1,1)(2,2)<br>\end{pspicture}<br>\endTeXtoEPS<br>\end{pdfdisplay}<br>\end{document}<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>then if we assume the name of the file is "test.tex", you will need to run "xelatex -shell-escape test" in a terminal/command line. <br>
then on the run xetex stops, produces the images in ps, then converts them to pdf and the run continues and eventually include them in the final pdf.<br><br>But what happens if you actually have a text in pstricks environment which you want to be typeset in a particular font? will you see the text in the font you specified, or you get CMR fonts? the answer is you will get CMR font, for example try this:<br>
<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
\documentclass{article}<br>\usepackage{fontspec}<br>\setmainfont[Scale=1,Mapping=tex-text]{Junicode}<br>\usepackage{pdftricks}<br>\begin{psinputs}<br>\usepackage{pstricks}<br>\end{psinputs}<br>\begin{document}<br>\begin{pdfdisplay}<br>
\TeXtoEPS<br>\begin{pspicture}(0,0)(2,2)<br>\psline(1,1)(2,2)<br>\uput[0](0,0){I want this to be typeset in \emph{Junicode} font.}<br>\end{pspicture}<br>\endTeXtoEPS<br>\end{pdfdisplay}<br>\end{document}<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br>But when you run "xelatex -shell-escape test", you see that in your output, the sentense "I want this to be typeset in \emph{Junicode} font." is typeset in CMR and not in Junicode.<br>
<br>But if you do not care about this, then you should be fine.<br><br><br>Hope this helps<br clear="all"><br>-- <br>VK<br>
</div>