[Solved] Newline and brackets

Discuss the formula editor
Post Reply
McLP
Posts: 2
Joined: Sun Nov 12, 2017 2:14 pm

[Solved] Newline and brackets

Post 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 10914 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!
Last edited by McLP on Tue Dec 05, 2017 2:56 pm, edited 1 time in total.
Apache OpenOffice 4.1.3 AOO413m1(Build:9783) - Rev. 1761381 2016-09-29 02:39:19 on Windows 10 Pro Ver.1703 Build 15063.674
User avatar
Zizi64
Volunteer
Posts: 11426
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Newline and brackets

Post 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
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
keme
Volunteer
Posts: 3739
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Newline and brackets

Post 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 )
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
McLP
Posts: 2
Joined: Sun Nov 12, 2017 2:14 pm

Re: Newline and brackets

Post 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.
.
Apache OpenOffice 4.1.3 AOO413m1(Build:9783) - Rev. 1761381 2016-09-29 02:39:19 on Windows 10 Pro Ver.1703 Build 15063.674
Post Reply