Add phasorangle notation to menclosed. Resolves issue#561.

This commit is contained in:
Davide P. Cervone 2014-02-08 13:58:31 -05:00
parent 2afb80176c
commit 2c2e2135b5
3 changed files with 27 additions and 0 deletions

View File

@ -135,6 +135,7 @@ MathJax.ElementJax.mml.Augment({
UPDIAGONALARROW: "updiagonalarrow", UPDIAGONALARROW: "updiagonalarrow",
VERTICALSTRIKE: "verticalstrike", VERTICALSTRIKE: "verticalstrike",
HORIZONTALSTRIKE: "horizontalstrike", HORIZONTALSTRIKE: "horizontalstrike",
PHASORANGLE: "phasorangle",
MADRUWB: "madruwb" MADRUWB: "madruwb"
}, },
ALIGN: { ALIGN: {

View File

@ -183,6 +183,27 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} }
break; break;
case MML.NOTATION.PHASORANGLE:
W -= 2*p; p = (H+D)/2; W += p;
if (HTMLCSS.useVML) {
if (!vml) {vml = this.HTMLvml(stack,H,D,W,t,values.mathcolor)}
this.HTMLvmlElement(vml,"shape",{
style: {width:this.HTMLpx(W), height:this.HTMLpx(H+D)},
path: "m "+this.HTMLpt(p+t/2,t/2)+
" l "+this.HTMLpt(t/2,H+D-t)+" "+this.HTMLpt(W-t/2,H+D-t)+" e",
coordsize: this.HTMLpt(W,H+D)
});
} else {
if (!svg) {svg = this.HTMLsvg(stack,H,D,W,t,values.mathcolor)}
this.HTMLsvgElement(svg.firstChild,"path",{
d: "M "+this.HTMLpx(p)+",1" +
"L 1,"+this.HTMLpx(H+D-t)+" L "+this.HTMLpx(W)+","+this.HTMLpx(H+D-t)
});
HTMLCSS.placeBox(svg.parentNode,0,-D,true);
}
break;
case MML.NOTATION.MADRUWB: case MML.NOTATION.MADRUWB:
frame.style.borderBottom = SOLID; frame.style.borderBottom = SOLID;
frame.style.borderRight = SOLID; if (!HTMLCSS.msieBorderWidthBug) {B = R = t} frame.style.borderRight = SOLID; if (!HTMLCSS.msieBorderWidthBug) {B = R = t}

View File

@ -178,6 +178,11 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
svg.Add(BBOX.DLINE(H,D,W,t,values.mathcolor,"down")); svg.Add(BBOX.DLINE(H,D,W,t,values.mathcolor,"down"));
break; break;
case MML.NOTATION.PHASORANGLE:
borders[2] = true; W -= 2*p; p = (H+D)/2; W += p;
svg.Add(BBOX.DLINE(H,D,p,t,values.mathcolor,"up"));
break;
case MML.NOTATION.MADRUWB: case MML.NOTATION.MADRUWB:
borders[1] = borders[2] = true; borders[1] = borders[2] = true;
break; break;