ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* missing space between text and a formula
@ 2009-08-11 17:19 Bostjan Vesnicer
  2009-08-12  2:35 ` Aditya Mahajan
  0 siblings, 1 reply; 2+ messages in thread
From: Bostjan Vesnicer @ 2009-08-11 17:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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.

Bostjan

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 4617 bytes --]

[-- Attachment #2: 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: missing space between text and a formula
  2009-08-11 17:19 missing space between text and a formula Bostjan Vesnicer
@ 2009-08-12  2:35 ` Aditya Mahajan
  0 siblings, 0 replies; 2+ messages in thread
From: Aditya Mahajan @ 2009-08-12  2:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-12  2:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-11 17:19 missing space between text and a formula Bostjan Vesnicer
2009-08-12  2:35 ` Aditya Mahajan

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).