Skip to content

Commit 4522a15

Browse files
committed
Make sure height is above depth when making spaces and rules in HTML-CSS and SVG output
1 parent fd3dd8b commit 4522a15

File tree

11 files changed

+14
-10
lines changed

11 files changed

+14
-10
lines changed

config/AM_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/Accessible-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/MML_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-AMS-MML_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-AMS-MML_SVG-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-AMS_HTML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/TeX-MML-AM_HTMLorMML-full.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jax/output/HTML-CSS/jax.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jax/output/SVG/jax.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,8 @@
894894
return space;
895895
},
896896
createSpace: function (span,h,d,w,color) {
897-
var H = this.Em(Math.max(0,h+d)), D = this.Em(-d);
897+
if (h < -d) {d = -h} // make sure h is above d
898+
var H = this.Em(h+d), D = this.Em(-d);
898899
if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)}
899900
if (span.isBox || span.className == "mspace") {
900901
var scale = (span.scale == null ? 1 : span.scale);
@@ -925,6 +926,7 @@
925926
return span;
926927
},
927928
createRule: function (span,h,d,w,color) {
929+
if (h < -d) {d = -h} // make sure h is above d
928930
var min = HTMLCSS.TeX.min_rule_thickness, f = 1;
929931
// If rule is very thin, make it at least min_rule_thickness so it doesn't disappear
930932
if (w > 0 && w*this.em < min) {w = min/this.em}
@@ -942,6 +944,7 @@
942944
return rule;
943945
},
944946
createFrame: function (span,h,d,w,t,style) {
947+
if (h < -d) {d = -h} // make sure h is above d
945948
var T = (this.msieBorderWidthBug ? 0 : 2*t);
946949
var H = this.Em(h+d-T), D = this.Em(-d-t), W = this.Em(w-T);
947950
var B = this.Em(t)+" "+style;

0 commit comments

Comments
 (0)