Use mathvariant rather than fontfamily to set the font for <ms> elements (make it consistent with SVG jax)
This commit is contained in:
parent
10399b42b7
commit
cc1c05bdd2
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.ms.Augment({toHTML:function(e){e=this.HTMLhandleSize(this.HTMLcreateSpan(e));var d=this.getValues("lquote","rquote");var g=this.data.join("");var f=[];if(d.lquote.length===1){f.push(this.HTMLquoteRegExp(d.lquote))}if(d.rquote.length===1){f.push(this.HTMLquoteRegExp(d.rquote))}if(f.length){g=g.replace(RegExp("("+f.join("|")+")","g"),"\\$1")}this.HTMLhandleVariant(e,this.HTMLgetVariant(),d.lquote+g+d.rquote);this.HTMLhandleSpace(e);this.HTMLhandleColor(e);return e},HTMLquoteRegExp:function(d){return d.replace(/([.*+?|{}()\[\]\\])/g,"\\$1")}});a.ms.prototype.defaults.fontfamily="monospace";MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/ms.js")});
|
||||
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.ms.Augment({toHTML:function(e){e=this.HTMLhandleSize(this.HTMLcreateSpan(e));var d=this.getValues("lquote","rquote");var g=this.data.join("");var f=[];if(d.lquote.length===1){f.push(this.HTMLquoteRegExp(d.lquote))}if(d.rquote.length===1){f.push(this.HTMLquoteRegExp(d.rquote))}if(f.length){g=g.replace(RegExp("("+f.join("|")+")","g"),"\\$1")}this.HTMLhandleVariant(e,this.HTMLgetVariant(),d.lquote+g+d.rquote);this.HTMLhandleSpace(e);this.HTMLhandleColor(e);return e},HTMLquoteRegExp:function(d){return d.replace(/([.*+?|{}()\[\]\\])/g,"\\$1")}});a.ms.prototype.defaults.mathvariant="monospace";MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/ms.js")});
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
return string.replace(/([.*+?|{}()\[\]\\])/g,"\\$1");
|
||||
}
|
||||
});
|
||||
MML.ms.prototype.defaults.fontfamily = 'monospace';
|
||||
MML.ms.prototype.defaults.mathvariant = 'monospace';
|
||||
|
||||
MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");
|
||||
MathJax.Ajax.loadComplete(HTMLCSS.autoloadDir+"/ms.js");
|
||||
|
|
Loading…
Reference in New Issue
Block a user