I'm working on a website to solve some kind of exercises that has a programming function appearance, so I need to write multiple lines, but I dont know how to make it, as it displays everything in a single like, maybe some CSS would make it? Any help would be so apreciated, thanks in advance :)
To create such a linebreak, all you need is the following.
<mspace linebreak='newline' />
If you would rather provide hints to the rendering engine and let it break lines on its own, you can use the following values for the linebreak attribute:
Value Description nobreak Forbid a line break at this location. badbreak Try to prevent a line break at this location. goodbreak Suggest a line break at this location.
Since linebreaks often occur at operators, MathML lets you use all of these attributes on the <mo>
element, too. But, since you’re now breaking on a visible symbol, you’ll need the linebreakstyle attribute to specify whether the newline should be before the operator, after the operator, or if the operator should be duplicated and appear on both lines. Valid values are (respectively): before, after, and duplicate.
So, instead of using an <mspace/>
as in the previous example, you could specify it directly on the last operator in the line:
<mo linebreak='newline' linebreakstyle='after'>+</mo>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With