From 41d29ce3877016e813cf8ef285d63fc8c7d0c478 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 21 Feb 2021 20:33:57 +0100 Subject: [PATCH] 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. --- src/mathed/InsetMathHull.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 24e4397490..bcde5d3d03 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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) -- 2.39.5