[Solved] Closing parenthesis problem

Discuss the formula editor
Post Reply
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

[Solved] Closing parenthesis problem

Post by r4zoli »

I try to convert a document from docx. to odt with Math objects.
I found one problem which I can't resolve.

Code: Select all

\( r + r_+a\)
works correctly, but I needs + indstead a.
If I use

Code: Select all

\( r + r_+ \)
the closing parenthesis is after a + sign in lower position, not a correct.

Any suggestion?
Attachments
correct.JPG
correct.JPG (1.25 KiB) Viewed 8063 times
rplus.JPG
rplus.JPG (8.3 KiB) Viewed 8063 times
Last edited by r4zoli on Fri Nov 16, 2012 1:54 pm, edited 1 time in total.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
RoryOF
Moderator
Posts: 35103
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Closing parenthesis problem

Post by RoryOF »

I've never used Math before, but \( r + r_a \) gives me your correct result. You may need to Escape your + if the + (or -) sign is important. Hope that helps.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Closing parenthesis problem

Post by r4zoli »

I'm editing a nonprofit magazine, and get an article with lot of math equations, I can not avoid this +.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
floris v
Volunteer
Posts: 4581
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Closing parenthesis problem

Post by floris v »

This bad code seems to work: \( r + r_+ }\), sort of. Definitely a bug.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
keme
Volunteer
Posts: 3784
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Closing parenthesis problem

Post by keme »

This good code works too.

Code: Select all

\( r + r_"+"\)
Remember that + is an operator, so it's not really surprising that leaving it in a limbo (with parentheses etc as "halfway operands") yields strange results.

That "good code" is not much help if you still have to edit a large number of formulas manually. Sorry that I can't help more.
Too bad Find/replace does not work in Math, and neither in embedded objects. You may need to delve into the nitty gritty of ODF to devise an automated solution.
Last edited by keme on Fri Nov 16, 2012 12:24 pm, edited 1 time in total.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
User avatar
floris v
Volunteer
Posts: 4581
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Closing parenthesis problem

Post by floris v »

Of course, so stupid of me not to think of that. :lol:
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Closing parenthesis problem

Post by r4zoli »

Thanks, it works.
I tried lot other tricks not this one. :crazy:
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: [Solved] Closing parenthesis problem

Post by RGB »

Note, you do not need the backslash for the brackets:

Code: Select all

(r + r_{"+"} )
will work too.

Code: Select all

left(r + r_{"+"} right)
will work better and

Code: Select all

left(r + r_{{}+{}} right)
even better ;)
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: [Solved] Closing parenthesis problem

Post by r4zoli »

My further observations:
I get the .docx file with integrals with lower and upper limits, and this r + r_+ math objects, saved as OpenDocument in MS Word 2007 SP3, and the saved the saved math objects scrambled when I opened in AOO 3.4.1
The r +r_+ corrected as suggested by you.
These all problems in MSO needs to be corrected in AOO, I changed it manually, because the document contained only 25 equations.
The integral example:

Code: Select all

 int_t_0^t_2 {Q  \(  t  \)  d t}
created in MSO and it works when I transformed to

Code: Select all

 int csub {t_"0"} csup {t_"2"} Q( t)  d t
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Post Reply