[texhax] Can't use \d (dot below) with \edef

Oleg Katsitadze olegkat at gmail.com
Fri Jun 29 14:11:11 CEST 2007

On Fri, Jun 29, 2007 at 12:20:11PM +0100, Philip Taylor (Webmaster) wrote:
> 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

Sorry, my bad -- I should have reread that message twice, as too much
time passed.  Of course, because \savedfirstmark is \edef'd, the space
after \the\toks0 is removed during the expansion.  My correction
should apply to a \def'd macro, like Philip's \MacroToBeExpanded --
the space after 0 _is_ there in the macro, but is removed when the
macro is expanded/typeset (so it is not in the _expansion_ of
\MacroToBeExpanded and not in \savedfirstmark).

Sorry for the blunder, and thanks for catching it,

More information about the texhax mailing list