🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2002

Re: reserving registers from within macros

#2002
From: Victor Eijkhout
Date: Wed, 02 Sep 1992 16:00
20 lines
1421 bytes
In article <repasky.715398745@sun.bdc.ubc.ca>, repasky@bdc.ubc.ca (Dick Repasky) writes:
|> 
|>     \def\doit#1{\expandafter\newinsert\csname big#1\endcsname}
|> 
|> and I receive the error that \newinsert is a forbidden command sequence in
|> a macro definition.  Does anyone have advice?

This is because \newxyz have been defined in plain.tex as \outer,
a decision of Knuth that I disagree with. In latex these macros
are redefined by simply repeating their definition without the \outer.

You could do the same, or try something more clever such as
	\csname newinsert\expandafter\endcsname\csname big#1\endcsname
                         ^^^^^^^^^^^^^^^^^^^^^^
                         Yes, this actually works! I got rather a kick
out of it when I tried this the first time.

Victor

|> Dick
Technical Details
Message-ID: <la9p9gINNh7v@utkcs2.cs.utk.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!utkcs2!cupid.cs.utk.edu!eijkhout
References: <repasky.715398745@sun.bdc.ubc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!utkcs2!cupid.cs.utk.edu!eijkhout
From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
Newsgroups: comp.text.tex
Subject: Re: reserving registers from within macros
Date: 2 Sep 92 16:00:48 GMT
Organization: University of Tennessee, Knoxville - Department of Computer Science
Lines: 20
Distribution: world
Message-ID: <la9p9gINNh7v@utkcs2.cs.utk.edu>
References: <repasky.715398745@sun.bdc.ubc.ca>
Reply-To: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
NNTP-Posting-Host: cupid.cs.utk.edu
Keywords: \new..., register, reserve, macro, definition, forbidden control seq.