LaTeX forum ⇒ Document ClassesPSTricks - TexLive: How to

Information and discussion about specific document classes and how to create your own document classes.
svenskmand
Posts: 5
Joined: Wed Aug 06, 2008 1:52 pm

PSTricks - TexLive: How to

Postby svenskmand » Thu Sep 11, 2008 4:58 pm

Hello everybody,

i wanted to try out PSTricks as I often need math in my figures, so i installed the package "pstricks" and tried this example (I got the example from http://tug.org/PSTricks/Examples/Simple/simple0.tex so it should work)

  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage{pstricks}
  3.  
  4. \begin{document}
  5. \newgray{lGray}{0.95}
  6. \psset{unit=0.05mm}% 1:20, or =0.1mm for 1:10
  7. \begin{pspicture}(-100,-100)(1000,1300)
  8. \pspolygon[linewidth=2pt,fillcolor=lGray,%
  9. fillstyle=solid](0,0)(0,940)(860,1250)(860,0)
  10. \psset{linewidth=0.2pt,arrowscale=2,tbarsize=10pt}
  11. \psline{|<->|}(0,-100)(860,-100)\rput*(430,-100){860mm}
  12. \psline{|<->|}(960,0)(960,1250)\rput*{90}(960,625){1250mm}
  13. \psline{|<->|}(-100,0)(-100,940)\rput*{90}(-100,470){940mm}
  14. \end{pspicture}
  15.  
  16. \end{document}


and got the following error

  1. This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
  2. %&-line parsing enabled.
  3. entering extended mode
  4. (./simple0.tex
  5. LaTeX2e <2005/12/01>
  6. Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
  7. yphenation, loaded.
  8. (/usr/share/texmf-texlive/tex/latex/base/article.cls
  9. Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
  10. (/usr/share/texmf-texlive/tex/latex/base/size12.clo))
  11. (/home/svenskmand/texmf/tex/latex/pstricks/pstricks.sty
  12. (/home/svenskmand/texmf/tex/generic/pstricks/pstricks.tex
  13. `PSTricks' v1.26 <2008/07/31> (tvz)
  14. (/home/svenskmand/texmf/tex/generic/pstricks/pstricks.con))
  15. (/usr/share/texmf-texlive/tex/latex/graphics/color.sty
  16. (/etc/texmf/tex/latex/config/color.cfg)
  17. (/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))) (./simple0.aux)
  18. ! Undefined control sequence.
  19. <recently read> \c@lor@to@ps
  20.  
  21. l.9 fillstyle=solid](
  22. 0,0)(0,940)(860,1250)(860,0)
  23. ! Undefined control sequence.
  24. \pst@usecolor ...\string \color@ #1\endcsname \@@
  25. \space
  26. l.9 fillstyle=solid](
  27. 0,0)(0,940)(860,1250)(860,0)
  28. ! Undefined control sequence.
  29. <recently read> \c@lor@to@ps
  30.  
  31. l.10 \psset
  32. {linewidth=0.2pt,arrowscale=2,tbarsize=10pt}
  33. ! Undefined control sequence.
  34. \pst@usecolor ...\string \color@ #1\endcsname \@@
  35. \space
  36. l.10 \psset
  37. {linewidth=0.2pt,arrowscale=2,tbarsize=10pt}
  38. ! Undefined control sequence.
  39. <recently read> \c@lor@to@ps
  40.  
  41. l.10 \psset
  42. {linewidth=0.2pt,arrowscale=2,tbarsize=10pt}
  43. ! Undefined control sequence.
  44. \pst@usecolor ...\string \color@ #1\endcsname \@@
  45. \space
  46. l.10 \psset
  47. {linewidth=0.2pt,arrowscale=2,tbarsize=10pt}
  48. ! Undefined control sequence.
  49. <recently read> \c@lor@to@ps
  50.  
  51. l.11 \psline{|<->|}
  52. (0,-100)(860,-100)\rput*(430,-100){860mm}
  53. ! Undefined control sequence.
  54. \pst@usecolor ...\string \color@ #1\endcsname \@@
  55. \space
  56. l.11 \psline{|<->|}
  57. (0,-100)(860,-100)\rput*(430,-100){860mm}
  58. ! Undefined control sequence.
  59. <recently read> \c@lor@to@ps
  60.  
  61. l.11 \psline{|<->|}(0,-100)(860,-100)\rput
  62. *(430,-100){860mm}
  63. ! Undefined control sequence.
  64. \pst@usecolor ...\string \color@ #1\endcsname \@@
  65. \space
  66. l.11 \psline{|<->|}(0,-100)(860,-100)\rput
  67. *(430,-100){860mm}
  68. ! Undefined control sequence.
  69. <recently read> \c@lor@to@ps
  70.  
  71. l.11 ...}(0,-100)(860,-100)\rput*(430,-100){860mm}
  72.  
  73. ! Undefined control sequence.
  74. \pst@usecolor ...\string \color@ #1\endcsname \@@
  75. \space
  76. l.11 ...}(0,-100)(860,-100)\rput*(430,-100){860mm}
  77.  
  78. ! Undefined control sequence.
  79. <recently read> \c@lor@to@ps
  80.  
  81. l.11 ...}(0,-100)(860,-100)\rput*(430,-100){860mm}
  82.  
  83. ! Undefined control sequence.
  84. \pst@usecolor ...\string \color@ #1\endcsname \@@
  85. \space
  86. l.11 ...}(0,-100)(860,-100)\rput*(430,-100){860mm}
  87.  
  88. ! Undefined control sequence.
  89. <recently read> \c@lor@to@ps
  90.  
  91. l.12 \psline{|<->|}
  92. (960,0)(960,1250)\rput*{90}(960,625){1250mm}
  93. ! Undefined control sequence.
  94. \pst@usecolor ...\string \color@ #1\endcsname \@@
  95. \space
  96. l.12 \psline{|<->|}
  97. (960,0)(960,1250)\rput*{90}(960,625){1250mm}
  98. ! Undefined control sequence.
  99. <recently read> \c@lor@to@ps
  100.  
  101. l.12 \psline{|<->|}(960,0)(960,1250)\rput
  102. *{90}(960,625){1250mm}
  103. ! Undefined control sequence.
  104. \pst@usecolor ...\string \color@ #1\endcsname \@@
  105. \space
  106. l.12 \psline{|<->|}(960,0)(960,1250)\rput
  107. *{90}(960,625){1250mm}
  108. ! Undefined control sequence.
  109. <recently read> \c@lor@to@ps
  110.  
  111. l.12 ...60,0)(960,1250)\rput*{90}(960,625){1250mm}
  112.  
  113. ! Undefined control sequence.
  114. \pst@usecolor ...\string \color@ #1\endcsname \@@
  115. \space
  116. l.12 ...60,0)(960,1250)\rput*{90}(960,625){1250mm}
  117.  
  118. ! Undefined control sequence.
  119. <recently read> \c@lor@to@ps
  120.  
  121. l.12 ...60,0)(960,1250)\rput*{90}(960,625){1250mm}
  122.  
  123. ! Undefined control sequence.
  124. \pst@usecolor ...\string \color@ #1\endcsname \@@
  125. \space
  126. l.12 ...60,0)(960,1250)\rput*{90}(960,625){1250mm}
  127.  
  128. ! Undefined control sequence.
  129. <recently read> \c@lor@to@ps
  130.  
  131. l.13 \psline{|<->|}
  132. (-100,0)(-100,940)\rput*{90}(-100,470){940mm}
  133. ! Undefined control sequence.
  134. \pst@usecolor ...\string \color@ #1\endcsname \@@
  135. \space
  136. l.13 \psline{|<->|}
  137. (-100,0)(-100,940)\rput*{90}(-100,470){940mm}
  138. ! Undefined control sequence.
  139. <recently read> \c@lor@to@ps
  140.  
  141. l.13 \psline{|<->|}(-100,0)(-100,940)\rput
  142. *{90}(-100,470){940mm}
  143. ! Undefined control sequence.
  144. \pst@usecolor ...\string \color@ #1\endcsname \@@
  145. \space
  146. l.13 \psline{|<->|}(-100,0)(-100,940)\rput
  147. *{90}(-100,470){940mm}
  148. ! Undefined control sequence.
  149. <recently read> \c@lor@to@ps
  150.  
  151. l.13 ...00,0)(-100,940)\rput*{90}(-100,470){940mm}
  152.  
  153. ! Undefined control sequence.
  154. \pst@usecolor ...\string \color@ #1\endcsname \@@
  155. \space
  156. l.13 ...00,0)(-100,940)\rput*{90}(-100,470){940mm}
  157.  
  158. ! Undefined control sequence.
  159. <recently read> \c@lor@to@ps
  160.  
  161. l.13 ...00,0)(-100,940)\rput*{90}(-100,470){940mm}
  162.  
  163. ! Undefined control sequence.
  164. \pst@usecolor ...\string \color@ #1\endcsname \@@
  165. \space
  166. l.13 ...00,0)(-100,940)\rput*{90}(-100,470){940mm}
  167.  
  168. [1
  169. Non-PDF special ignored!
  170. Non-PDF special ignored!
  171. Non-PDF special ignored!
  172. Non-PDF special ignored!
  173. Non-PDF special ignored!
  174. Non-PDF special ignored!{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}
  175. Non-PDF special ignored!
  176. Non-PDF special ignored!
  177. Non-PDF special ignored!
  178. Non-PDF special ignored!
  179. Non-PDF special ignored!
  180. Non-PDF special ignored!
  181. Non-PDF special ignored!
  182. Non-PDF special ignored!] (./simple0.aux) )
  183. (see the transcript file for additional information)</usr/share/texmf-texlive/f
  184. onts/type1/bluesky/cm/cmr12.pfb>
  185. Output written on simple0.pdf (1 page, 5069 bytes).
  186. Transcript written on simple0.log.


I have TexLive version 2007-13 installed from the repo in Ubuntu 8.04 and use MiKTeX Package Manager (mpm) to install other packages. I installed pstricks from mpm, but as i got the above problem i installed texlive-pstricks from Synaptic, but I still got the above error. Anybody have any clue?

Best regards.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8253
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Sep 11, 2008 5:23 pm

Hi Svenskmand,

don't use pdflatex with PSTricks, compile with latex instead. There are different buttons for instance in Kile. If you want to produce pdf output format, compile with latex to dvi, convert to ps by dvips and then to pdf by ps2pdf. Kile provides buttons for each step.

Stefan
Site admin

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Thu Sep 11, 2008 6:42 pm

Take at look at the frequently done errors on the homepage of PSTricks. Pay special attention to point 5 of the list. This is what Stefan already mentioned.


Best regards
Thorsten¹
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

svenskmand
Posts: 5
Joined: Wed Aug 06, 2008 1:52 pm

Postby svenskmand » Thu Sep 11, 2008 8:05 pm

Stefan_K wrote:Hi Svenskmand,

don't use pdflatex with PSTricks, compile with latex instead. There are different buttons for instance in Kile. If you want to produce pdf output format, compile with latex to dvi, convert to ps by dvips and then to pdf by ps2pdf. Kile provides buttons for each step.

Stefan


Thank you :), worked like a charm :)


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 1 guest