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
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
___________________________________________________________________________________
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 via email to