[pstricks] Using \@ifnextchar in node definition

Christoph Bersch usenet at bersch.net
Wed Nov 11 13:37:04 CET 2009


Hi,

how can I use commands that use \@ifnextchar to build node names? The 
following does not work:

\documentclass{article}
\usepackage{pst-node}
\SpecialCoor
\makeatletter
\def\mynode{%
   \@ifnextchar[{\mynode at i}{\mynode at i[]}
}%
\def\mynode at i[#1]#2{%
   #2%
}%
\makeatother
\begin{document}
\begin{pspicture}
   \pnode(1,1){A}
   \psdot(\mynode{A})
\end{pspicture}
\end{document}


More information about the PSTricks mailing list