Closed pkra closed 8 years ago
It looks like the CSSStyleDeclaration (used by jsdom) handling of ex
units isn't right, so the margin-bottom
isn't being set. I'll have to look into it. It is part of the code I had supplied to them, but it used their routines for determining when a measurement is valid.
Looks like their unit parser doesn't include ex
. Argh! I'll have to see about patching that.
Thanks for looking into it, @dpvc.
OK, I've included a patch in the issue233
branch. I still have to make a PR to the CSSStyleDeclaration site to fix the issue, but the patch should take care of it from our end for now.
Note, the misalignment in the original complaint is due to the fact that method adjusts the placement (I haven't looked into how it does this), which may be necessary because it is a background image rather than a direct image element. It may be that the missing margin-bottom
was causing their computations to go awry.
@dpvc Thank you very much. The patch seems to work great. However, I have to admit that I do not understand how it works. Since quite a few lines were changed, I'm a afraid that it might break other things.
OK. Ater having understood that https://github.com/mathjax/MathJax-node/commit/bd1d6c430dbd45d5e6db8e496bfc03619e411169#diff-c4f7e206b09703de4edb0800d5a5af15R386 really is a non trivial setter and the line below is a getter I can finally get an idea of the change.
Via https://phabricator.wikimedia.org/T135423; cc @physikerwelt.
It seems like margin-bottom is missing when generating output with mathjax-node.
E.g.,
$\underline{\mathbb{Z}}$
will getstyle="vertical-align: -0.52ex;"
from mathjax-node but in a page would getvertical-align: -0.52ex; margin-bottom: -0.734ex;
.