[pstricks] Bug report: AlgParser wrongly parses N-<nodename>.x and N-<nodename>.y

Donut E. Knot the.counterterrorist at yahoo.com
Tue Mar 25 18:55:03 CET 2014


Hi folks,

According to Christoph Bersch in his answer (http://tex.stackexchange.com/a/167578/19356)
AlgParser wrongly parses, for example, N-A.x or A.x when we are working in infix form (aka algebraic).

A solution by buffering the values  as follows,
\makeatletter\pst at Verb{/Ax N-A.x def}\makeatother

seems to be complicated.

In my humble opinion, why don't we deprecate the format N-<nodename>.x (as well as N-<nodename>.y, <nodename>.x and <nodename>.y) and replace them with safe ones such as
<nodename>x (as well as <nodename>y)?



\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl,pstricks-add}

\def\f(#1){((#1)*(#1-5)*(#1-6)/4+1.5*(#1)-5)}
\def\m(#1,#2){(\f(#2)-\f(#1))/(#2-#1)}
\def\fp(#1){Derive(1,\f(#1))}% f'(x) 

\def\L#1{\uput[-90](#1|0,0){$#1\mathstrut$}\uput[180](0,0|#1){$f(#1)$}\psCoordinates[linestyle=dashed,linecolor=gray](#1)}

\begin{document}

\begin{pspicture}[algebraic,saveNodeCoors,PointSymbol=none,PointName=none](-1,-1)(8,8)
\psaxes[labels=none,ticks=none]{->}(0,0)(-.5,-.5)(7.5,7.5)[$x$,0][$y$,90]
\pstGeonode(*1 {\f(x)}){a}(*6.5 {\f(x)}){b}
\makeatletter\pst at Verb{/ax N-a.x def /bx N-b.x def}\makeatother
\psplot[linecolor=blue]{ax}{bx}{\f(x)}
\pstInterFF{\m(ax,bx)}{\fp(x)}{4}{temp}
\pstGeonode(*N-temp.x {\f(x)}){c}
\pcline[nodesep=-1,linecolor=green](a)(b)
\psxline[linecolor=red](c){.1(a)-.1(b)}{.1(b)-.1(a)}
\psset{linecolor=gray,linestyle=dashed}
\foreach \i in {a,b,c}{\L{\i}}
\end{pspicture}

\end{document}

Thank you in advance.

best regards,

Weirdstress Function
(http://tex.stackexchange.com/users/19356)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20140325/672aafbe/attachment.html>


More information about the PSTricks mailing list