Article View: comp.text.tex
Article #1964reserving registers from within macros
From: Dick Repasky
Date: Wed, 02 Sep 1992 01:52
Date: Wed, 02 Sep 1992 01:52
19 lines
1375 bytes
1375 bytes
I would like to write a macro that reserves registers and assigns them
names using pararmeters passed to the macro. For example, a call such
as \doit{zork} would be expanded so that the result was \newinsert\bigzork.
I've made the following attempt:
\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?
Note that this proceedure works wonderfully if I change it to generate macro
definitions on macros that have different names. The problem arises
when any \new"register" sequence is to be defined.
My goal is to be able to allocate multiple insert lists and operate on them
from a common macro.
Thanks,
Dick
Technical Details
Message-ID:
<repasky.715398745@sun.bdc.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!sun.bdc.ubc.ca!repaskyShow Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!sun.bdc.ubc.ca!repasky From: repasky@bdc.ubc.ca (Dick Repasky) Subject: reserving registers from within macros Message-ID: <repasky.715398745@sun.bdc.ubc.ca> Summary: I would like to reserve registers within macros. Keywords: \new..., register, reserve, macro, definition, forbidden control seq. Sender: news@unixg.ubc.ca (Usenet News Maintenance) Nntp-Posting-Host: sun.bcu.ubc.ca Organization: Zoology, University of B.C., Vancouver, B.C., Canada Date: Wed, 2 Sep 1992 01:52:25 GMT Lines: 19