\sqrt in expansions bug
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi, Macros that use \doifnextcharelse should all be defined as \unexpanded, to prevent errors like: \expanded{$\sqrt 2$} Also affected are: \decrement \increment maybe there are others, but these were easy to spot because they were single-line \def's. The \sqrt is painful, because it is likely to appear in \write-s Cheers, Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Taco Hoekwater wrote:
Hi,
Macros that use \doifnextcharelse should all be defined as \unexpanded, to prevent errors like:
\expanded{$\sqrt 2$}
Also affected are:
\decrement \increment
maybe there are others, but these were easy to spot because they were single-line \def's. The \sqrt is painful, because it is likely to appear in \write-s
i ran into that yesterday and made it unexpanded; this problem was introduced when (on user request) sqrt got the optional arg and thereby was no longer defined as math thingie with automatic protection. Hans
participants (2)
-
Hans Hagen
-
Taco Hoekwater