[LyX/master] Reduce the value of (above|below)displayskip
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Sun Feb 21 19:36:30 UTC 2021
commit 41d29ce3877016e813cf8ef285d63fc8c7d0c478
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Sun Feb 21 20:33:57 2021 +0100
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 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 24e4397..bcde5d3 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)
More information about the lyx-cvs
mailing list