markdown / mathjax - right bracket of big matrices moved to new line
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
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.

Contributor guide
Research direction
Reproduce the issue in a Jupyter Notebook markdown cell using the provided matrix on a narrow screen, checking the behavior in Chrome or Firefox. Trace the notebook's Markdown and MathJax rendering path; done means the matrix remains horizontally scrollable and its right bracket is not moved onto a separate line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, markdown
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100