Page MenuHomePhabricator

Consider multi line formula editing with Math inspector
Open, LowPublic

Description

While inserting some mathematical formulas, I see that although in the math inspector it is possible to put math elements on separate numbered lines but on the actual page it gets displayed on the same line. To add multi line formula user needs to open the math editor again for next line and add another formula. I believe it will be easier for the user to insert multi line formulas if this issue is addressed.

suggestion.JPG (639×905 px, 52 KB)

Event Timeline

Hi. Thanks for the report.

The Math inspector in VisualEditor helps write LaTeX syntax. This syntax has some quirks to it that may be counter-intuitive at times. It doesn't support literal line breaks. Instead, line breaks are used to make the formula easier to read while editing.

The syntax for line breaks in LaTeX is \\ (although it is only valid inside an array or matrix).

It'd be nice if we can add line breaks to the Math inspector's character panel.

\begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array}

Screen Shot 2016-08-02 at 23.00.32.png (297×886 px, 27 KB)

\begin{matrix}
z = a \\
f(x,y,z) = x + y + z
\end{matrix}

Screen Shot 2016-08-02 at 23.07.19.png (250×523 px, 24 KB)

See also:
https://en.wikibooks.org/wiki/LaTeX/Mathematics#Matrices_and_arrays
http://latex.wikia.com/wiki/Array_(LaTeX_environment)

There is a "Large layouts" section at the bottom which gives some examples which might be helpful. I'm not sure it would make sense to have a newline button, as it only makes sense when building an array. Ideally we would have a more WYSIWIG editor at some point but that is a separate (and much larger) task.

Thank you for addressing the concern. I did go back to math inspector and check out the large layouts section and I agree it does resolve several instances involving arrays.
I was wondering about a situation where user needs to add a derivation or mathematical identity. An example of this could be the following article:

https://en.wikipedia.org/wiki/Proofs_of_trigonometric_identities#Ratio_identities

It seems in this section of the article the user had to open math inspector several times to add the derivation. So I thought of bringing this up for future improvement.

Jdforrester-WMF added a project: Math.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.