Saturday, May 29, 2004 Sebastian Sturm wrote:

> Hi,

> the delimiter sizing is working now; i had to load the module directly
> before \starttext.

Yes, this is generally true. All modules should get loaded
before \starttext.

> However, the units module still isn't working when nath is
> loaded. Is it supposed to?

Well, I had never tested them together, and given the very
extensive changes nath enacts, I'm not surprised it doesn't
work.

Anyway, it looks like the fix is easy: the problem is that
dimension commands are not protected (unexpandable).

In m-units.tex, look for the lines

\def\dimensionprefix#1%
  {\gdef\thedimensionprefix{#1}}

\def\dimensionaddfix#1%
  {\unskip
  %\mathematics{\umathematicstypeface#1}%
   \ustartmathmode\umathematicstypeface#1\ustopmathmode
   \nobreak
   \hskip\dimensionaddfixsignal}

\def\dimensionnopfix#1%
  {\dontbreakdimension
   \ifdim\scratchdimen=\dimensionpowersignal\relax
     \ustartmathmode
   \else
     \ustartmathmode
     \udimensionhalfspace
     \nobreak
   \fi
   \umathematicstypeface#1%
   \ustopmathmode
   \nobreak
   \hskip\dimensionsignal}

\def\dimensionmidfix#1%
  {\dontbreakdimension
   \ifdim\scratchdimen=\dimensionpowersignal\relax
     \ustartmathmode
     \udimensionbackspace
     \nobreak
   \else
     \ustartmathmode
   \fi
   \umathematicstypeface#1%
   \ustopmathmode
   \nobreak
   \hskip\dimensionmidfixsignal}

\def\dimensionpower#1%
  {\gdef\thedimensionpower{#1}}

and change each

\def\dimension...

into

\unexpanded\def\dimension....

This should solve the problem.

I'm not 100% sure this is the best solution, though. An
alternative could be to keep those definition as they are and
instead make unexpandable the actual commands (\Micro etc).

Hans, what do you think?

-- 
Giuseppe "Oblomov" Bilotta

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to