mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
Adjust \underset alignment and spacing (#1290)
* Support Unicode \ll and \lll Fixes issue #1271 * Adjust \underset alignment and spacing Fixes issue #1288. 1. Fixes vertical alignment by keeping the base element on the baseline. 2. Assigns horizontal spacing to \underset in a manner that aligns with LaTeX `\binrel` * Fix flow error * Add comment * Allow for shift of mathops * Update screenshots * Test for nested ordgroups * Set \stackrel spacing class to mrel * Fix lint error * Better determination of atom type * Add comment. * Add `suppressBaseShift` to ParseNodeTypes
This commit is contained in:
@@ -72,8 +72,9 @@ const htmlBuilder = (group, options) => {
|
||||
// If content of op is a single symbol, shift it vertically.
|
||||
let baseShift = 0;
|
||||
let slant = 0;
|
||||
if (base instanceof domTree.symbolNode) {
|
||||
// Shift the symbol so its center lies on the axis (rule 13). It
|
||||
if (base instanceof domTree.symbolNode && !group.value.suppressBaseShift) {
|
||||
// We suppress the shift of the base of \overset and \underset. Otherwise,
|
||||
// shift the symbol so its center lies on the axis (rule 13). It
|
||||
// appears that our fonts have the centers of the symbols already
|
||||
// almost on the axis, so these numbers are very small. Note we
|
||||
// don't actually apply this here, but instead it is used either in
|
||||
|
Reference in New Issue
Block a user