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:
Ron Kok
2018-05-09 21:13:37 -07:00
committed by ylemkimon
parent 5a4aedd882
commit 7b7b532fb6
6 changed files with 33 additions and 9 deletions

View File

@@ -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