jupyter / jupyter/notebook

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

Open
#764 4 comments 0 reactions 0 assignees View on GitHub
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.

![screenshot from 2015-11-27 13 14 28](https://cloud.githubusercontent.com/assets/10928117/11441488/d203a858-950c-11e5-9282-08b079cd727b.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.