[OS X TeX] Multido--"illegal unit of measure" in pstricks

Michael Sharpe msharpe at ucsd.edu
Wed Sep 12 15:43:08 EDT 2018

> On Sep 12, 2018, at 12:13 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
> In the attached I have created a wiggly (more-or-less vertical) line and am trying to create several copies of it, displaced at regular horizontal intervals.
> I use a real counter \rT added to fixed coordinates.  The error message says “illegal unit of measure—pt added”.  I don’t understand: coordinates are entered into pscurve as real numbers.  What am I missing?

You can't do arithmetic with \rT. Instead, make three similar counters where the arithmetic is handled, as illustrated below.

		\begin{pspicture}(-4,-4)(4,4) % note {-4 replaced by (-4
		\pscurve(0,-2) (-0.1,-1.5)(0,-1)(0.1,-0.5)(0,-0.2)(0,0)(0,0.2) (0.1,0.5)(0,1)(-0.1,1.5)(0,2)
		\multido{\rT=-1.6+0.2,\rTp=-1.5+0.2,\rTm=-1.7+0.2}{33}{ % \rTp(lus), \rTm(inus)
		\pscurve(\rT,-2) (\rTm,-1.5)(\rT,-1)(\rTp,-0.5)(\rT,-0.2)(\rT,0)(\rT,0.2) (\rTp,0.5)(\rT,1)(\rTm,1.5)(\rT,2)


More information about the MacOSX-TeX mailing list