7

Consider the following example:

\documentclass{article}

\usepackage{pst-poly}

\begin{document}

\begin{figure}
\def\sidelaengde{5 }
\def\myCoor{}
\centering
 \psset{unit = 0.4}
  \begin{pspicture}(-12.5,-13.1)(12.5,10.6)
   \psset{
     linewidth = 1pt,
     linecolor = green!90!yellow!70!blue!70,
     fillstyle = solid,
     fillcolor = green!60!yellow!80!blue!80
   }
    \rput(0,0){\PstPentagon[unit = \sidelaengde]}
    \pstVerb{/R1 \sidelaengde 36 cos mul dup add def /R2 R1 \sidelaengde add def}
    \multido{\iA = -90+72}{5}{%
      \xdef\myCoor{\myCoor(!R2 \iA\space PtoC)}
      \rput{36}(!R1 \iA\space PtoC){\PstPentagon[unit = \sidelaengde]}}
    \rput(!1.55 \sidelaengde mul neg 0.2 \sidelaengde mul){\sidelaengde cm}
   \psset{
     fillstyle = none,
     linewidth = 1pt,
     linecolor = black
   }
    \expandafter
    \pspolygon
    \myCoor
  \end{pspicture}
\end{figure}

\end{document}

output1

As can be seen, the black pentagon doesn't surround the smaller, green pentagons perfectly. In the past, the 'fit' has been perfect so I wonder if an error has been introduced into pst-poly at some point.

Update

I also have the problem with the following PSTricks figure:

\documentclass{article}

\usepackage{amsmath}
\usepackage{pst-poly,pstricks-add}

\begin{document}

\begin{figure}
\def\sider{6}
\def\radius{3.5}
\pstFPdiv\vinkel{360}{\sider}
\centering
 \psset{
   unit = 0.9,
   linejoin = 2
 }
  \begin{pspicture}(-\radius,-\radius)(\radius,\radius)
    \pscircle(0,0){\radius}
    \rput(0,0){\PstPolygon[ PolyNbSides = \sider, unit = \radius]}
    \multido{\r = 0+\vinkel}{\sider}{%
      \psRelLine[angle = \r, linestyle = dotted](0,0)(\radius,0){1}{A}}
    \pcline[linestyle = none, offset = 9pt](0,0)(\radius,0)
    \ncput{$r = \radius\,\text{cm}$}
  \end{pspicture}
\end{figure}

\end{document}

output2

Update 2

Here is 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)
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
pst-poly.sty    2009/12/20 package wrapper for pst-poly.tex (dg,hv)
pstricks.sty    2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
pstricks.tex    2014/07/31 v2.56 `PSTricks' (tvz,hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
 xkeyval.sty    2014/05/25 v2.7 package option processing (HA)
 xkeyval.tex    2014/05/25 v2.7 key=value parser (HA)
  pst-fp.tex    2014/07/31 v2.56 `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
   dvips.def    2014/04/23 v3.0j Driver-dependant file (DPC,SPQR)
pst-poly.tex    2009/12/20 v1.61 `PST-poly' (dg,hv)
pstricks-add.sty    2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv)
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)
pst-plot.tex    2014/08/23 1.70 `pst-plot' (tvz,hv)
pst-node.sty    2010/04/22 package wrapper for pst-node.tex
pst-node.tex    2014/08/23 1.70 `pst-node' (tvz,hv)
  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    2014/07/30 package wrapper for PSTricks pst-math.tex
pstricks-add.tex    2014/07/22 v3.75 `PSTricks-add' (hv)
pstricks-add.cfg    2005/01/10 v0.1 addtional user stuff (hv)
  • Both your examples work fine for me using MiKTeX (updated today). – Christoph Aug 28 '14 at 10:19
  • @Christoph Hmmm. That's wired! I use TeX Live 2014, updated today, on a Linux machine. Do you (or anyone else) have an idea of what's wrong? – Svend Tveskæg Aug 28 '14 at 10:56
  • I can check only this evening on my Linux box with TeXLive 2014. You could add a \listfiles to see if any PSTricks from a local texmf-tree is used instead of the TeXLive version. – Christoph Aug 28 '14 at 11:27
  • @Christoph Thank you for taking the time to check later. I've updated my question with the list of files. – Svend Tveskæg Aug 28 '14 at 11:45
  • Ok, here with MikTeX I have pstricks.tex version 2.49b (dated 2013/12/21). Using 2.56 I can reproduce your problem, although I don't yet know where the error exactly is. – Christoph Aug 28 '14 at 12:03
5

it is a bug with a trailing space in \PstPolygon. Try the version from http://texnik.dante.de/tex/generic/pst-poly/ It should fix it, as can be seen here:

enter image description here

  • I assume it gets on CTAN as soon as possible, right? :) – Svend Tveskæg Aug 29 '14 at 15:40
  • 1
    sure, should be available at least tomorrow. – user2478 Aug 29 '14 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.