# Definition of PSTricks constant and improvement of code for drawing of Pantheon

Consider the following.

Code

% pdflatex -shell-escape test.tex

\documentclass{article}

\usepackage{
auto-pst-pdf,
pst-eucl,
}
\usepackage{siunitx}

\begin{document}

\begin{figure}
\def\vinkelA{12}        % angle
\def\faktor{0.33333333} % Scaling
\newlength\maksimum \maksimum=2\faktor\radius\psunit % This doesn't work!
\centering
\psset{
unit=0.8cm,
linecolor=red
}
\begin{pspicture}(\maksimum,\maksimum)
\pnode(0,0){A}
\pnode(!2 \faktor\space \radius\space mul mul 0){D}
\psline(C)(D)(A)(B)
\psline[linestyle=dashed](B)(C)
\psset{
linecolor=blue,
linewidth=1.5pt
}
\psRelLine[angle=!90 \vinkelA\space sub](E)(C){1}{P2}
\pcline(E)(P1)
\pcline(E)(P2)
\pcline[offset=12pt,linestyle=none](P1)(P2)
\aput*{:U}{Oculus}
\pcline(P1)(P2)
\pcline(E)(H)
\psset{
linecolor=black,
linewidth=0.5pt,
LabelSep=4
}
\psRelLine[linestyle=dotted,angle=45]{<->}(E)(C){1}{V}
\ncline[linestyle=none]{E}{V}
\pstMarkAngle{H}{E}{P1}{\scriptsize{\SI{\vinkelA}{\degree}}}
\pstMarkAngle{P2}{E}{H}{\scriptsize{\SI{\vinkelA}{\degree}}}
\pstRightAngle{P1}{H}{E}
\pstRightAngle{P2}{H}{E}
\end{pspicture}
\end{figure}

\end{document}


Output

None, since the code cannot compile.

Question

I don't get how to use the \psunit; I tried using the same method as in this post by @Herbert but it doesn't work. When that is said, I would also like to simplify the code, but the main problem is the use of \psunit in order to get rid of some of the \spaces.

-
Please always provide a more descriptive, specific, unique title. :-) –  kiss my armpit Apr 26 '13 at 15:15
\maksimum=2\dimexpr\faktor\dimexpr\radius\psunit\relax\relax –  kiss my armpit Apr 26 '13 at 15:17
@Bugbusters Thank you very much! –  Svend Tveskæg Apr 26 '13 at 15:18
Seriously you should always use pst-sex package that I provided here. It was heroically invented during my learning on PSTricks. :-) –  kiss my armpit Apr 26 '13 at 15:22
@Bugbusters Then put it on CTAN. ;) –  Svend Tveskæg Apr 26 '13 at 15:26

At first define the PSTricks unit. Then you can use the updated \psunit.

[ ... ]
\psset{
unit=0.8cm,
linecolor=red
}