Hi, in one of Luigi's "Grid-keeping table"-mail I saw the term "\setbox100". I didn't try that code, don't know what it means. But it gave me the idea: is it actually possible to use numbers in defining command's names? Something like this ... \setuphead[Level2] [header=empty,page=yes,numbercommand=\Level2Command,align=middle,alternative=paragraph,style=\Level2Style,before={\strut\blank[42pt]},after={\blank[12pt]}] \setuphead[Level3] [header=empty,page=yes,numbercommand=\Level3Command,align=middle,alternative=paragraph,style=\Level3Style,before={\strut\blank[42pt]},after={\blank[12pt]}] ... looks much clearer than using the numbers written out in letters. Steffen
On Mar 29, 2007, at 10:02 AM, Steffen Wolfrum wrote:
Hi,
in one of Luigi's "Grid-keeping table"-mail I saw the term "\setbox100". I didn't try that code, don't know what it means. But it gave me the idea: is it actually possible to use numbers in defining command's names?
Something like this ...
\setuphead[Level2] [header=empty,page=yes,numbercommand= \Level2Command,align=middle,alternative=paragraph,style= \Level2Style,before={\strut\blank[42pt]},after={\blank[12pt]}] \setuphead[Level3] [header=empty,page=yes,numbercommand= \Level3Command,align=middle,alternative=paragraph,style= \Level3Style,before={\strut\blank[42pt]},after={\blank[12pt]}]
... looks much clearer than using the numbers written out in letters.
Steffen
The command is \setbox, 100 is the argument to this command. This is pure \TeX, I think it could also be written as \setbox{100} (but I may be wrong here). In \TeX, numbers have a catcode which is different from letters, that's why they cannot normally be used in command words (they can, however, become control symbols). For more, see the TeXbook, chapter 3, or Eijkhout's wonderful TeX by Topic, ch. 2. HTH Thomas
Thomas A. Schmitz wrote:
On Mar 29, 2007, at 10:02 AM, Steffen Wolfrum wrote:
Hi,
in one of Luigi's "Grid-keeping table"-mail I saw the term "\setbox100". I didn't try that code, don't know what it means. But it gave me the idea: is it actually possible to use numbers in defining command's names?
Something like this ...
\setuphead[Level2] [header=empty,page=yes,numbercommand= \Level2Command,align=middle,alternative=paragraph,style= \Level2Style,before={\strut\blank[42pt]},after={\blank[12pt]}] \setuphead[Level3] [header=empty,page=yes,numbercommand= \Level3Command,align=middle,alternative=paragraph,style= \Level3Style,before={\strut\blank[42pt]},after={\blank[12pt]}]
... looks much clearer than using the numbers written out in letters.
Steffen
The command is \setbox, 100 is the argument to this command. This is pure \TeX, I think it could also be written as \setbox{100} (but I may be wrong here). In \TeX, numbers have a catcode which is different from letters, that's why they cannot normally be used in command words (they can, however, become control symbols). For more, see the TeXbook, chapter 3, or Eijkhout's wonderful TeX by Topic, ch. 2.
\setvalue{abc123}#1{\framed{#1}} numbercommand=\getvalue{abc123} should work -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/29/07, Thomas A. Schmitz
On Mar 29, 2007, at 10:02 AM, Steffen Wolfrum wrote:
Hi,
in one of Luigi's "Grid-keeping table"-mail I saw the term "\setbox100". I didn't try that code
good, it doesn't work, sorry. (It to was too much near to time of my return at home).
The command is \setbox, 100 is the argument to this command. This is pure \TeX, I think it could also be written as \setbox{100} (but I may be wrong here). hmm Missing number, treated as zero. <to be read again> { l.4 \setbox{ 100}=\ruledvbox{\hsize=18cm\input tufte }
Also wonderful for a programmer: \expandafter\def\csname VBOX 100 00 01\endcsname{FOOO} \csname VBOX 100 00 01\endcsname -- ok Almost anything (numbers, spaces,..): you can use a sort of namespaces \csname VBOX100 00 01\endcsname -- nothing, and no error Not defined before it, but it's not en error to call it. \VBOX100 00 01 ! Undefined control sequence. l.8 \VBOX 100 00 01 An error, of course: I never defined it. The context way \setvalue{abc123}#1{\framed{#1}}
participants (4)
-
Hans Hagen
-
luigi scarso
-
Steffen Wolfrum
-
Thomas A. Schmitz