LaTeX forum ⇒ Graphics, Figures & TablesProper configuration of TEXSTDIO for PStricks

Information and discussion about graphics, figures & tables in LaTeX documents.
rstm
Posts: 8
Joined: Tue Nov 13, 2018 7:07 pm

Proper configuration of TEXSTDIO for PStricks

Postby rstm » Sat Dec 29, 2018 1:43 pm

Good time of the day!
Code I am trying to compile:

  1. \documentclass{article}% Markus Krebs 2007
  2. \usepackage[svgnames,pdf]{pstricks}
  3. \usepackage{pst-3dplot,pstricks-add}
  4. \usepackage{auto-pst-pdf}
  5. \makeatletter
  6. \def\psxyzlabel#1{\small\expandafter\@stripDecimals#1..\@nil}
  7. \makeatother
  8.  
  9. \begin{document}
  10.  
  11. \psset{unit=.65,plotpoints=2000,linejoin=1,coorType=2,xyDecimals=2}
  12. \psframebox{%
  13. \begin{pspicture}(-7.5,-6.5)(14,14)
  14. %
  15. \pstThreeDCoor[xMax=11,yMax=13,zMax=13,
  16. nameX=$x_1$,nameY=$x_2$,nameZ=$x_3$,
  17. IIIDticks,IIIDticksize=0.2,linewidth=.75pt,linecolor=Black,
  18. IIIDxticksep=-.8,IIIDyticksep=-.5,IIIDzticksep=-.9,
  19. drawing,Alpha=90,IIIDxTicksPlane=yz]
  20. %
  21. \pstThreeDNode(0,0,0){A}
  22. \pstThreeDNode(8,0,0){B}
  23. \pstThreeDNode(8,8,0){C}
  24. \pstThreeDNode(0,8,0){D}
  25. \pstThreeDNode(4,4,12){S}
  26. \pstThreeDNode(4,4,0){F}
  27. %
  28. \pstThreeDNode(10,0, 14 5 div){X}
  29. \pstThreeDNode(10,7,0){XY}
  30. \pstThreeDNode(0,12,0){Y}
  31. \pstThreeDNode(0,0,24 5 div){Z}
  32. %
  33. \pspolygon[linecolor=Blue,fillstyle=solid,fillcolor=gray,
  34. opacity=0.5](A)(B)(C)(D)
  35. \pspolygon[linecolor=DarkGreen, linewidth=1pt,
  36. fillstyle=solid,fillcolor=Orange,opacity=0.5](X)(XY)(Y)(Z)
  37. \psline[linewidth=1pt](A)(S)
  38. \psline[linewidth=1pt](B)(S)
  39. \psline[linewidth=1pt](C)(S)
  40. \psline[linewidth=1pt](D)(S)
  41. %
  42. \parametricplotThreeD[linecolor=DarkGreen,linestyle=dashed](.4,.5833333333){-24
  43. t mul 24 add 0 24 5 div t mul}
  44. \parametricplotThreeD[linecolor=DarkGreen,linestyle=dashed](.45,.5833333333){-24
  45. t mul 24 add 12 t mul 0}
  46.  
  47. \psset{linewidth=1.75pt}
  48. \pstThreeDNode(4 3 div , 4 3 div, 4){SA}
  49. \pstThreeDNode(7,1,3){SB}
  50. \pstThreeDNode(8,8,0){SC}
  51. \pstThreeDNode(4 7 div , 52 7 div , 12 7 div){SD}
  52. \pspolygon(SA)(SB)(SC)(SD)
  53.  
  54. \end{pspicture}}
  55. \end{document}


TexStudio settings:

Build&View: txs:///pdf-chain
DefaultCompiler: txs:///pdflatex

pdflatex.exe -synctex=1 --enable-write18 -interaction=nonstopmode %.tex


Error I get:

<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb>

<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb>[1

]

pdfcrop: The script engine could not be found. pdfcrop: Data: scriptEngine="perl.exe", scriptName="pdfcrop"

Process exited normally


Thank you in advance.

User avatar
Johannes_B
Site Moderator
Posts: 3971
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Dec 29, 2018 1:50 pm

Seems MikTeX doesn't come with some version of PERL installed.

I guess you need to manually install that programming language for pdfcrop to work.
Have a look at activePerl or strawberryPerl.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

rstm
Posts: 8
Joined: Tue Nov 13, 2018 7:07 pm

Postby rstm » Sat Dec 29, 2018 1:58 pm

Thank you, but how I tell top Miktex, where perl is installed?
By the way, a several years ago there was a similar post:
https://latex.org/forum/viewtopic.php?t=14677

User avatar
Johannes_B
Site Moderator
Posts: 3971
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Dec 29, 2018 2:19 pm

If perl is installed correctly, it is included in the PATH and every program will find it.

If it is a MikTeX thing, have you had a look at the bug tracker?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

rstm
Posts: 8
Joined: Tue Nov 13, 2018 7:07 pm

Postby rstm » Sat Dec 29, 2018 4:22 pm

Where I can look at bug tracker?
I am not a programmer to go to internals of MikTex.
I only want to use PStricks to draw pictures.

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

Postby Stefan Kottwitz » Sat Dec 29, 2018 6:41 pm

PSTricks usually works fine with XeLaTeX. In that case you don't need pdfcrop or perl. Just remove \usepackage{auto-pst-pdf} and compile with XeLaTeX instead of pdfLaTeX.

Stefan
Site admin

rstm
Posts: 8
Joined: Tue Nov 13, 2018 7:07 pm

Postby rstm » Sat Dec 29, 2018 9:30 pm

But I want to work with pdf-latex. Xetex has its drawbacks.

https://tex.stackexchange.com/questions ... tex-luatex


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests