On 16 February 2016 at 07:48, Norbert Preining <prein...@logic.at> wrote: > Dear all, > > another bug surfaced at Debian (in Cc), and it seems that > @setchapternewpage > is broken: > > \input texinfo.tex > @setfilename mwe.info > @settitle MWE > @c @setchapternewpage odd > @bye > > works but without the @c an error occurs: > Runaway argument? > odd^^M^^M > ./mwe.texi:7: Forbidden control sequence found while scanning use of > @setchapte > rnewpage. > <inserted text> > @par > <to be read again> > @bye > l.7 @bye > > > It seems @setchapternewpage parses to far and does not accept odd > as argument.
Thanks for passing this on, I've confirmed the bug. It should be fixed in revision 7021. The problem is not @setchapternewpage itself: it's the way that that macro gets its argument, which was done with a macro argument delimited by a space, but this doesn't work when the end of the line has an active catcode. I've changed it to use the method that's used for the other Texinfo line commands. Explanation below: The reason that the line had an active catcode was related to the elimination of @setfilename as a requirement for Texinfo files. Essentially we want to allow Texinfo files to start \input texinfo \input texinfo to allow the use of a "predumped format" file for TeX, created with IniTeX. (I don't know if anyone does it, but it's possible, so no point in breaking this functionality.) The first line could be part of the dumped format, the second line would be at the start of the input file, and because we need to ignore it (because we already \input texinfo), \ is given a special definition to ignore what follows. We don't want \ to have this definition for the rest of the file, which is where active newline comes in: its definition removes this special definition of \. @c also has a definition that removes the special definition of \. It's tricky, but it was worth it (in my opinion) to get rid of the requirement for @setfilename to appear as the second line of a Texinfo file. Adding a @c at the end of the "\input texinfo" line, or adding a blank line before the @setchapternewpage line, also removes the error message, but this shouldn't be necessary with the latest version.