[pstricks] psclip and xelatex

Michael Sharpe msharpe at ucsd.edu
Fri Sep 24 01:01:58 CEST 2010

On Sep 23, 2010, at 3:22 PM, mathias legrand wrote:

> Hi all,
> I'm slowly investigating XeLatex and pstricks (Miktex 2.8) and what I am to say has already been mentioned on the web but I cannot solve the problem : the \psclip command does not work properly with Xelatex.
> What is the results for you with what follows? Thank you. I downloaded
> the xdvipdfmx.cfg file from CTAN and put it where I compile the document (not in the tex tree) and my system is (I hope) up-to-date.
> The file compiles well without the \psclip command.
> \listfiles
> \documentclass[11pt]{book}
> \usepackage{mathrsfs}
> \usepackage[no-math]{fontspec}
> \usepackage{xcolor}
> \usepackage{lipsum}
> \usepackage[frenchb]{babel}
> \defaultfontfeatures{Scale=MatchLowercase, Mapping=tex-text, Numbers=OldStyle}
> \setmainfont{Minion Pro}
> \setsansfont[BoldFont={Myriad Pro Semibold}, BoldItalicFont={Myriad Pro Semibold Italic}]{Myriad Pro}
> \setmonofont[Scale=MatchLowercase]{Myriad Pro}
> \usepackage{pst-plot}
> \usepackage{pstricks-add}
> \definecolor{ocre}{RGB}{243,102,25}
> \begin{document}
> \chapter{One}
> \section{One}
> \begin{figure}[h]
> \def\yMax{1.3}
> \def\xMax{3.83}
> \begin{pspicture}(-\xMax,-\yMax)(\xMax,\yMax)
> \psclip{\psframe[fillstyle=solid,fillcolor=gray!10,linestyle=none](-\xMax,-\yMax)(\xMax,\yMax)}
> \psline[linecolor=gray!50](-\xMax,0)(\xMax,0)
> \psline[linecolor=gray!50](0,-\yMax)(0,\yMax)
> \psplot[linewidth=1.25pt,algebraic=true,linecolor=ocre,plotpoints=100]{-\xMax}{\xMax}{2*x^2-1/2}
> \endpsclip
> \end{pspicture}
> \end{figure}
> \end{document}

Your file compiled correctly for me with clipping as expected. (I'm using TeXLive 2010 on a Mac, and the version of xdvipdfmx.cfg that came with TeXLive 2010.) Here's my filelist:

 *File List*
    book.cls    2007/10/19 v1.4h Standard LaTeX document class
    bk11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
mathrsfs.sty    1996/01/01 Math RSFS package v1.0 (jk)
fontspec.sty    2010/08/01 v2.0c Advanced font selection for XeLaTeX/LuaLaTeX
   expl3.sty    2010/09/14 v2020 L3 Experimental code bundle wrapper
 l3names.sty    2010/07/25 v1987 L3 Experimental Naming Scheme for TeX Primitiv
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2010/08/04 v1992 L3 Experimental basic definitions
 l3expan.sty    2010/08/04 v1991 L3 Experimental Argument Expansion module
    l3tl.sty    2010/05/22 v1919 L3 Experimental Token Lists
l3intexpr.sty    2010/06/15 v1957 L3 Integer Expressions
 l3quark.sty    2010/03/21 v1853 L3 Experimental Quark Commands
   l3seq.sty    2010/03/29 v1879 L3 Experimental sequences and stacks
  l3toks.sty    2010/05/25 v1933 L3 Experimental Token Registers
   l3int.sty    2010/05/25 v1933 L3 Experimental Integer module
   l3prg.sty    2010/08/04 v1992 L3 Experimental control structures
 l3clist.sty    2010/08/04 v1992 L3 Experimental comma separated lists
 l3token.sty    2010/04/11 v1890 L3 Experimental token investigation and manipu
  l3prop.sty    2010/03/21 v1857 L3 Experimental Property Lists
   l3msg.sty    2010/03/23 v1866 L3 Experimental LaTeX Messages module
    l3io.sty    2010/05/22 v1923 L3 Experimental i/o module
  l3skip.sty    2010/05/25 v1933 L3 Experimental skip registers
   l3box.sty    2010/09/03 v2015 L3 Experimental Box module
l3keyval.sty    2010/04/11 v1890 L3 Experimental keyval processing
  l3keys.sty    2010/05/24 v1931 L3 Experimental key-value support
l3precom.sty    2010/02/09 v1793 L3 Experimental precompilation module
  l3xref.sty    2010/02/09 v1786 L3 Experimental cross referencing
  l3file.sty    2010/03/21 v1853 L3 Experimental file loading
    l3fp.sty    2010/09/14 v2021 L3 Experimental floating-point operations
l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
  xparse.sty    2010/05/23 v1927 Generic document command parser
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
fontspec-patches.sty    2010/08/01 v2.0c Advanced font selection for XeLaTeX/Lu
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
  eu1enc.def    2010/05/27 v0.1g Experimental Unicode font encodings
  eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  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)

  lipsum.sty    2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text
   babel.sty    2008/07/06 v3.8l The Babel package
 frenchb.ldf    2009/03/16 v2.3d French support from the babel system
pst-plot.sty    2010/01/22 package wrapper for pst-plot.tex
pstricks.sty    2010/08/28 v0.46 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2010/09/16 v2.12 `PSTricks' (tvz,hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
  pst-fp.tex    2010/09/16 v2.12 `PST-fp' (hv)
pst-plot.tex    2010/09/09 1.20 `pst-plot' (tvz,hv)
pstricks-add.sty    2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv
pstricks-add.tex    2010/08/28 v3.44 `PSTricks-add' (hv)


More information about the PSTricks mailing list