www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7343e81dba4fcdd04af413b3eb2c1cf7e9b9b647
parent 3270781b2c88d6a76a47f05d028a136db4a433e3
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Thu,  2 Apr 2015 14:30:45 -0400

Handle combining characters so that they work in IE.

Diffstat:
Munpacked/jax/output/CommonHTML/jax.js | 17+++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js @@ -166,15 +166,11 @@ "-webkit-box-shadow": "2px 2px 5px #AAAAAA", // Safari 3 and Chrome "-moz-box-shadow": "2px 2px 5px #AAAAAA", // Forefox 3.5 "-khtml-box-shadow": "2px 2px 5px #AAAAAA", // Konqueror -// filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')", // IE padding: "3px 4px", "z-index": 401, position: "absolute", left: 0, top: 0, width: "auto", height: "auto", display: "none" -// }, -// "#MathJax_Tooltip *": { -// filter: "none", opacity:1, background:"transparent" // for IE } }; @@ -1686,6 +1682,7 @@ }}); } if (values.text.length !== 1) delete this.CHTML.skew; + else if (this.CHTML.w === 0 && this.CHTML.l < 0) this.CHTMLfixCombiningChar(node); if (values.largeop) this.CHTMLcenterOp(node); } @@ -1737,6 +1734,18 @@ data.mathvariant = "-TeX-variant"; // ### FIXME: handle other fonts } }, + CHTMLfixCombiningChar: function (node) { + // + // IE doesn't display combining chararacters unless they combine with + // something, so put them over a space and remove the space's width + // + var char = node.firstChild.textContent; + node.firstChild.innerHTML = "\u00A0" + char; + var font = this.CHTMLvariant.cache[char.charCodeAt(0)][0].font; + var space = font[0xA0] || font[0x20]; + var w = space[2] / (space.c ? 1 : 1000); + node.firstChild.style.marginLeft = CHTML.Em(-w); + }, CHTMLcenterOp: function (node) { var bbox = this.CHTML; var p = (bbox.h - bbox.d)/2 - CHTML.TEX.axis_height;