commit 15ab2765987ade11cd6cc436a8137c84f3f94fc5
parent c58b546ad7a51ad033039b5ca360cd009111c5ab
Author: Davide P. Cervone <dpvc@union.edu>
Date: Fri, 13 Mar 2015 15:49:58 -0400
Move unkown character styles to fontdata.js (they are font-dependent)
Diffstat:
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/unpacked/jax/output/CommonHTML/config.js b/unpacked/jax/output/CommonHTML/config.js
@@ -46,7 +46,9 @@ MathJax.OutputJax.CommonHTML = MathJax.OutputJax({
// use "container" to compute size from containing element,
// use "nn% container" for a portion of the container,
// use "nn%" for a portion of the window size
- }
+ },
+
+ undefinedFamily: "STIXGeneral,'Cambria Math','Arial Unicode MS',serif"
}
});
diff --git a/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js b/unpacked/jax/output/CommonHTML/fonts/TeX/fontdata.js
@@ -40,11 +40,19 @@
var ARROWREP = [0x2212,MAIN,0,0,0,0,.1]; // add depth for arrow extender
var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender
+ var UNDEFINEDFAMILY = CHTML.config.undefinedFamily;
+
+ MathJax.Hub.Insert(CHTML.config.styles,{
+ ".MJXc-TeX-unknown-R": {"font-family":UNDEFINEDFAMILY, "font-style":"normal", "font-weight":"normal"},
+ ".MJXc-TeX-unknown-I": {"font-family":UNDEFINEDFAMILY, "font-style":"italic", "font-weight":"normal"},
+ ".MJXc-TeX-unknown-B": {"font-family":UNDEFINEDFAMILY, "font-style":"normal", "font-weight":"bold"},
+ ".MJXc-TeX-unknown-BI": {"font-family":UNDEFINEDFAMILY, "font-style":"italic", "font-weight":"bold"},
+ });
+
CHTML.TEX = CHTML.TEXDEF; // use default TeX paramaters
CHTML.FONTDEF.TeX = {
version: VERSION,
- TeX_factor: 1, // TeX em's to font em's
baselineskip: 1.2,
lineH: .8, lineD: .2,
diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
@@ -38,8 +38,6 @@
STRUTHEIGHT = 1,
AFUZZ = .08, HFUZZ = .025, DFUZZ = .025; // adjustments to bounding box of character boxes
- var UNKNOWNFAMILY = "STIXGeneral,'Cambria Math','Arial Unicode MS',serif";
-
var STYLES = {
".MathJax_CHTML_Display": {
"display": "block",
@@ -104,11 +102,6 @@
".MJXc-space2": {"margin-left":".222em"},
".MJXc-space3": {"margin-left":".278em"},
- ".MJXc-TeX-unknown-R": {"font-family":UNKNOWNFAMILY, "font-style":"normal", "font-weight":"normal"},
- ".MJXc-TeX-unknown-I": {"font-family":UNKNOWNFAMILY, "font-style":"italic", "font-weight":"normal"},
- ".MJXc-TeX-unknown-B": {"font-family":UNKNOWNFAMILY, "font-style":"normal", "font-weight":"bold"},
- ".MJXc-TeX-unknown-BI": {"font-family":UNKNOWNFAMILY, "font-style":"italic","font-weight":"bold"},
-
"mjx-chartest": {
display:"block",
position:"absolute", top:0,