ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Meer, H. van der" <H.vanderMeer@uva.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <pragma@wxs.nl>
Subject: Re: extra white after equation
Date: Sun, 13 Nov 2011 22:11:10 +0000	[thread overview]
Message-ID: <D30BEE9E-0AB0-45DF-82D6-68A1134AAD6C@uva.nl> (raw)
In-Reply-To: <3C687A5E-A8F9-4090-AB01-8033BAE584AE@xs4all.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2555 bytes --]

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]
% <HERE REDEFINED \dododoformulanumber>
\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}


[-- Attachment #1.2: Type: text/html, Size: 5118 bytes --]

[-- Attachment #2: equationwhite-bad.pdf --]
[-- Type: application/pdf, Size: 17113 bytes --]

[-- Attachment #3: equationwhite-good.pdf --]
[-- Type: application/pdf, Size: 14011 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2011-11-13 22:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-13 13:57 Hans van der Meer
2011-11-13 22:11 ` Meer, H. van der [this message]

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=D30BEE9E-0AB0-45DF-82D6-68A1134AAD6C@uva.nl \
    --to=h.vandermeer@uva.nl \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).