Reduce the value of (above|below)displayskip

The value of 10pt is too large, use a 'mean' value of 8.5pt.

Tentative fix to bug #12153.
This commit is contained in:
Jean-Marc Lasgouttes 2021-02-21 20:33:57 +01:00
parent 9e734339e9
commit 41d29ce387

View File

@ -480,12 +480,13 @@ void InsetMathHull::metrics(MetricsInfo & mi, Dimension & dim) const
{
/* Compute \(above|below)displayskip
true value in LaTeX is 10pt plus 2pt minus 5pt (in normal size at 10pt)
We use the 'mean' value (12 + 5) / 2 = 8.5pt.
FIXME: make this dependent of current size? (minor improvement)
FIXME: if would be nice if this was not part of the inset, but
just increased the row ascent/descent.
FIXME: even better would be to handle the short skip case.
*/
int const bottom_display_margin = mi.base.inPixels(Length(10, Length::PT));
int const bottom_display_margin = mi.base.inPixels(Length(8.5, Length::PT));
int top_display_margin = bottom_display_margin;
// at start of paragraph, add an empty line
if (mi.vmode)