Skip to content

markdown / mathjax - right bracket of big matrices moved to new line #764

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

Open
RafalSkolasinski opened this issue Nov 27, 2015 · 4 comments
Milestone

Comments

@RafalSkolasinski
Copy link

If one have a big matrix that doesn't fit on a screen sometimes it works nice and one just need to scroll right to see whole of it.

In some cases however, especially on small, laptop screen, right bracket is split and moved to the next line which looks pretty ugly.

Example would be following put into markdown

\begin{pmatrix}- B \left(k_{x}^{2} + k_{y}^{2}\right) + C - D \left(k_{x}^{2} + k_{y}^{2}\right) + M & A \left(k_{x} + i k_{y}\right) & 0 & 0\\A \left(k_{x} - i k_{y}\right) & B \left(k_{x}^{2} + k_{y}^{2}\right) + C - D \left(k_{x}^{2} + k_{y}^{2}\right) - M & 0 & 0\\0 & 0 & - B \left(k_{x}^{2} + k_{y}^{2}\right) + C - D \left(k_{x}^{2} + k_{y}^{2}\right) + M & A \left(- k_{x} + i k_{y}\right)\\0 & 0 & - A \left(k_{x} + i k_{y}\right) & B \left(k_{x}^{2} + k_{y}^{2}\right) + C - D \left(k_{x}^{2} + k_{y}^{2}\right) - M\end{pmatrix}

It usually happens to me with big sympy matrices (see bellow) but fact that I reproduced it in markdown indicates that it is not sympy issue.

Checked on today jupyter/notebook master with Chrome and Firefox.

screenshot from 2015-11-27 13 14 28

@minrk minrk added this to the 5.0 milestone Dec 16, 2015
@minrk
Copy link
Member

minrk commented Dec 16, 2015

What's a little weird is that this only happens on output, but the same latex in a markdown cell doesn't trigger the wrap.

MathJax puts its content in a nobr, which I assume is meant to prevent this, but that's not getting respected somehow.

@RafalSkolasinski
Copy link
Author

RafalSkolasinski commented Dec 16, 2015

It is also weird that bug appears randomly. It depends for example on the
width of browser window.

@minrk
Copy link
Member

minrk commented Dec 16, 2015

There is a very good chance that this is a browser bug, not respecting its own no-reflow logic. There are many CSS bugs relating to non-integer sizes, where one calculation rounds up, another rounds down, and you end up with scrollbars/etc where they shouldn't be.

@RafalSkolasinski
Copy link
Author

Seems to still exists on Firefox: 50.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants