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",
VERTICALSTRIKE: "verticalstrike",
HORIZONTALSTRIKE: "horizontalstrike",
PHASORANGLE: "phasorangle",
MADRUWB: "madruwb"
},
ALIGN: {

View File

@ -182,6 +182,27 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
});
}
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:
frame.style.borderBottom = SOLID;

View File

@ -177,6 +177,11 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
case MML.NOTATION.DOWNDIAGONALSTRIKE:
svg.Add(BBOX.DLINE(H,D,W,t,values.mathcolor,"down"));
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:
borders[1] = borders[2] = true;