[NTG-context] \presentationstep

David Munger mungerd at users.sourceforge.net
Wed Nov 10 18:08:22 CET 2004


Otared Kavian wrote :
> Hi David and all ConTeXters,
> 
> I was away from my e-mail so I am late in answering.
> Thank you for the file you put on your site. Indeed everything works 
> as intended (the \placeformula no longer advances with each step), 
> and I think one may suggest to Hans to include this in future 
> distributions.
> 
> However, in the spirit of ConTeXters who are always asking for a 
> step(!) towards perfectness, I let you know the following drawbacks 
> of the macros:
> 
> 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?

I'm sorry, I'm no TeX/ConTeXt guru and I really have no idea of how to
achieve this. I think now we need Hans' help.

I have indeed noticed that enclosing an operator between braces breaks
the spacing system. Try, for instance:

\startformula
   \vec\nabla\cdot\vec u = 0
\stopformula
\startformula
   \vec\nabla\cdot\vec u {=} 0
\stopformula

Unfortunately, using \phatom{=} results in the same broken spacing as
second formula.

> 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]?

Good point! Here's the fix (file updated on my website):

37c37
<       \dodoubleempty\doplaceformula[##1]}
---
>       \dodoubleempty\doplaceformula}
50c50,54
<       \dodoubleempty\doplaceformula[####1]}
---
>       \ifnum\steps at counter=\steps at number%
>         \def\steps at fnext{\dodoubleempty\doplaceformula[####1]}%
>       \else
>         \def\steps at fnext{\dodoubleempty\doplaceformula}%
>       \fi\steps at fnext}

Now we got rid of the duplicate label warnings. I also added your
contribution to the usage example. Thank you.

Regards,

David



More information about the ntg-context mailing list