[pstricks] dataread in a table... - arrayjob fails
Michael Sharpe
msharpe at ucsd.edu
Thu May 13 09:08:52 CEST 2010
On May 12, 2010, at 9:00 PM, Hensh, Richard wrote:
> A simple test of the arrayjob package was not successful with PSTricks. The minimal example below fails with the error:
>
> ! Argument of \lists has an extra }.
> <inserted text>
> \par
> l.8 \psline(\lists(1)
> ,2)
>
> I tried using the \lists(1) call in several other pstricks macros but none were successful.
>
> %%%%%%%%%%%%%%%
> \documentclass[10pt]{minimal}
> \usepackage{arrayjobx}
> \usepackage{pstricks-add}
> \begin{document}
> \newarray\lists
> \readarray{lists}{1&3}
> \begin{pspicture}(-3,3)(-3,3)
> \psline(\lists(1),2)
> \end{pspicture}
> %% The following typesets with no problems.
> $\lists(1) + \lists(2)$
> \end{document}
> %%%%%%%%%%%%%%%
>
> Suggestions?
>
> thanks
> rick
Hi Rick,
You are running into a limitation of the pstricks coordinate parsing mechanism, which looks for the first ) following the first ( resulting in trying to assign a meaning to the coordinates \lists(1. That is, expansion of the argument \lists(1) does not take place before parsing the coordinates. One way around this is the following.
\checklists(1)% puts data in lists(1) into macro \cachedata
\psline(\cachedata,2)
For an extended illustration of using the arrayjobx methods to generate pstricks objects, take a look at
http://math.ucsd.edu/~msharpe/pst-grapha.zip
Michael
More information about the PSTricks
mailing list