Closed pkra closed 8 years ago
FWIW, this setting always seemed like something the page author should be able handle via regular CSS (though I can think of a number of reasons why it's necessary with MathJax 2.x)
Perhaps another jsdom bug?
No, the test doesn't look at the right thing. The displayIndent
does not set the margin-left
for the display element; I'm afraid things are more complicated than that. The displayIndent
basically acts as the default setting for the MathML indentshift
setting, and its interaction with things like tags, the various shift values, and other content are not simple, and where in the DOM the value shows up differs for equations with labels and those without.
this setting always seemed like something the page author should be able handle via regular CSS
I don't think that would be easy to accomplish, as the required CSS would differ for the different output renderers, and for the different equations (e.g., labeled versus non-labeled). That would make for some complicated CSS rules that every author would have to understand and get right. From the kinds of questions we've seen in the past, I don't have high hopes for that.
Also, since MathJax needs to know this value to get the layout correct, I don't think that having the author specify it in CSS is going to be the right approach.
PS, you are right that for some equations, margin-left
is used, but not all.
You are right that displayIndent
isn't working in the case where the equation has no label. That is because mj-single neglected to set the outerEm
value, and so a computation for the margin was returning NaN
. The issue223
branch resolves that.
I'm afraid things are more complicated than that. [...]
Thanks for background!
I don't think that having the author specify it in CSS is going to be the right approach.
Copy that.
==> Merged.
I couldn't get displayIndent to work. Hopefully with a correct configuration this time:
Perhaps another jsdom bug (like #220)?