Article View: comp.text.tex
Article #47Should I use \newtoks here?
From: Ralf Handl
Date: Wed, 28 Oct 1992 11:23
Date: Wed, 28 Oct 1992 11:23
36 lines
1163 bytes
1163 bytes
I need to `append' something to a definition, which can be done,
according to The TeXbook, Solution to exercise 20.15, with
\def\addcs#1#2{\toks0=\expandafter{#1}\toks2=\expandafter{#2}
\edef#1{\the\toks0 \the\toks2 }}
for example
\def\defletters{%
\def\A{Dies ist ein A}
\def\B{Dies ist ein B}
\def\C{Dies ist ein C}}
\def\defnewletters{%
\def\D{Dies ist ein D}
\def\E{Dies ist ein E}
\def\F{Dies ist ein F}}
\addcs\defletters\defnewletters
lets \defletters define \A, ... ,\D.
Why did DEK choose token registers 0 and 2 explicitly?
Can I do it without raising problems?
Or should I better use \newtoks here?
(But then two token registers are `wasted'.)
Thanks in advance for any advice,
Ralf Handl.
Technical Details
Message-ID:
<HANDL.92Oct28122328@crypt9.cs.uni-sb.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!sbsvax!sbsvax.cs.uni-sb.de!handlShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!sbsvax!sbsvax.cs.uni-sb.de!handl From: handl@crypt9.cs.uni-sb.de (Ralf Handl) Newsgroups: comp.text.tex Subject: Should I use \newtoks here? Message-ID: <HANDL.92Oct28122328@crypt9.cs.uni-sb.de> Date: 28 Oct 92 11:23:28 GMT Sender: news@sbsvax.cs.uni-sb.de Distribution: comp Organization: Universitaet des Saarlandes, Saarbruecken Lines: 36