ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: missing space between text and a formula
Date: Tue, 11 Aug 2009 22:35:13 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0908112208320.31236@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4A81A82D.5080604@gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1263 bytes --]

On Tue, 11 Aug 2009, Bostjan Vesnicer wrote:

> Hi,
>
> I found the solution to my problem about missing space between text and a 
> formula in MKII when using \indenting[next] (see 
> http://archive.contextgarden.net/message/20080424.112935.a81d9346.en.html), 
> however it seems to me that the proposed fix hasn't been applied to the 
> ConTeXt distribution after that.

I do not completely understand what is happening here. Here is a modified 
example posted by Bostjan

%%%%%%%%%%%%%%%%%%%%%
\starttext
\startbuffer
Watch the space between this line and the formula.

\startformula
E = m c^2
\stopformula
\stopbuffer

\setupformulas[spacebefore=0pt]
\getbuffer

\setupformulas[spacebefore=big]
\setupindenting [yes, next, big]
\getbuffer

\setupformulas[spacebefore=0pt]
\getbuffer
\stoptext
%%%%%%%%%%%%%%%%%%%%%

MKII is getting it completely wrong, especially in the last case: the 
formula overwrites the text! I do not know what is going on. Wolfgang had 
posted a patch (see attachment) that adds a \ifindentfirstparagraph check 
before removing the baseline skip in \startdisplaymath, but I do not know 
what side effects it can have. Can someone who understand MKII indentation 
model please check this?

MKIV behaviour is (visually) correct.

Aditya

[-- Attachment #2: Type: TEXT/PLAIN, Size: 714 bytes --]

diff --git a/strc-mat.mkii b/strc-mat.mkii
index 342f3f3..0e8bfca 100644
--- a/strc-mat.mkii
+++ b/strc-mat.mkii
@@ -409,11 +409,13 @@
      \beforedisplayspace
      \par
      \ifvmode
-        \prevdepth-\maxdimen % texbook pagina 79-80
-        % otherwise problems at the top of a page, don't remove:
-        \verticalstrut
-        \vskip-\struttotal
-        \vskip-\baselineskip
+        \ifindentfirstparagraph
+          \prevdepth-\maxdimen % texbook pagina 79-80
+          % otherwise problems at the top of a page, don't remove:
+          \verticalstrut
+          \vskip-\struttotal
+          \vskip-\baselineskip
+        \fi
      \fi
    \fi
    $$\setdisplaydimensions

[-- Attachment #3: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2009-08-12  2:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 17:19 Bostjan Vesnicer
2009-08-12  2:35 ` Aditya Mahajan [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=alpine.LNX.2.00.0908112208320.31236@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).