[pstricks] Optional parameters, pst-eucl, and spurious spaces

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Feb 19 07:54:34 CET 2005


Richard Hensh wrote:

> Are the optional parameters misbehaving in the pst-eucl?

no, only some spurious blanks ...  -> Dominique ???

uncomment the following iffalse / fi, then the shift
should again be there.

Herbert



\documentclass{article}
\usepackage{pst-eucl}

%\iffalse
\makeatletter
\def\pstTriangle{\@ifnextchar[\Pst at Triangle{\Pst at Triangle[]}}%
\def\Pst at Triangle[#1]{%NEW DR 14112001 (for default (0,0) coordinates)
   \def\pst at par{#1}%
   \@ifnextchar(\Pst at Trianglei{\Pst at Trianglei(0,0)}}%
\def\Pst at Trianglei(#1)#2(#3)#4(#5)#6{%
   \pst at killglue% <-------------------------------------------------- hv
%%begin modif alaindelplanque 11/2003 (VALID)
   \pst@@getcoor{#1}\xdef\@@coordi{\pst at coor}%% <-------------------- hv
   \pst@@getcoor{#3}\xdef\@@coordiii{\pst at coor}%% <------------------ hv
   \pst@@getcoor{#5}\xdef\@@coordv{\pst at coor}%% <-------------------- hv
   %%end modif alaindelplanque 11/2003
   \bgroup\use at par%            % Affectation of local parameters
   %%begin modif alaindelplanque 11/2003 (VALID)
   \bgroup\ifx\psk at PosAngleA\@undef
     \psset{PosAngle={!tx at EcldDict begin 
\@@coordiii\space\@@coordi\space ABVect exch Atan dup
       \@@coordv\space\@@coordi\space ABVect exch Atan exch sub dup abs 
180 gt { dup
       dup abs div 360 mul sub } if 2 div add 180 add end}}%% <------ hv
   \else\psset{PosAngle=\psk at PosAngleA}\fi
   %%end modif alaindelplanque 11/2003
   \ifx\psk at PosAngleA\@undef\else\psset{PosAngle=\psk at PosAngleA}\fi
   \ifx\psk at PointSymbolA\@undef\else\psset{PointSymbol=\psk at PointSymbolA}\fi
   \ifx\psk at PointNameA\@undef\else\psset{PointName=\psk at PointNameA}\fi
   \Pst at Geonode@i[](#1){#2}\egroup%%NEW DR 15112001
   %%begin modif alaindelplanque 11/2003 (VALID)
   \bgroup\ifx\psk at PosAngleB\@undef
   \psset{PosAngle={!tx at EcldDict begin \@@coordi\space\@@coordiii\space 
ABVect exch Atan dup
       \@@coordv\space\@@coordiii\space ABVect exch Atan exch sub dup 
abs 180 gt { dup
       dup abs div 360 mul sub } if 2 div add 180 add end}}%% <------ hv
   \else\psset{PosAngle=\psk at PosAngleB}\fi
   %%end modif alaindelplanque 11/2003
   \ifx\psk at PosAngleB\@undef\else\psset{PosAngle=\psk at PosAngleB}\fi
   \ifx\psk at PointSymbolB\@undef\else\psset{PointSymbol=\psk at PointSymbolB}\fi
   \ifx\psk at PointNameB\@undef\else\psset{PointName=\psk at PointNameB}\fi
   \Pst at Geonode@i[](#3){#4}\egroup%%NEW DR 15112001
   %%begin modif alaindelplanque 11/2003 (VALID)
   \ifx\psk at PosAngleC\@undef%
   \psset{PosAngle={!tx at EcldDict begin \@@coordiii\space\@@coordv\space 
ABVect exch Atan dup
       \@@coordi\space\@@coordv\space ABVect exch Atan exch sub dup abs 
180 gt { dup
       dup abs div 360 mul sub } if 2 div add 180 add end}}%% <------ hv
   \else\psset{PosAngle=\psk at PosAngleC}\fi%% <----------------------- hv
   %%end modif alaindelplanque 11/2003
   \ifx\psk at PosAngleC\@undef\else\psset{PosAngle=\psk at PosAngleC}\fi
   \ifx\psk at PointSymbolC\@undef\else\psset{PointSymbol=\psk at PointSymbolC}\fi
   \ifx\psk at PointNameC\@undef\else\psset{PointName=\psk at PointNameC}\fi
   \Pst at Geonode@i[](#5){#6}%%NEW DR 15112001
   \pst at TraceTriangle{#2}{#4}{#6}%
   \egroup%
}%
\makeatother
%\fi
\begin{document}

\vspace*{2cm}
\psline(-4,0)(0,5)%
\pstTriangle[linecolor=red](-4,0){A}(3,0){B}(3,4){C}%
\psline(-4,0)(0,5)%
\psset{PointSymbol=none,linecolor=blue,linewidth=1.25pt}%
\pstTriangle(-4,0){A}(3,0){B}(3,4){C}%

\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list