-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The height of \stackrel
is too large in SVG output
#3250
Comments
Also we can compare <!DOCTYPE html>
<html>
<head>
<style>
td {
border: solid thin gray;
padding: 10px
}
table {
border-collapse: collapse
}
</style>
<script>
MathJax = {
output: {
font: 'mathjax-modern'
},
loader: {
load: ['input/tex-base', 'output/svg', '[tex]/ams']
},
tex: {
packages: ['base','ams']
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.6/startup.js"></script>
</head>
<body>
<table>
<tr>
<td>
\(1 \xleftarrow {α} 2\)<br>next line</td>
<td>
\(1 \stackrel {α }{⟵ } 2\)<br>next line
</td>
</tr>
</table>
</body>
</html> |
\stackrel
is too large when using startup.js
with minimal configuration of MathJax.\stackrel
is too large
\stackrel
is too large\stackrel
is too large in SVG output
This seems to be a bug in the handling of line breaking for inline expressions. I'll have to look into it further, but you can prevent the linebreaks by enclosing the whole expression in braces. E.g., use |
OK, I've tracked it down and made a PR to fix it. In the meantime, you can add startup: {
ready() {
const {SvgWrappers} = MathJax._.output.svg.Wrappers_ts;
SvgWrappers.inferredMrow = class mySvgMrow extends SvgWrappers.inferredMrow {
computeLinebreakBBox(bbox) {
if (!this.coreMO().node.isEmbellished) {
super.computeLinebreakBBox(bbox);
}
}
};
MathJax.startup.defaultReady();
}
} to your MathJax configuration as a workaround. |
Fix bounding box computation for some embellished operators. (mathjax/MathJax#3250)
Issue Summary
The height of
\stackrel
is too large when usingstartup.js
with minimal configuration of MathJax.Steps to Reproduce:
See the output: The height of formula in the second table cell is too large
Change MathJax configuration to
Technical details:
The text was updated successfully, but these errors were encountered: