Graphics, Figures & TablesPSTricks - images do not build

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
marekdor
Posts: 1
Joined: Fri Jun 11, 2010 9:00 am

PSTricks - images do not build

Post by marekdor »

Hi, i try to build some drawings using pstricks, and i get the following errors.
my code for example:

Code: Select all

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}
\psset{trigLabels,labelFontSize=\scriptstyle}

\begin{pspicture}(-\psPiTwo,-4)(7,4)
\psaxes[trigLabelBase=3,xunit=\pstRadUnit]%
   {<->}(0,0)(-\psPiTwo,-4)(\psPiTwo,4)
\psplot[linecolor=red,linewidth=1.5pt,
  plotpoints=1000,algebraic]{-\psPiTwo}{\psPiTwo}{3*cos(3*x)}

\end{pspicture}

\end{document}
i get errors :

Code: Select all

marekd@kapec ~ $ pdflatex triks.tex
This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
entering extended mode
(./triks.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, latin, polish, loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty (./pstricks.sty
(/usr/share/texmf-dist/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.31  <2009/11/27> (tvz)
(/usr/share/texmf-dist/tex/generic/pstricks/pstricks.con))
(/usr/share/texmf-dist/tex/generic/pstricks-add/pst-fp.tex
`pst-fp' v0.04, 2009/11/24 (hv))
(/usr/share/texmf-site/tex/latex/xcolor/xcolor.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
(/usr/share/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
(/usr/share/texmf-dist/tex/generic/pstricks/pst-plot.tex
(/usr/share/texmf-dist/tex/generic/multido/multido.tex
 v1.41, 2004/05/18 <tvz>)  v1.04, 2009/06/08)
(/usr/share/texmf-dist/tex/generic/pstricks/pst-node.tex  v1.01, 2008/11/26)
(/usr/share/texmf-dist/tex/generic/pst-3d/pst-3d.tex
(/usr/share/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/usr/share/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texmf-dist/tex/generic/xkeyval/keyval.tex))))
`PST-3d' v1.00, 2005/09/03 (tvz))
(/usr/share/texmf-dist/tex/generic/pst-math/pst-math.tex
`pst-math' v0.23 , (CJ,hv)) `pstricks-add' v3.36, 2009/11/14 (dr,hv))
(/usr/share/texmf-dist/tex/generic/pstricks-add/pst-fp.tex)) (./triks.aux)
(/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 
! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.10 \psplot
            [linecolor=red,linewidth=1.5pt,
? 

! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.11 ...lgebraic]{-\psPiTwo}{\psPiTwo}{3*cos(3*x)}
                                                  
? ! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.11 ...lgebraic]{-\psPiTwo}{\psPiTwo}{3*cos(3*x)}
                                                  
? 

! Undefined control sequence.
<recently read> \c@lor@to@ps 
                             
l.11 ...lgebraic]{-\psPiTwo}{\psPiTwo}{3*cos(3*x)}
                                                  
? ! Undefined control sequence.
\XC@usec@lor ...\expandafter \c@lor@to@ps #1#2\@@ 
                                                  \else \expandafter \expand...
l.11 ...lgebraic]{-\psPiTwo}{\psPiTwo}{3*cos(3*x)}
                                                  
? 


Overfull \hbox (47.94313pt too wide) in paragraph at lines 13--14
[][] 


[1
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!{//var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map

}
Non-PDF special ignored!] (./triks.aux) )</usr/share/texmf-dist/fonts/type1/pub
lic/amsfonts/cm/cmmi5.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm
/cmmi7.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
></us
r/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb></usr/share/texmf-di
st/fonts/type1/public/amsfonts/cm/cmr7.pfb></usr/share/texmf-dist/fonts/type1/p
ublic/amsfonts/cm/cmsy5.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/
cm/cmsy7.pfb>
Output written on triks.pdf (1 page, 54988 bytes).
Transcript written on triks.log.
What am i doing wrong, or may what packages i have not installed yet ?

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks - images do not build

Post by localghost »

PSTricks (PostScript Tricks) doesn't work with pdflatex directly [1]. See also point #4 in the list of frequently done errors on the PSTricks homepage. You have to
  • use the compilation route »LaTeX → DVI → PS → PDF« or
  • use the (auto-)pst-pdf package
[1] /PSTrick/pdf/pfdoutput


Best regards and welcome to the board
Thorsten
Post Reply