[pstricks] multido controlled by postscript variables
Poul Riis
poul.riis at skolekom.dk
Mon Jan 22 17:22:03 CET 2018
The following (silly) project works
\documentclass{article}
\usepackage{multido}
\usepackage[x11names]{xcolor}
\usepackage{pst-tools}
\usepackage{pstricks-add}
\begin{document}
\pstVerb{/nxmax 5 def /nymax 4 def}
\psset{linecolor=red}
\begin{psgraph}[arrows=->](0,0)(5,4){5cm}{5cm}
\multido{\ny=1+1}{4}{
\multido{\nx=1+1}{5}{
\uput{0pt}[90]{0}(!\nx\space \ny\space){\psPrintValue{\nx\space
\ny\space mul}}
}
}
\end{psgraph}
\end{document}
but I would like to control everything with postscript variables, for
instance as follows (which does not work):
\documentclass{article}
\usepackage{multido}
\usepackage[x11names]{xcolor}
\usepackage{pst-tools}
\usepackage{pstricks-add}
\begin{document}
\pstVerb{/nxmax 5 def /nymax 4 def}
\psset{linecolor=red}
\begin{psgraph}[arrows=->](0,0)(!nxmax nymax){5cm}{5cm}
\multido{\ny=1+1}{!nymax}{
\multido{\nx=1+1}{!nxmax}{
\uput{0pt}[90]{0}(!\nx\space \ny\space){\psPrintValue{\nx\space
\ny\space mul}}
}
}
\end{psgraph}
\end{document}
How can I make it work?
Poul Riis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20180122/4a8f3178/attachment.html>
More information about the PSTricks
mailing list