Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!ugle.unit.no!ugle.runit.sintef.no!toriver From: toriver@lise.unit.no (Tor Iver Wilhelmsen) Newsgroups: comp.text.tex Subject: Problems using commands in /csname Message-ID: Date: 2 Apr 91 23:03:44 GMT Sender: news@ugle.unit.no Organization: Institute Of Computer Sciences, NTH Lines: 59 I have a problem using a macro (used in LaTeX) to create automatic rule numberings for game rules (along the line of: "8.1.2.1: The English officer counters are never used more than once, however."). LaTeX says: ! Use of \csname doesn't match its definition. \Rule ...\advance \cuindex by 1 \advance \csname R uleno\number \cuindex \end... \Rule ...rindent =-30pt\par \bf \theRule \ #1:} #2 \advance \nxindex by -1 \... ...s'' sheet for that expansion set.}}} \Rule []{The Volmit playe... \Rule ...rindent =-30pt\par \bf \theRule \ #1:} #2 \advance \nxindex by -1 \... l.16 ...\underline{one} of the INF-ORC~3 units.}}} So, is there a way to "trick" csname to accept the contents?? The macro looks like this: \newcount\cuindex % current index \newcount\nxindex % next index \newcount\countthis \expandafter\newcount\csname Ruleno1\endcsname \cuindex=0 \nxindex=1 \csname Ruleno1\endcsname = 0 % Parameters: % #1 = initial text to the rule, set in boldface % #2 = the rule itself \def\Rule[#1]#2{\advance\cuindex by 1 \advance\csname Ruleno\number\cuindex\endcsname by 1 \advance\nxindex by 1 \expandafter\newcount\csname Ruleno\number\nxindex\endcsname \csname Ruleno\number\nxindex\endcsname=0 \def\theRule{} \countthis=1 \loop \edef\theRule{\theRule\number\csname Ruleno\number\countthis\endcsname } \ifnum\countthis < \cuindex \advance\countthis by 1 \edef\theRule{\theRule .} \repeat {\parindent=-30pt\par\bf\theRule\ #1:} #2 \advance\nxindex by -1 \advance\cuindex by -1 } The problem is that it _did_ compile without trouble on an older version of TeX... can anyone shed any light on what the trouble might be?? -- "When things are slow, don't introduce new technology, introduce new terminology." - John C. Dvorak "Keep it up, rock'n'roll, good music save your soul" - Motorhead: Ramones toriver@{lise,solan,siri}.unit.no pumpkin@norunit.{sintef.no, bitnet}