Peter-TI
Peter-TI

Reputation: 101

How to install pstricks on a mac (using emacs and orgmode.)

What I have now in my orgmode file is:

#+BEGIN_SRC latex

\begin{pspicture}(7,3)
\psline[linecolor=red,linestyle=dotted](0,4)(7,4)
\psline[linecolor=red,linestyle=dotted](0,3)(7,3)
\psline[linecolor=red,linestyle=dotted](0,2)(7,2)

\cnode*(0,1){1mm}{n1}
\cnode*(2,1){1mm}{n2}
\cnode*(4,1){1mm}{n3}
\cnode(6,1){2mm}{c}

\ncangle[armB=1.2,angleA=90,angleB=135]{->}{n3}{c}  % armA = ca. 1
\ncangle[armB=2.2,angleA=90,angleB=125]{->}{n2}{c}  % armA = ca. 2
\ncangle[armB=3.1,angleA=90,angleB=115]{->}{n1}{c}  % armA = ca. 3
\end{pspicture}

#+END_SRC

What I have in my latex ~/.emacs to configure latex is:

    \\usepackage{pstricks,pst-node}
    \\usepackage{pstricks-add}
    \\usepackage{auto-pst-pdf}
    \\usepackage{pst-pdf}

This method works for all packages i.e. \usepackage{amsmath, amsthm, amssymb,amsfonts,epsfig} But nor for pstricks After compiling to pdf, i find an empty space and no errors in my log.

After some searching I found that I needed to add some pstrick(-add) file to my main latex files.

The only thing I could find that might be the main latex files is, path:

\Library\Tex\* 

But I have no idea where to place the pstrick files.

Some help please. Thank you.

Upvotes: 0

Views: 367

Answers (1)

Peter-TI
Peter-TI

Reputation: 101

I found a solution I would like to share. With emacs I generate a file.tex file.

Command:

emacs --batch -f org-latex-export-to-latex

then in the export folder:

latex -shell-escape file.tex

This generates a dvi.Then Command

dvips file.dvi

Then last but not least,command:

ps2pdf file.ps

Now I have my great nice pdf with my nice Calculus. I searched for 2 days :D. Finally. I really wanted to use pstricks over tikz or pgf. Easy syntax->Fast workflow.

I found the solution on https://nl.sharelatex.com/learn/Choosing%20a%20LaTeX%20Compiler by looking at the latex compiling file flow.

Upvotes: 0

Related Questions