1) Somehow the \FromStep[n][reserve] changes the internal mechanism of glue or spaces in displayed formulas. So one needs (as you do in your example) to add \; around operators such as +, -, =. Can one avoid this?

Hi Otared,

I can give only explanation but in the moment i do not know the automatic solution.

Mathematical material are processed in a pieces called atoms. There are 13 different atoms types (ord, op, bin, rel, open, close, punc, ...).
Mathematical characters (+, =, ...) have implicit types (bin, rel; in the case) or they can be set explicitly (\mathrel{<}, \mathop{\hbox{sin}}).


Spacing in mathematical mode is done according to types of neighbour atoms. TeX can add
A) no space
B) \mskip\thinmuskip
C) \mskip\medmuskip
D) \mskip\thickmuskip
between atoms if it is surrounded from left or right with
ord op close inner D) REL D) ord op open inner
ord close inner C) BIN C) ord op close inner
PUNCT B) ord op rel open close punct inner
ord close inner B) OP B) ord op
ord op close B) INNER B) ord open punct inner
If no pair is in this table (ord-ord) no space is added.
(Read the table as left-pair and right-pair not as triples.)


Example:
  1+1=2
expands like
  \mathord{1}\mathbin{+}\mathord{1}\mathrel{=}\mathord{2}
and typeset like
  \mathord{1}\C\mathbin{+}\C\mathord{1}\D\mathrel{=}\D\mathord{2}
(abbreviated by \def\B{\mskip\thinmuskip} etc.)

But there are some exceptions (e.g. bin is changed to ord if
  nothing bin op rel open punct BIN rel close punct
). It makes things more difficult.

So in your case the math is broken (by steps) into several separates that is why the atom neighbourhood is lost.

Example. Our 1+1=2 equation can be split to
$1$$+1=2$
and mathbin + changes to ord and we lose space before (beginning of math) and after (will be ord-ord pair).


In this trivial example it can be solved by
  $1$$\mathord{}+1=2$

According to me, mathematical text has to be tuned manually in the normal case; this spacial one is not a exception ;-(
Vit Zyka



2. bin 3.

2) When one refers (see example below) with the command (\in[eq:NS]) to an equation which has been introduced with \placeformula[eq:NS] the interaction makes appear the first instance of that formula, which may be incomplete. Could one have a control over this, that is for instance, in this particular case, make appear the completed equation at the end of the slide made with \StartSteps[Navier||Stokes equation]?


Best regards: OK

%%%% file steps-david-3.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% usage example
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usemodule [pre-original]
\usemodule [rsteps]

\starttext
\StartSteps[Slide Title]           % the title is passed to
                                   % the \Subject macro

\startitemize
\item Item 1
\OnlyStep[2]  {\item (oops!)}
\UntilStep[4] {\item Item 2*}
\FromStep[4]  {\item Item 2}
\HighlightStep[3]{\item
Here is another version of Navier-Stokes equation}
\stopitemize

\StopSteps


\StartSteps[Navier||Stokes equation]

\placeformula[eq:incompressibility]
\startformula
  \vec\nabla\cdot\vec u = 0
\stopformula

\placeformula[eq:NS]
\startformula
  \frac{D\vec u}{Dt} =
    \FromStep[2][reserve]{-{\red \frac1\rho \vec\nabla p}}
    \FromStep[3][reserve]{+\;{\green \vec g}}
    \FromStep[4][reserve]{+\;{\blue \frac1\rho \vec\nabla\cdot S}}
\stopformula

Momentum transport:     \NextStep
\item {\red   Pressure gradient}        \par\NextStep
\item {\green Gravity}                  \par\NextStep
\item {\blue  Stress (viscous, turbulent, Maxwell)}


\StopSteps

\StartSteps[Navier Stokes equation]


\placeformula[eq:div-nul] \startformula \vec\nabla\cdot\vec u = 0 \stopformula


\placeformula[eq:NStokes] \startformula { \partial u \over \partial t} - \Delta u \FromStep[1][reserve]{{\red \; +\; (u\cdot \nabla)u}} \FromStep[2][reserve]{{\green \; +\; \nabla p}} \FromStep[3][reserve]{{\blue \; =\; f(t,x)}} \stopformula

Comments:
\NextStep \item Nonlinear equation (same is true for equation (\in[eq:NS]) \par\NextStep
\item One should add initial conditions \par\NextStep
\item and boundary conditions


\StopSteps
\stoptext
%%%%%% end file steps-david-3.tex
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


-- Vít Zýka --- http://typokvitek.com Automatic document typesetting Automaticka sazba dokumentu -- --


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

Reply via email to