MathJax
MathJax copied to clipboard
padding excess in bussproofs
Issue Summary
I am using Math Jax 3 with bussproofs. The problem is observable for example in the Chrome browser.
Positioning of the SVG box follows an algorithm, which makes it hard to see a full proof:
- widening the window increases some padding
- possibly result of some centering but the reference point is too far right
Steps to Reproduce:
- Use Math Jax 3 with bussproofs:
beginning of the HTML document:
<script>
window.MathJax = {
loader: {load: ['[tex]/bussproofs']},
tex: {packages: {'[+]': ['bussproofs']}}
};
</script>
end of the HTML document:
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>
JavaScript call when the plain content has been rendered:
MathJax.typeset();
- This is the second step
Create an example with a lot of branching:
\begin{prooftree}
\AxiomC{a => f, (a => b) => a |- a => f}
\AxiomC{a => f, (a => b) => a |- (a => b) => a}
\AxiomC{a, a => f, (a => b) => a |- a => f}
\AxiomC{a, a => f, (a => b) => a |- a}
\BinaryInfC{a, a => f, (a => b) => a |- f}
\UnaryInfC{a, a => f, (a => b) => a |- b}
\UnaryInfC{a => f, (a => b) => a |- a => b}
\BinaryInfC{a => f, (a => b) => a |- a}
\BinaryInfC{a => f, (a => b) => a |- f}
\UnaryInfC{(a => b) => a |- (a => f) => f}
\UnaryInfC{(a => b) => a |- a}
\UnaryInfC{ |- ((a => b) => a) => a}
\UnaryInfC{ |- ((a => b) => a) => a}
\end{prooftree}
- Further steps, etc.
When the window is normal size, the proof gets cropped:
Enlarging the window adds some padding:
Technical details:
See intro and steps.
Supporting information:
The issue was also observed here: https://github.com/mathjax/MathJax/issues/3240
But in the above issue some Unicode problems were discovered. But the example here is completely free of Unicode. Also the example here doesn't use any Labels, only the Centering commands of bussproofs.