From: Vit Zyka <vit.zyka@seznam.cz>
Subject: Re: \presentationstep
Date: Wed, 10 Nov 2004 19:25:23 +0100 [thread overview]
Message-ID: <41925D13.2050000@seznam.cz> (raw)
In-Reply-To: <p06110407bdb7c051852b@[10.0.1.9]>
> 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
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
--
Vít Zýka --- http://typokvitek.com
Automatic document typesetting
Automaticka sazba dokumentu --
--
next prev parent reply other threads:[~2004-11-10 18:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 8:35 \presentationstep Otared Kavian
2004-11-03 16:42 ` \presentationstep David Munger
2004-11-03 17:25 ` \presentationstep Otared Kavian
2004-11-06 8:07 ` \presentationstep David Munger
2004-11-07 22:10 ` \presentationstep Otared Kavian
2004-11-08 0:57 ` \presentationstep David Munger
2004-11-08 12:59 ` \presentationstep Otared Kavian
2004-11-08 18:01 ` \presentationstep David Munger
2004-11-08 20:02 ` \presentationstep Otared Kavian
2004-11-08 21:10 ` \presentationstep David Munger
2004-11-10 14:51 ` \presentationstep Otared Kavian
2004-11-10 17:08 ` \presentationstep David Munger
2004-11-10 17:39 ` \presentationstep Hans Hagen
2004-11-10 18:08 ` \presentationstep David Munger
2004-11-10 18:44 ` \presentationstep Otared Kavian
2004-11-10 18:25 ` Vit Zyka [this message]
2004-11-10 19:05 ` \presentationstep Otared Kavian
-- strict thread matches above, loose matches on Subject: below --
2004-11-02 6:04 \presentationstep David Munger
2004-11-02 7:45 ` \presentationstep Henning Hraban Ramm
2004-11-02 9:58 ` \presentationstep Hans Hagen
2004-11-02 22:22 ` \presentationstep David Munger
2004-11-02 22:55 ` \presentationstep h h extern
2004-11-02 23:38 ` \presentationstep David Munger
2004-11-03 9:39 ` \presentationstep Hans Hagen
2004-11-09 10:18 ` \presentationstep Eckhart Guthöhrlein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41925D13.2050000@seznam.cz \
--to=vit.zyka@seznam.cz \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).