[pstricks] dataread in a table... - arrayjob fails

Hensh, Richard hensh at math.msu.edu
Thu May 13 12:27:06 CEST 2010

Serves me right for not reading the docs completely.


From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] On Behalf Of Michael Sharpe [msharpe at ucsd.edu]
Sent: Thursday, May 13, 2010 3:08 AM
To: Graphics with PSTricks
Subject: Re: [pstricks] dataread in a table... - arrayjob fails

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

For an extended illustration of using the arrayjobx methods to generate pstricks objects, take a look at



PSTricks mailing list
PSTricks at tug.org
archive: http://www.tug.org/pipermail/pstricks/

More information about the PSTricks mailing list