At 05:54 PM 7/4/01 +0200, Eckhart Guth�hrlein wrote:
>I noticed a strange behaviour of m-units with the following test file.
>
>\usemodule[units]
>\starttext
> first $1\Meter\Per\Sec$, second $1\Meter\Per\Sec$ and third
>$1\Meter\Per\Sec$
> \crlf
> first 1 \Meter\Per\Sec, second 1 \Meter\Per\Sec\ and third 1
\Meter\Per\Sec
> \crlf
> first $1\Meter\Per\Sec$, second $1\Meter\Per\Sec$ and third
>$1\Meter\Per\Sec$
>\stoptext
>
>In the output, there is some extra space in front of the first 's'. This
>occurs with any unit I tried, but only if the first call is within math
>mode. Not really a bug, but may be of interest.
if in cont-sys.tex, you may replace:
\def\setnameofcommand#1%
{\begingroup
\escapechar=-1
\globaldefs=0 % pretty important!
\xdef\nameofcommand{\string#1}%
\endgroup}
the space will disappear. The space is a result of the fact that the first
time a unit is used, it's meaning is written to the tui file so that one
can later recall a list of used units.
the \bgroup ... \egroup in the previous implementation of \setnameofcommand
expands into {} [kind of] and in math, this has teh side effect of being an
empty box etc etc. This side effect is not present with \begingoup ... so i
now changed a couple of sensitive macros to using \begingroup instead.
btw, a unit without number in front should be preceded with \NoUnit, like
in "the unit \NoUnit \Meter\ is often used ..."
Hans
ps taco: this may solve some of the more tricky math ml interference
problems too
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------