Graphics, Figures & TablesProper configuration of TEXSTDIO for PStricks

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

Proper configuration of TEXSTDIO for PStricks

Post by rstm »

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

Code: Select all

\documentclass{article}% Markus Krebs 2007
\usepackage[svgnames,pdf]{pstricks}
\usepackage{pst-3dplot,pstricks-add}
\usepackage{auto-pst-pdf}
\makeatletter
\def\psxyzlabel#1{\small\expandafter\@stripDecimals#1..\@nil}
\makeatother

\begin{document}

\psset{unit=.65,plotpoints=2000,linejoin=1,coorType=2,xyDecimals=2}
\psframebox{%
\begin{pspicture}(-7.5,-6.5)(14,14)
%
\pstThreeDCoor[xMax=11,yMax=13,zMax=13,
  nameX=$x_1$,nameY=$x_2$,nameZ=$x_3$,
  IIIDticks,IIIDticksize=0.2,linewidth=.75pt,linecolor=Black,
  IIIDxticksep=-.8,IIIDyticksep=-.5,IIIDzticksep=-.9,
  drawing,Alpha=90,IIIDxTicksPlane=yz]
%
\pstThreeDNode(0,0,0){A}
\pstThreeDNode(8,0,0){B}
\pstThreeDNode(8,8,0){C}
\pstThreeDNode(0,8,0){D}
\pstThreeDNode(4,4,12){S}
\pstThreeDNode(4,4,0){F}
%
\pstThreeDNode(10,0, 14 5 div){X}
\pstThreeDNode(10,7,0){XY}
\pstThreeDNode(0,12,0){Y}
\pstThreeDNode(0,0,24 5 div){Z}
%
\pspolygon[linecolor=Blue,fillstyle=solid,fillcolor=gray,
    opacity=0.5](A)(B)(C)(D)
\pspolygon[linecolor=DarkGreen, linewidth=1pt,
    fillstyle=solid,fillcolor=Orange,opacity=0.5](X)(XY)(Y)(Z)
\psline[linewidth=1pt](A)(S)
\psline[linewidth=1pt](B)(S)
\psline[linewidth=1pt](C)(S)
\psline[linewidth=1pt](D)(S)
%
\parametricplotThreeD[linecolor=DarkGreen,linestyle=dashed](.4,.5833333333){-24 
t mul 24 add 0 24 5 div t mul}
\parametricplotThreeD[linecolor=DarkGreen,linestyle=dashed](.45,.5833333333){-24 
t mul 24 add 12 t mul 0}

\psset{linewidth=1.75pt}
\pstThreeDNode(4 3 div , 4 3 div, 4){SA}
\pstThreeDNode(7,1,3){SB}
\pstThreeDNode(8,8,0){SC}
\pstThreeDNode(4 7 div , 52 7 div , 12 7 div){SD}
\pspolygon(SA)(SB)(SC)(SD)

\end{pspicture}}
\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.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Proper configuration of TEXSTDIO for PStricks

Post by Johannes_B »

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

Proper configuration of TEXSTDIO for PStricks

Post by rstm »

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: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Proper configuration of TEXSTDIO for PStricks

Post by Johannes_B »

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

Proper configuration of TEXSTDIO for PStricks

Post by rstm »

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: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Proper configuration of TEXSTDIO for PStricks

Post by Stefan Kottwitz »

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
LaTeX.org admin
rstm
Posts: 8
Joined: Tue Nov 13, 2018 7:07 pm

Proper configuration of TEXSTDIO for PStricks

Post by rstm »

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

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