Skip to content

Commit 3dc8564

Browse files
authored
Merge pull request #810 from mathjax/fix-cd
Fix relative width in mpadded, and correct indentation
2 parents fea2ab6 + dc83b66 commit 3dc8564

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

ts/input/tex/amscd/AmsCdMethods.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ AmsCdMethods.arrow = function(parser: TexParser, name: string) {
116116
a = '\\kern ' + top.getProperty('minw');
117117
} // minsize needs work
118118
if (a || b) {
119-
let pad: EnvList = {width: '.67em', lspace: '.33em'};
119+
let pad: EnvList = {width: '+.67em', lspace: '.33em'};
120120
mml = parser.create('node', 'munderover', [mml]) as MmlMunderover;
121121
if (a) {
122122
let nodeA = new TexParser(a, parser.stack.env, parser.configuration).mml();
@@ -128,28 +128,28 @@ AmsCdMethods.arrow = function(parser: TexParser, name: string) {
128128
let nodeB = new TexParser(b, parser.stack.env, parser.configuration).mml();
129129
NodeUtil.setChild(mml, mml.under, parser.create('node', 'mpadded', [nodeB], pad));
130130
}
131-
if (parser.configuration.options.amscd.hideHorizontalLabels) {
132-
mml = parser.create('node', 'mpadded', mml, {depth: 0, height: '.67em'});
133-
}
131+
if (parser.configuration.options.amscd.hideHorizontalLabels) {
132+
mml = parser.create('node', 'mpadded', mml, {depth: 0, height: '.67em'});
134133
}
135-
} else {
134+
}
135+
} else {
136136
//
137137
// Lay out vertical arrows with mrow if there are labels
138138
//
139-
let arrowNode = parser.create('token', 'mo', vdef, arrow);
140-
mml = arrowNode;
141-
if (a || b) {
142-
mml = parser.create('node', 'mrow');
143-
if (a) {
144-
NodeUtil.appendChildren(
145-
mml, [new TexParser('\\scriptstyle\\llap{' + a + '}', parser.stack.env, parser.configuration).mml()]);
146-
}
147-
arrowNode.texClass = TEXCLASS.ORD;
148-
NodeUtil.appendChildren(mml, [arrowNode]);
149-
if (b) {
150-
NodeUtil.appendChildren(mml, [new TexParser('\\scriptstyle\\rlap{' + b + '}',
151-
parser.stack.env, parser.configuration).mml()]);
152-
}
139+
let arrowNode = parser.create('token', 'mo', vdef, arrow);
140+
mml = arrowNode;
141+
if (a || b) {
142+
mml = parser.create('node', 'mrow');
143+
if (a) {
144+
NodeUtil.appendChildren(
145+
mml, [new TexParser('\\scriptstyle\\llap{' + a + '}', parser.stack.env, parser.configuration).mml()]);
146+
}
147+
arrowNode.texClass = TEXCLASS.ORD;
148+
NodeUtil.appendChildren(mml, [arrowNode]);
149+
if (b) {
150+
NodeUtil.appendChildren(mml, [new TexParser('\\scriptstyle\\rlap{' + b + '}',
151+
parser.stack.env, parser.configuration).mml()]);
152+
}
153153
}
154154
}
155155
}

0 commit comments

Comments
 (0)