Don't use monospace for MS, and use smart quotes, like CommonHTML.
This commit is contained in:
parent
cbdfa18ad1
commit
463c88e4be
|
@ -32,16 +32,19 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
||||||
MML.ms.Augment({
|
MML.ms.Augment({
|
||||||
toHTML: function (span) {
|
toHTML: function (span) {
|
||||||
span = this.HTMLhandleSize(this.HTMLcreateSpan(span));
|
span = this.HTMLhandleSize(this.HTMLcreateSpan(span));
|
||||||
var values = this.getValues("lquote","rquote");
|
var values = this.getValues("lquote","rquote","mathvariant");
|
||||||
var text = this.data.join(""); // FIXME: handle mglyph?
|
if (!this.hasValue("lquote") || values.lquote === '"') values.lquote = "\u201C";
|
||||||
this.HTMLhandleVariant(span,this.HTMLgetVariant(),values.lquote+text+values.rquote);
|
if (!this.hasValue("rquote") || values.rquote === '"') values.rquote = "\u201D";
|
||||||
|
if (values.lquote === "\u201C" && values.mathvariant === "monospace") values.lquote = '"';
|
||||||
|
if (values.rquote === "\u201D" && values.mathvariant === "monospace") values.rquote = '"';
|
||||||
|
var text = values.lquote+this.data.join("")+values.rquote; // FIXME: handle mglyph?
|
||||||
|
this.HTMLhandleVariant(span,this.HTMLgetVariant(),text);
|
||||||
this.HTMLhandleSpace(span);
|
this.HTMLhandleSpace(span);
|
||||||
this.HTMLhandleColor(span);
|
this.HTMLhandleColor(span);
|
||||||
this.HTMLhandleDir(span);
|
this.HTMLhandleDir(span);
|
||||||
return span;
|
return span;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
MML.ms.prototype.defaults.mathvariant = 'monospace';
|
|
||||||
|
|
||||||
MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");
|
MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");
|
||||||
MathJax.Ajax.loadComplete(HTMLCSS.autoloadDir+"/ms.js");
|
MathJax.Ajax.loadComplete(HTMLCSS.autoloadDir+"/ms.js");
|
||||||
|
|
|
@ -33,17 +33,20 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||||
toSVG: function () {
|
toSVG: function () {
|
||||||
this.SVGgetStyles();
|
this.SVGgetStyles();
|
||||||
var svg = this.SVG(); this.SVGhandleSpace(svg);
|
var svg = this.SVG(); this.SVGhandleSpace(svg);
|
||||||
var values = this.getValues("lquote","rquote");
|
var values = this.getValues("lquote","rquote","mathvariant");
|
||||||
|
if (!this.hasValue("lquote") || values.lquote === '"') values.lquote = "\u201C";
|
||||||
|
if (!this.hasValue("rquote") || values.rquote === '"') values.rquote = "\u201D";
|
||||||
|
if (values.lquote === "\u201C" && values.mathvariant === "monospace") values.lquote = '"';
|
||||||
|
if (values.rquote === "\u201D" && values.mathvariant === "monospace") values.rquote = '"';
|
||||||
var variant = this.SVGgetVariant(), scale = this.SVGgetScale();
|
var variant = this.SVGgetVariant(), scale = this.SVGgetScale();
|
||||||
var text = this.data.join(""); // FIXME: handle mglyph?
|
var text = values.lquote+this.data.join("")+values.rquote; // FIXME: handle mglyph?
|
||||||
svg.Add(this.SVGhandleVariant(variant,scale,values.lquote+text+values.rquote));
|
svg.Add(this.SVGhandleVariant(variant,scale,text));
|
||||||
svg.Clean();
|
svg.Clean();
|
||||||
this.SVGhandleColor(svg);
|
this.SVGhandleColor(svg);
|
||||||
this.SVGsaveData(svg);
|
this.SVGsaveData(svg);
|
||||||
return svg;
|
return svg;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
MML.ms.prototype.defaults.mathvariant = 'monospace';
|
|
||||||
|
|
||||||
MathJax.Hub.Startup.signal.Post("SVG ms Ready");
|
MathJax.Hub.Startup.signal.Post("SVG ms Ready");
|
||||||
MathJax.Ajax.loadComplete(SVG.autoloadDir+"/ms.js");
|
MathJax.Ajax.loadComplete(SVG.autoloadDir+"/ms.js");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user