[Solved] Newline and brackets

Discuss the formula editor

[Solved] Newline and brackets

Postby McLP » Sun Nov 12, 2017 2:27 pm

I want to make a formula like
Code: Select all   Expand viewCollapse view
alignl ( (a and b or c) and newline alignl a or (c and d) )
, but it creates weird output.
output.png
the output created by the example code
output.png (1.52 KiB) Viewed 363 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
McLP
 
Posts: 2
Joined: Sun Nov 12, 2017 2:14 pm

Re: Newline and brackets

Postby Zizi64 » Sun Nov 12, 2017 3:10 pm

Try this:

Code: Select all   Expand viewCollapse view
alignl { (a and b or c) and {} } newline  alignl { {} a or (c and d) }


{} : invisible empty operand

{ .... } : invisible grouping sign
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.3 and AOO4.1.4
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6083
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Newline and brackets

Postby keme » Tue Nov 21, 2017 2:10 am

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   Expand viewCollapse view
alignl left ( (a and b or c) and {} right none newline left none alignl a or (c and d) right )
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 2663
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Newline and brackets

Postby McLP » Tue Dec 05, 2017 12:00 pm

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
McLP
 
Posts: 2
Joined: Sun Nov 12, 2017 2:14 pm


Return to Math

Who is online

Users browsing this forum: No registered users and 2 guests