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

Hensh, Richard hensh at math.msu.edu
Sun Mar 25 00:17:07 CET 2012


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.

There are several command line errors, but the most relevant appears to be:

%%% Begin error message
' LuaTeX output 2012.03.24:1838' -> autoPdf-autopp.ps
Trying to make PK font name:XITSMath:mode=base;script=math;language=DFLT; at 8000 DPI...
miktex-makepk: Specified BDPI (8000) doesn't match ljfzzz resolution (1200).
dvips: Font name:XITSMath:mode=base;script=math;language=DFLT; not found; characters will be left blank.
dvips: Can't open font metric file name:XITSMath:mode=base;script=math;language=DFLT;.tfm
dvips: I will use cmr10.tfm instead, so expect bad output.
dvips: ! invalid char 8722 from font name:XITSMath:mode=base;script=math;language=DFLT;
%%% End error message

Notice that miktex-makepk seems to ignore the default option (dvips={-Ppdf}). Changing the printer resolution (via config.ps) to match the BDPI resolution to 8000 doesn't help. Here's the error message.

%%% Begin error message
' LuaTeX output 2012.03.24:1856' -> autoPdf-autopp.ps
Trying to make PK font name:XITSMath:mode=base;script=math;language=DFLT; at 8000 DPI...
Running miktex-makemf.exe...
miktex-makemf: The name:XITSMath:mode=base;script=math;language=DFLT; source file could not be found.
Running ttf2pk.exe...
miktex-makepk: PK font name:XITSMath:mode=base;script=math;language=DFLT; could not be created.
dvips: Font name:XITSMath:mode=base;script=math;language=DFLT; not found; characters will be left blank.
dvips: Can't open font metric file name:XITSMath:mode=base;script=math;language=DFLT;.tfm
dvips: I will use cmr10.tfm instead, so expect bad output.
dvips: ! invalid char 8722 from font name:XITSMath:mode=base;script=math;language=DFLT;
%%% End error message

%% autoPdf.tex
\documentclass[10pt]{article}
\usepackage{pstricks-add}%
\usepackage{auto-pst-pdf}
\usepackage{unicode-math} %% loads fontspec
%\setmainfont[Ligatures=TeX]{XITS}
%\setsansfont[Ligatures=TeX]{TeX Gyre Heros}
%\setmonofont{Latin Modern Mono}
\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)
  \SpecialCoor
  \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}
\end{document}


regards
rick

________________________________________
From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] on behalf of Herbert Voss [Herbert.Voss at FU-Berlin.DE]
Sent: Saturday, March 24, 2012 4:00 AM
To: Graphics with PSTricks
Subject: Re: [pstricks] Using pstricks with Lua - is it possible?

Am 23.03.2012 23:32, schrieb Hensh, Richard:
> The minimal(?) example below should do the trick PROVIDED that you modify the file auto-pst-pdf.sty file to replace the ``latex'' commands with lualatex (at least under MiKTeX 2.9 on a Windows box). I've emailed the package author about this but I have not heard back. And I don't know enough about extending packages to write something myself.

With this version
  http://texnik.dante.de/tex/latex/auto-pst-pdf/auto-pst-pdf.sty

you can simply use:

\usepackage{auto-pst-pdf}

instead of

> \usepackage[latex={--output-format=dvi}]{auto-pst-pdf}

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