[pstricks] Problems with Macros in SpecialCoor

Juergen Rose rose at rz.uni-potsdam.de
Fri Nov 8 00:44:10 CET 2013


Hi,

if I using formulars with numbers as SpecialCoordinates in uput it
works. But if I replace these numbers with macros, the lables are not
placed as expected. E.g., I have code like the following

\FPset\radius{2.0}%
\FPset\yA{\radius}%
\FPset\zA{\radius}%
\FPupn\hTrig{2 3 root \radius{} mul}%
\FPupn\hTetraeder{2 6 root 3 div \radius{} mul 2 mul}
%
\FPadd\yCthree\radius{\hTrig}%
\FPset\zCthree{\radius}%
%
\FPupn\yCfour{\radius{} \hTrig{} 3 div add}%
\FPupn\zCfour{\radius{} \hTetraeder{} add}%
%
\FPupn\xsLone{\yCfour{} \yCthree{} \yCfour{} sub 2 div add}%
\FPset\ysLone{\zA}%
%
\FPmul\xpsmin\radius{0.7}%
\FPmul\xpsmax\radius{3.1}%
\FPmul\ypsmin\radius{0.6}%
\FPupn\ypsmax{\ypsmin{} \hTrig{} 1.2 mul add}%
%
\begin{pspicture}[showgrid=true](\xpsmin,\ypsmin)(\xpsmax,\ypsmax)
  \pstGeonode(\yCfour,\zCfour){C_4}
  \pstGeonode[PosAngle=180](\yA,\zA){A}

  \ncline{C_4}{A}

  \uput[u]{0}(!\yA \yCfour \yA sub 2 div add \zA){$t_1$}
  \rput(!\yA \yCfour \yA sub 2 div add \zA){$t_2$}
  \uput{0.1}[u]{0}(!2 3.2 2 sub 2 div add 2){$t_3$}

  \uput{0.1}[u]{0}(\xsLone,\ysLone){$s_2$}
  \uput{0.1}[u]{0}(!\xsLone \ysLone){$s_3$}
  \uput[u]{0}(!\yCfour \yCthree \yCfour sub 2 div add \zA){$s_5$}
\end{pspicture}

I would expect that t_1, t_2 and t_3 or s_2, s_3 and s_5 are placed
approximately at the
same position. But only t_3 and s_2 are placed correctly. t_2, t_3, s_3
and s_5 are placed
around the origin of the coordinate system. The positions varies
depending on the environment in the TeX file.

The complete TeX file and the corresponding PDF are attached. Any hint
is appreciated.

Regards

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_1_new_2_article.tex
Type: text/x-tex
Size: 1973 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20131108/a8c3f678/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_1_new_2_article.pdf
Type: application/pdf
Size: 10944 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20131108/a8c3f678/attachment.pdf>


More information about the PSTricks mailing list