ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mathalignment and grid
@ 2017-07-03  6:37 Henri Menke
  2017-07-03  7:24 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Henri Menke @ 2017-07-03  6:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

In a previous email I complained that with mathalignment large formulas crash into the paragraph
below when using grid typesetting.  This has been fixed in the latest beta but now the space above
and below is asymmetric.  For this particular case I could fix it by setting the gird snapping mode
to "top" rather than "math", but this does not apply universally.  Any chance there is an easy fix?

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\startmode[fix]
\unprotect
\def\math_alignment_snap_start
  {\ifgridsnapping
     \snaptogrid[top]\vbox\bgroup
   \fi}
\protect
\stopmode

\starttext
\input knuth
\startformula
  \startmathalignment
    \NC i\hbar\frac{\diff}{\diff t}\psi \NC= \left( - \frac{\hbar^2}{2 m} \nabla^2 + V(r) \right)
\psi \NR
    \NC F(x) \NC= \int f(x) \diff x \NR
  \stopmathalignment
\stopformula
\input ward
\stoptext
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread
* mathalignment and grid
@ 2016-08-28 13:27 Henri Menke
  2016-08-28 15:26 ` Henri Menke
  0 siblings, 1 reply; 4+ messages in thread
From: Henri Menke @ 2016-08-28 13:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

when I typeset multi line equations using mathalignment and grid the descenders of the last line of equation run into the first line of text after that equation.  The problem is particularly bad with the Lucida fonts (I think the large operators are relatively larger than for Latin Modern).

I could just increase the spacing after equation (commented out in the MWE below), but that would introduce an imbalance between space before and space after for all equations without descenders.  Furthermore the problem does not arise for single line equations with descenders.  Without grid there is also no problem.

How do I fix mathalignment to prevent this?

Cheers, Henri

---

\setuplayout[grid=yes]
\setupbodyfont[lucidaot,9pt]
%\setupformulas[spaceafter={back,nowhite,2*line}]

\showgrid
\starttext

\input ward
\startformula
  \startmathalignment
  \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
  \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
  \stopmathalignment
\stopformula
%\blank[2*line]
\input ward
\startformula
  \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta}
\stopformula
\input ward
\startformula
  \text{no descenders}
\stopformula
\input ward

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

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

end of thread, other threads:[~2017-07-03  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03  6:37 mathalignment and grid Henri Menke
2017-07-03  7:24 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2016-08-28 13:27 Henri Menke
2016-08-28 15:26 ` Henri Menke

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