-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align inconsistent between asciimath, latexmath, stem blocks #272
Comments
It would be nice if they were consistent. But how they are aligned / laid out is not handled by Asciidoctor. It's handled by MathJax. And for some reason, MathJax does it differently. |
Indeed, it seems that MathJax has two notation for TeX:
an only one mode for AsciiMath, which seems to be the inline version. Achieving centered, clear-both as suggested in the docs using styled paragraphs
Closing issue. |
For reference purposes, the linked upstream issue report mathjax/MathJax#2128 |
Davide of MathJax offered a solution that makes it possible for downstreamers to control how the blocks are displayed. Pull request sent. |
I found an even simpler way to do this (since we can rely on the structure of our own HTML). MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
if ((node = data.script.parentNode) && (node = node.parentNode) &&
node.classList.contains('stemblock')) {
data.math.root.display = "block";
}
return data;
});
}); |
A
[latextmath]
block has the nice feature of centering its content.Migrating
[latexmath]
blocks to[stem]
blocks left aligns the block content.Also, the
[asciimath]
also left aligns.Please see content below. Only second block is centered.
Some suggestions
The text was updated successfully, but these errors were encountered: