Dear list,

I did some research in math-ali.mkiv and found that when grid is enabled, the 
whole alignment is simply put in a vbox and snapped to the grid using

\def\math_alignment_snap_start
  {\ifgridsnapping
     \snaptogrid[\v!both]\vbox\bgroup
   \fi}

Unfortunately, the `both` option rounds down both depth and height which is 
inconvenient when the content has large descenders (as in the example).  It  
should be therefore changed to some other grid setting which rounds up.  I 
chose `top` for now but I'm not done experimenting yet.

Cheers, Henri


On 08/28/2016 03:27 PM, Henri Menke wrote:
> 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 : [email protected] / 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 via email to