Skip to content

Commit

Permalink
Fix CHTML width problem with multline with tags, and SVG multline wit…
Browse files Browse the repository at this point in the history
…h small container widths. Resolves issue mathjax#1974.
  • Loading branch information
dpvc committed Apr 4, 2018
1 parent c4eca32 commit a5360a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions unpacked/jax/output/CommonHTML/autoload/mtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,10 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
// Set variable width on DOM nodes
//
if (relWidth) {
this.CHTML.pwidth = values.width; this.CHTML.mwidth = CHTML.Em(TW);
node.style.width = node.firstChild.style.width = "100%";
node.style.width = this.CHTML.pwidth = "100%";
this.CHTML.mwidth = CHTML.Em(TW);
node.firstChild.style.width = values.width;
node.firstChild.style.margin = "auto";
}
},
//
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/SVG/autoload/mtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
if (values.width === "auto") {
if (WP > .98) {Wf = Wp/(Wt+Wp); WW = Wt + Wp} else {WW = Wt / (1-WP)}
} else {
WW = SVG.length2em(values.width,mu);
WW = Math.max(Wt + Wp, SVG.length2em(values.width,mu));
for (i = 0, m = Math.min(J,CSPACE.length); i < m; i++) {WW -= CSPACE[i]}
}
// Determine the relative column widths
Expand Down

0 comments on commit a5360a0

Please sign in to comment.