Graphics, Figures & Tablespst-poly | Basic Error

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

pst-poly | Basic Error

Post by coachbennett1981 »

I am trying to create some regular polygons for a presentation using beamer, but I get the following error:
Argument of \special@length has an extra }

Runaway argument? {\PstPoly@IntermediatePointDim} \ignorespaces
Here is the code:

Code: Select all

\documentclass[compress]{beamer}
\mode<presentation>
\usetheme{JuanLesPins}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pstricks}
\usepackage{pst-poly}
\usepackage{pstricks-add}
\usepackage{pst-all}

\begin{document}

\section{Example B}
	\begin{frame}{Example B}
		\begin{example}	
			Determine the number of lines of symmetry in the quadrilateral. 
					\begin{pspicture}(0,0)(2,1) 
						\PstPolygon[PolyNbSides=4]
					\end{pspicture} 
		\end{example}
	\end{frame}
\end{document}
Thanks for the help,

Nicholas

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: pst-poly | Basic Error

Post by Stefan Kottwitz »

Hi Nicholas,

the example works for me, both with LaTeX and XeLaTeX. I used pst-poly version 1.61 of 2009/12/20 and pstricks.tex version 2.20 of 2011/04/23. If your version is older, an update could help.

You can see the version numbers of the used packages in the .log file, if you place the command \listfiles in your preamble and compile again.

Stefan
LaTeX.org admin
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

pst-poly | Basic Error

Post by coachbennett1981 »

Stefan,
thanks for the reply. I could not find the pst-poly in the log file. I can upload if you want. I did find the pstricks:
(/usr/local/texlive/2009/texmf-dist/tex/latex/pstricks/pstricks.sty
Package: pstricks 2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
Can you explain how to update pstricks? I am running TeXShop 2.43 which is updated. I have never understood how to update a package individually. I go to the pstricks homepage and see the .sty files and .tex files, but have no clue what I am doing


Nicholas
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

pst-poly | Basic Error

Post by Stefan Kottwitz »

Hi Nicholas,

with TeX Live and MacTeX, you could use the TeX Live Manager. Run at the command prompt, i.e. in a terminal window:

Code: Select all

sudo tlmgr update pstricks
However, you could consider updating your TeX Live (MacTeX) version from 2009 to the current version 2011. Also this can be done using tlmgr. Start the GUI by

Code: Select all

sudo tlmgr -gui
Stefan
LaTeX.org admin
Post Reply