Re: [NTG-context] extra white after equation

2011-11-13 Thread Meer, H. van der
I guess I have found the culprit in the bad placement of formulas without an 
equationnumber.

The minimal example I used is that found in strc-mat.mkiv, added a [-] in the 
middle one.
\setuppapersize[A6][A6]
\setupformulae[spacebefore=0pt,spaceafter=0pt]
% 
\starttext
\placenamedformula[one]{first}  \startformula a = 1 \stopformula \endgraf
\placeformula[-]   \startformula a = 2 \stopformula \endgraf
\placenamedformula {second} \startformula a = 3 \stopformula \endgraf
\stoptext

It appears that in the case of an absent equationnumber extra stretching takes 
place at the position of the (now absent) equationnumber. Placing phantom ()'s 
remedies this. The effect is best seen by enabling the 
\rlap{\tracedformulamode}%-line.

May I ask Hans to take a look and change it in the next beta if this indeed a 
correct solution? For my suggestion for the change see below.
Thanks in advance.

Hans van der Meer




On 13 nov. 2011, at 14:57, Hans van der Meer wrote:

> I find that the placement of an equation number makes a difference on the 
> amount of white after the equation. Should they both give the same amount of 
> whitespace? Or is the difference intentional? But then why?
> I add a minimal example.
>
>

Output (1) as in Context ver: 2011.11.04 14:15 MKIV
Output (2) with redefined \ dododoformulanumber

% lines 240+ in strc-mat.mkiv
\def\dododoformulanumber
  {\ifconditional\handleformulanumber
 \hbox\bgroup
   % main counter
   \ifconditional\insidesubformulas
 % nothing
   \else
 \ifcase\formulasnumbermode
   \ifcase\placeformulanumbermode
 \dohandleformulanumbering
   \or
 \dohandleformulanumbering
   \or
 % nothing THIS SEEMS BAD
 \phantom{()}% THIS GIVES CORRECT SPACING
  \or
 \dohandleformulanumbering
   \fi
 \or
   \dohandleformulanumbering
 \or
   % nothing
 \or
   \dohandleformulanumbering
 \fi
   \fi
   % subcounter
   \ifconditional\insidesubformulas
 \ifcase\subformulasnumbermode
   % nothing
 \or
   \dohandlesubformulanumbering
 \or
   % nothing NOT CHECKED BUT PROBABLY SAME AS ABOVE
 \phantom{()}% PROBABLY HERE TOO
 \or
   \dohandlesubformulanumbering
 \fi
   \fi
  %\rlap{\tracedformulamode}%
 \egroup
   \fi}



equationwhite-bad.pdf
Description: equationwhite-bad.pdf


equationwhite-good.pdf
Description: equationwhite-good.pdf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] extra white after equation

2011-11-13 Thread Hans van der Meer
I find that the placement of an equation number makes a difference on the 
amount of white after the equation. Should they both give the same amount of 
whitespace? Or is the difference intentional? But then why?
I add a minimal example.

Hans van der Meer

% Test white after formula with and without equation number.
\starttext
\input tufte
\placeformula\startformula a^2 + b^2 = c^2 \stopformula % no extra white
\input tufte
\placeformula[-]\startformula a^2 + b^2 = c^2 \stopformula  % extra white
\input tufte
\stoptext



equationwhite.pdf
Description: Adobe PDF document



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___