commit 59c351a14370908fbdb50b30280abf63ea7d17bd
parent 86792eaf44afc7d6311209f1932a4624016c9819
Author: Davide P. Cervone <dpvc@union.edu>
Date: Sat, 15 Feb 2014 08:21:03 -0500
Improve layout for CD environment. HTML and SVG is improved; NativeMML is better, but still has some problems. Issue #470.
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/unpacked/extensions/TeX/AMScd.js b/unpacked/extensions/TeX/AMScd.js
@@ -29,7 +29,7 @@ MathJax.Extension["TeX/AMScd"] = {
config: MathJax.Hub.CombineConfig("TeX.CD",{
colspace: "5pt",
rowspace: "5pt",
- harrowsize: "2.25em",
+ harrowsize: "2.75em",
varrowsize: "1.75em",
hideHorizontalLabels: false
})
@@ -80,7 +80,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var mml;
var hdef = {minsize: top.minw, stretchy:true},
- vdef = {minsize: top.minh, stretchy:true, symmetric:true};
+ vdef = {minsize: top.minh, stretchy:true, symmetric:true, lspace:0, rspace:0};
if (c === ".") {}
else if (c === "|") {mml = this.mmlToken(MML.mo("\u2225").With(vdef))}
@@ -130,6 +130,14 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
this.CD_cell(name);
},
CD_cell: function (name) {
+ var top = this.stack.Top();
+ if ((top.table||[]).length % 2 === 0 && (top.row||[]).length === 0) {
+ //
+ // Add a strut to the first cell in even rows to get
+ // better spacing of arrow rows.
+ //
+ this.Push(MML.mpadded().With({height:"8.5pt",depth:"2pt"}));
+ }
this.Push(STACKITEM.cell().With({isEntry:true, name:name}));
},