🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4603

TeX memory problem

#4603
From: ceblair
Date: Wed, 06 Apr 1988 21:22
21 lines
1259 bytes
%  I am trying to do the following in TeX:  I have a sequence of 
% groups of small letters, with one space between each group, followed
% by a Z at the end.  Each group has at least two letters.  I want to
% put a number in front of each group.  

%   The macro below works, in the sense that when I run it, I get 
 
%           1 ab 2 cde 3 fed 4 qrs 5 dd etc.,
 
% but it must be terribly inefficient.  If I try it with even a few 
% more groups than shown here, I get "Memory Capacity Exceeded"
% messages related to parameter stack size.  Comments welcome.
 
%              Charles Blair [BITNET: CEBLAIR at UIUCVMD]
 
\def\numb#1Z{\count11=1 \num#1 W Z}
\def\num#1#2 #3Z{\if #1W {} \else {\number\count11} #1#2 \advance%
\count11 by 1\num #3Z\fi}
\numb ab cde fed qrs dd dede fghjk klkvds mbcd
abcde fg hj Z \bye
Technical Details
Message-ID: <47700012@uxe.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!ceblair

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!ceblair
From: ceblair@uxe.cso.uiuc.edu
Newsgroups: comp.text
Subject: TeX memory problem
Message-ID: <47700012@uxe.cso.uiuc.edu>
Date: 6 Apr 88 21:22:00 GMT
Lines: 21
Nf-ID: #N:uxe.cso.uiuc.edu:47700012:000:819
Nf-From: uxe.cso.uiuc.edu!ceblair    Apr  6 15:22:00 1988