[XeTeX] XeTeX and postscript output
وفا خلیقی
vafakh9 at gmail.com
Tue Feb 24 12:35:23 CET 2009
Hi Ross, *Alan Munn, **Kirk Lowery and others*
you can use pdftricks directly in xetex.
As far as I have tested pdftricks works in xetex but there is an isuue which
I will talk about in a minute:
say we only want to draw a line by pstricks, then you can have
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pstricks}
\end{psinputs}
\begin{document}
\begin{pdfdisplay}
\TeXtoEPS
\begin{pspicture}(0,0)(2,2)
\psline(1,1)(2,2)
\end{pspicture}
\endTeXtoEPS
\end{pdfdisplay}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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.
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.
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:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Scale=1,Mapping=tex-text]{Junicode}
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pstricks}
\end{psinputs}
\begin{document}
\begin{pdfdisplay}
\TeXtoEPS
\begin{pspicture}(0,0)(2,2)
\psline(1,1)(2,2)
\uput[0](0,0){I want this to be typeset in \emph{Junicode} font.}
\end{pspicture}
\endTeXtoEPS
\end{pdfdisplay}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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.
But if you do not care about this, then you should be fine.
Hope this helps
--
VK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20090224/1b52cd7c/attachment.html
More information about the XeTeX
mailing list