[pstricks] Using pstricks with Lua - is it possible?

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun Mar 25 12:37:26 CEST 2012


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


More information about the PSTricks mailing list