mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Fix extensible arrow sup vertical alignment (#1256)
* Fix extensible arrow sup vertical alignment Fixes issue #1254 * Fix lint error * Allow small depth
This commit is contained in:
@@ -532,10 +532,10 @@ export const groupTypes = {
|
||||
const arrowShift = -options.fontMetrics().axisHeight +
|
||||
0.5 * arrowBody.height;
|
||||
// 2 mu kern. Ref: amsmath.dtx: #7\if0#2\else\mkern#2mu\fi
|
||||
let upperShift =
|
||||
-options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111;
|
||||
if (group.value.label === "\\xleftequilibrium") {
|
||||
upperShift -= upperGroup.depth;
|
||||
let upperShift = -options.fontMetrics().axisHeight
|
||||
- 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu
|
||||
if (upperGroup.depth > 0.25 || group.value.label === "\\xleftequilibrium") {
|
||||
upperShift -= upperGroup.depth; // shift up if depth encroaches
|
||||
}
|
||||
|
||||
// Generate the vlist
|
||||
|
Reference in New Issue
Block a user