Page 1 of 1

[Solved] Newline and brackets

Posted: Sun Nov 12, 2017 2:27 pm
by McLP
I want to make a formula like

Code: Select all

alignl ( (a and b or c) and newline alignl a or (c and d) )
, but it creates weird output.
the output created by the example code
the output created by the example code
output.png (1.52 KiB) Viewed 10913 times
I have a very long fomula that without using newline would not fit on the page. But the newline seems to confuse the brackets and operands. I tried with none and other tips from the forum, but they did not work with logical operands.

I need fast help, thank you!

Re: Newline and brackets

Posted: Sun Nov 12, 2017 3:10 pm
by Zizi64
Try this:

Code: Select all

alignl { (a and b or c) and {} } newline  alignl { {} a or (c and d) }
{} : invisible empty operand

{ .... } : invisible grouping sign

Re: Newline and brackets

Posted: Tue Nov 21, 2017 2:10 am
by keme
You can't have grouping across newline. This is an annoying limitation of the Math component.

A workaround is to insert invisible group close at the end of the line, then invisibly start a new parenthesis group on the new line.
To use different tokens for group initiate and terminate, you need to use the "left" and "right" keywords.

Code: Select all

alignl left ( (a and b or c) and {} right none newline left none alignl a or (c and d) right )

Re: Newline and brackets

Posted: Tue Dec 05, 2017 12:00 pm
by McLP
Thank you all for your help, I now switched to using LaTeX. But I can say that keme's workaround would work in OO too.
.