[pstricks] Using pstricks with Lua - is it possible? -- XeLaTeX failing
Hensh, Richard
hensh at math.msu.edu
Sun Mar 25 21:01:36 CEST 2012
Thanks. The fix seems to depend on a successful xelatex + xdvipdfmx installation. I remember trying to get this working a few years ago but I gave up in frustration. Here's a simple example (I've removed all references to fontspec and friends since the problem lies elsewhere). The file below compiles just fine under LaTeX -> dvips -> ps2pdf.
%% Begin xelatexSample.tex
\documentclass[10pt]{article}
\usepackage{pstricks-add}
\begin{document}
\def\xmin{-3}\def\xmax{6}
\def\ymin{-1}\def\ymax{10}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)
\psclip{\psframe[linestyle=none](\xmin,\ymin)(\xmax,\ymax)}
\psplot{\xmin}{\xmax}{x dup mul}
\endpsclip
\psdots(2,4)
\SpecialCoor
\uput{6pt}[0](2,4){{\Large $y = x^2$}}
\NormalCoor
\end{pspicture}
$$f(x) = \sin x$$
\end{document}
%% End xelatexSample.tex
Unfortunately, I get the error below when I compile with XeLaTeX. I got similar errors when using lualatex earlier. The xdvipdfmx.con is Version 0.03 (2011/11/23). The generated PDF file correctly displays all of the text but none of the graphics are present???
%%% Begin error message
Command Line: xelatex.exe "xelatexSample.tex"
Startup Folder: C:\data\design\tex\lualatex
This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9)
entering extended mode
(C:\data\design\tex\lualatex\xelatexSample.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\pstricks-add\pstricks-add.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\pstricks\pstricks.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks\base\pstricks.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\pst-xkey.tex"
("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex"))))
(C:\localtexmf\tex\generic\pstricks\pst-fp.tex `pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.27 <2012/03/11> (tvz)
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetex-pstricks\pstricks.con"
(C:\localtexmf\tex\generic\pstricks\xdvipdfmx.con))
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetex-pstricks\pstricks.con"
(C:\localtexmf\tex\generic\pstricks\xdvipdfmx.con
Using PSTricks configuration for XeTeX+xdvipdfmx
))) (C:\localtexmf\tex\generic\pstricks\pst-fp.tex)
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xetex-def\xetex.def")))
("C:\Program Files\MiKTeX 2.9\tex\latex\pst-plot\pst-plot.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\xkeyval\pst-xkey.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\multido\multido.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\multido\multido.tex"
v1.42, 2010/05/14 <tvz>))
("C:\Program Files\MiKTeX 2.9\tex\generic\pst-plot\pst-plot.tex"
v1.39, 2012/03/13 (tvz,hv)))
("C:\Program Files\MiKTeX 2.9\tex\latex\pst-node\pst-node.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pst-node\pst-node.tex"
v1.22, 2012/02/12)) ("C:\Program Files\MiKTeX 2.9\tex\latex\pst-3d\pst-3d.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pst-3d\pst-3d.tex"
`PST-3d' v1.11, 2010/02/14 (tvz)))
("C:\Program Files\MiKTeX 2.9\tex\latex\pst-math\pst-math.sty"
("C:\Program Files\MiKTeX 2.9\tex\generic\pst-math\pst-math.tex"
`pst-math' v0.62 , (CJ,hv)))
("C:\Program Files\MiKTeX 2.9\tex\generic\pstricks-add\pstricks-add.tex"
`pstricks-add' v3.55, 2011/12/11 (dr,hv))
("C:\Program Files\MiKTeX 2.9\tex\latex\pstricks-add\pstricks-add.cfg"))
(C:\data\design\tex\lualatex\xelatexSample.aux) [1]
(C:\data\design\tex\lualatex\xelatexSample.aux)
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
** WARNING ** >> at page="1" position="(233.752, 383.734)" (in PDF)
** WARNING ** >> xxx "pst: tx at Dict begin STP newpath /ArrowA { BeginArrow 1. 1. sc"
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command PST: (ps:) failed.
** WARNING ** >> at page="1" position="(233.752, 383.734)" (in PDF)
** WARNING ** >> xxx "PST: tx at Dict begin /mtrxc CM def CP CP T STV newpath /ArrowA {"
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
** WARNING ** >> at page="1" position="(233.752, 383.734)" (in PDF)
** WARNING ** >> xxx "pst: tx at Dict begin STP newpath /ArrowA { moveto } def /ArrowB "
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
** WARNING ** >> at page="1" position="(233.752, 383.734)" (in PDF)
** WARNING ** >> xxx "pst: tx at Dict begin STP newpath 0.8 SLW 0 setgray [ 56.90549 "
)
Output written on xelatexSample.pdf (1 page).
Transcript written on xelatexSample.log.
%%% End error message
Here's the output from listfiles.
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
pstricks-add.sty 2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv
)
pstricks.sty 2011/10/31 v0.52 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2012/03/11 v2.27 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
pst-fp.tex 2012/03/11 v2.27 `PST-fp' (hv)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
xetex.def 2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)
pst-plot.sty 2011/04/13 package wrapper for pst-plot.tex (hv)
pst-xkey.sty 2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
multido.sty 2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
multido.tex 2010/05/14 v1.42 `multido' (tvz,hv)
pst-plot.tex 2012/03/13 1.39 `pst-plot' (tvz,hv)
pst-node.sty 2010/04/22 package wrapper for pst-node.tex
pst-node.tex 2012/02/12 1.22 `pst-node' (tvz)
pst-3d.sty 2009/07/28 package wrapper for pst-3d.tex (hv)
pst-3d.tex 2010/02/14 v1.11 `PST-3d' (hv)
pst-math.sty 2009/01/20 package wrapper for PSTricks pst-math.tex
pstricks-add.tex 2011/12/11 v3.55 `PSTricks-add' (hv)
pstricks-add.cfg 2005/01/10 v0.1 addtional user stuff (hv)
***********
)
I tried compiling this on two different windows machines (using MiKTeX 2.9) and they both failed with similar problems. Suggestions?
thanks
rick
________________________________________
From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] on behalf of Herbert Voss [Herbert.Voss at FU-Berlin.DE]
Sent: Sunday, March 25, 2012 6:37 AM
To: Graphics with PSTricks
Subject: Re: [pstricks] Using pstricks with Lua - is it possible?
Am 25.03.2012 00:17, schrieb Hensh, Richard:
> Thanks Herbert. The new style file works as advertised.
>
> The minimal example below illustrates a follow-up problem. Specifically, autoPdf.pdf is missing the label $y=x^2$. It seems unlikely that this is a PSTricks problem but it would appear that, at least for the time being, we are unable to use the new fontspec features inside of a pspicture
> environment.
Richard,
that is a real problem. I fixed both, pst-pdf and auto-pst-pdf
to work with files like:
\documentclass[10pt]{article}
\usepackage[dvips={},pspdf={}]{auto-pst-pdf}
\usepackage{pstricks-add}
\ifluatex
\usepackage{unicode-math} %% loads fontspec
\else
\usepackage{mathspec} %% loads fontspec
\fi
\setmathfont{XITS Math}
\begin{document}
Hello World
\def\xmin{-3}\def\xmax{3}
\def\ymin{-1}\def\ymax{10}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)
\psclip{\psframe[linestyle=none](\xmin,\ymin)(\xmax,\ymax)}
\psplot{\xmin}{\xmax}{x dup mul}
\endpsclip
\psdots(2,4)
\uput{6pt}[0](2,4){$y = x^2$}
\NormalCoor
\end{pspicture}
foo bar baz
\end{document}
The images are now created with xelatex and not latex.
the two files are here:
http://texnik.dante.de/tex/latex/auto-pst-pdf/auto-pst-pdf.sty
http://texnik.dante.de/tex/latex/pst-pdf/pst-pdf.sty
Herbert
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/
More information about the PSTricks
mailing list