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

Vertical Scroll on some mathjax formulas #484

Closed
AndreWin opened this Issue Oct 11, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@AndreWin

AndreWin commented Oct 11, 2017

Hello!

I use Mathjax from here.

On following formulae I get vertical scrollbar on the right hand:

$$
\begin{equation}
s_{na1} = d_{a1} \left ( \dfrac{\dfrac{\pi}{2} + 2x_1\tg{\alpha}}{z_1} + \inv{\alpha_t} - \inv{\alpha_{a1}} \right )\cos{\beta_{a1}}
\end{equation}
$$

image

My mathjax config:

MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ["$","$"], ["\\(","\\)"] ],
        displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
        processEscapes: true,
    },
    TeX: {
        Macros: {
            Alpha: "\\mbox{A}",
            Beta: "\\mbox{B}",
            Epsilon: "\\mbox{E}",
            Zeta: "\\mbox{Z}",
            Eta: "\\mbox{H}",
            Iota: "\\mbox{I}",
            Kappa: "\\mbox{K}",
            Mu: "\\mbox{M}",
            Nu: "\\mbox{N}",
            Omicron: "\\mbox{O}",
            Rho: "\\mbox{P}",
            Tau: "\\mbox{T}",
            Chi: "\\mbox{X}",
            and: "\\mbox{&}",
            or: "\\lor",
            exist: "\\exists",
            empty: "\\emptyset",
            P: "\\mbox{P}",
            tan: "\\operatorname{tg}",   // tangent
            tg: "\\operatorname{tg}",    // tangent
            cot: "\\operatorname{ctg}",  // cotangent
            ctg: "\\operatorname{ctg}",  // cotangent
            csc: "\\operatorname{cosec}",     // cosecant
            cosec: "\\operatorname{cosec}",   // cosecant
            arctan: "\\operatorname{arctg}",  // arctangent
            arctg: "\\operatorname{arctg}",   // arctangent
            arccot: "\\operatorname{arcctg}",      // arc cotangent
            arcctg: "\\operatorname{arcctg}",      // arc cotangent
            arcsec: "\\operatorname{arcsec}",      // arc secant
            arccsc: "\\operatorname{arccosec}",    // arc cosecant
            arccosec: "\\operatorname{arccosec}",  // arc cosecant
            sh: "\\operatorname{sh}",     // hyperbolic sine
            ch: "\\operatorname{ch}",     // hyperbolic cosine
            th: "\\operatorname{th}",     // hyperbolic tangent
            cth: "\\operatorname{cth}",   // hyperbolic cotangent
            sinh: "\\operatorname{sh}",   // hyperbolic синус
            cosh: "\\operatorname{ch}",   // hyperbolic cosine
            tanh: "\\operatorname{th}",   // hyperbolic tangent
            coth: "\\operatorname{cth}",  // hyperbolic cotangent
            sgn: "\\operatorname{sgn}",
            mod: "\\operatorname{mod}",
            inv: "\\operatorname{inv}",
            ge: "\\geqslant",
            le: "\\leqslant",
            geq: "\\geqslant",
            leq: "\\leqslant",
            N: "\\mathbb{N}",
            R: "\\mathbb{R}",
            Q: "\\mathbb{Q}",
            Z: "\\mathbb{Z}",
            C: "\\mathbb{C}",
            H: "\\mathbb{H}",
            P: "\\mathbb{P}",
            dmtr: "\\unicode{x2300}", // diameter sign
            deg: "\\unicode{xb0}",    // degree sign
            celdeg: "\\unicode{x2103}"   // degree Celsius sign
        },
        // AutoNumbering of displayed formulas
        equationNumbers: { autoNumber: "AMS" },
        // All mathjax extensions:
		// http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-extensions
        // Source code for all extensions:
		// https://github.com/mathjax/MathJax/tree/master/extensions/TeX
        extensions: [
        "color.js", // Color support in LaTeX
        "autobold.js", // support for \boldsymbol{...}
        "AMSmath.js",
        "AMSsymbols.js",
        "AMScd.js", // http://www.jmilne.org/not/Mamscd.pdf
        "bbox.js", // support for \bbox[options]{math}
        // "begingroup.js", // mainly for formulas localization
        "cancel.js" // support for strikethrough formulas
        // "HTML.js" // works by default
        // "mhchem.js" // chemical formulas
        // "uniconde.js" // works by default
        ]
    }
});

I asked my question on mathjax repo: mathjax/MathJax#1853 (comment)
Then I tested it on default mkdocs theme and I found that this bug is only when I use mkdocs material theme.

Please help me to fix it.

Best regards,
Andrey.

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Oct 11, 2017

Owner

Can you please provide a link to the docs that you host? It's easier to fix then.

Owner

squidfunk commented Oct 11, 2017

Can you please provide a link to the docs that you host? It's easier to fix then.

@AndreWin

This comment has been minimized.

Show comment
Hide comment
@AndreWin

AndreWin Oct 11, 2017

Yes, this bug is on http://protflex.ru/xgears/cyl_gear/calcs/geom_calc/
Problem formulas are two last numbered ones on this page. They are at the end of this page.

AndreWin commented Oct 11, 2017

Yes, this bug is on http://protflex.ru/xgears/cyl_gear/calcs/geom_calc/
Problem formulas are two last numbered ones on this page. They are at the end of this page.

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Oct 11, 2017

Owner

Fixed in #486, release will follow shortly.

Owner

squidfunk commented Oct 11, 2017

Fixed in #486, release will follow shortly.

@AndreWin

This comment has been minimized.

Show comment
Hide comment
@AndreWin

AndreWin Oct 11, 2017

Thank you very much!
Will this update avaliable via pip?

AndreWin commented Oct 11, 2017

Thank you very much!
Will this update avaliable via pip?

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Oct 11, 2017

Owner

Yes, 1.10.3 is just being released, give it a few minutes.

Owner

squidfunk commented Oct 11, 2017

Yes, 1.10.3 is just being released, give it a few minutes.

@AndreWin

This comment has been minimized.

Show comment
Hide comment
@AndreWin

AndreWin Oct 11, 2017

Thanks you very much! ^_^

AndreWin commented Oct 11, 2017

Thanks you very much! ^_^

@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Oct 11, 2017

Owner

1.10.3 was released. I increased the padding, that solves it for this formula. I hope that it was some margin/padding issue. If you encounter the error again with another formula, please open a new issue.

Owner

squidfunk commented Oct 11, 2017

1.10.3 was released. I increased the padding, that solves it for this formula. I hope that it was some margin/padding issue. If you encounter the error again with another formula, please open a new issue.

@AndreWin

This comment has been minimized.

Show comment
Hide comment
@AndreWin

AndreWin commented Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment