Skip to content

Determining when line breaks should occur on small screens in 4.0.0 with firefox. #3470

@somiaj

Description

@somiaj

In testing if some of my formulas are more responsive using the line break feature of 4.0.0, I have determined that sometimes line breaks occur on smaller screens and other times they don't. I haven't figured out the logic here and if it is something that I can improve or configure.

I have an equal chain that doesn't line break on smaller screens.

\(A\vec{\bf x} =
 \begin{bmatrix} 2 & 2 \\ -1 & 3\end{bmatrix}
 \begin{bmatrix} 2 \\ 3\end{bmatrix}
 = \begin{bmatrix} (2)(2) + (2)(3) \\ (-1)(2) + (3)(3) \end{bmatrix}
 = \begin{bmatrix} 10 \\ 7 \end{bmatrix}\)

But if I add another matrix to the equal chain it does line break.

\(A\vec{\bf x} =
 \begin{bmatrix} 2 & 2 \\ -1 & 3\end{bmatrix}
 \begin{bmatrix} 2 \\ 3\end{bmatrix}
 = \begin{bmatrix} (2)(2) + (2)(3) \\ (-1)(2) + (3)(3) \end{bmatrix}
 = \begin{bmatrix} 4 + 6 \\ -2 + 9 \end{bmatrix}
 = \begin{bmatrix} 10 \\ 7 \end{bmatrix}\)

Here is a screenshot, the first equal chain the last matrix is pushed off the edge of the screen, while the second causes a line break.

Image

In trying to determine what causes the line breaks, it seems to be the number of matrices,
and not their sizes. For example if I make the last matrix bigger in the first example by writing
the numbers as a sum of 1's:

\(A\vec{\bf x} =
 \begin{bmatrix} 2 & 2 \\ -1 & 3\end{bmatrix}
 \begin{bmatrix} 2 \\ 3\end{bmatrix}
 = \begin{bmatrix} (2)(2) + (2)(3) \\ (-1)(2) + (3)(3) \end{bmatrix}
 = \begin{bmatrix} 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1\\ 1 + 1 + 1 + 1 + 1 + 1 + 1 \end{bmatrix}\)

No line break occurs just like the first example, even though this statement is now longer than
the second example which has a line break in it.

I did notice there have been various issues and some fixes with line breaks in 4.0.0, but I could not determine if this was addressed (this particular issue didn't seem to be included in the other issue and fixes I saw, and I didn't have time to test if this was fixed by building the most recent mathjax from source).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Browser BugCode ExampleContains an illustrative code example, solution, or work-around

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions