[texhax] Can't use \d (dot below) with \edef
Philip Taylor (Webmaster)
P.Taylor at rhul.ac.uk
Fri Jun 29 13:20:11 CEST 2007
Oleg Katsitadze wrote:
> On Thu, Jun 21, 2007 at 12:04:06PM +0300, Oleg Katsitadze wrote:
>> \edef\savedfirstmark{\noexpand\MacroNotToBeExpanded \the\toks0 \MacroToBeExpanded}%
>> ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^
>> no expansion one-level full expansion
>> expansion
>>
>> Note the space after \toks0 -- this delimits the token register's
>> number and is removed from the input (doesn't make it into
>> \savedfirstmark's definition).
>
> One minor correction: of course, the space after \the\toks0 is
> present in \savedfirstmark's definition; what I meant was that it is
> removed from the _output_, i.e., it is not typeset.
Are you /sure/ ? Here is my test case :
\toks 0 = {[ABC 123 def]}
\def \MacroNotToBeExpanded {[\oalign]}
\def \MacroToBeExpanded {[\space A\space \the \toks 0 ]}
\edef\savedfirstmark{\noexpand\MacroNotToBeExpanded \the\toks0 \MacroToBeExpanded}
\message {\meaning \savedfirstmark}
\toks 0 = \expandafter {\savedfirstmark}
[\the \toks 0 ]
\end
->
This is pdfeTeXk, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5) (format=pdftex 2006.9.19) 29 JUN 2007 12:17
entering extended mode
%&-line parsing enabled.
**Oleg.tex
(./Oleg.tex macro:->\MacroNotToBeExpanded [ABC 123 def][ A [ABC 123 def]]
[1{c:/Layered products/TeX/Live/2005/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] )
<c:/Layered products/TeX/Live/2005/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb>
Output written on Oleg.pdf (1 page, 5655 bytes).
Philip Taylor
More information about the texhax
mailing list