home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / text / tex / 10793 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.3 KB  |  33 lines

  1. Newsgroups: comp.text.tex
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!sun.bdc.ubc.ca!repasky
  3. From: repasky@bdc.ubc.ca (Dick Repasky)
  4. Subject: reserving registers from within macros
  5. Message-ID: <repasky.715398745@sun.bdc.ubc.ca>
  6. Summary: I would like to reserve registers within macros.
  7. Keywords: \new..., register, reserve, macro, definition, forbidden control seq.
  8. Sender: news@unixg.ubc.ca (Usenet News Maintenance)
  9. Nntp-Posting-Host: sun.bcu.ubc.ca
  10. Organization: Zoology, University of B.C., Vancouver, B.C., Canada
  11. Date: Wed, 2 Sep 1992 01:52:25 GMT
  12. Lines: 19
  13.  
  14. I would like to write a macro that reserves registers and assigns them 
  15. names using pararmeters passed to the macro. For example, a call such
  16. as \doit{zork} would be expanded so that the result was \newinsert\bigzork.
  17. I've made the following attempt:
  18.  
  19.     \def\doit#1{\expandafter\newinsert\csname big#1\endcsname}
  20.  
  21. and I receive the error that \newinsert is a forbidden command sequence in
  22. a macro definition.  Does anyone have advice?
  23.  
  24. Note that this proceedure works wonderfully if I change it to generate macro 
  25. definitions on macros that have different names.  The problem arises
  26. when any \new"register" sequence is to be defined.
  27.  
  28. My goal is to be able to allocate multiple insert lists and operate on them
  29. from a common macro.
  30.  
  31. Thanks,
  32. Dick
  33.