Page 1 of 1

[Solved] Closing parenthesis problem

Posted: Fri Nov 16, 2012 11:12 am
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?

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 11:21 am
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.

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 11:29 am
by r4zoli
I'm editing a nonprofit magazine, and get an article with lot of math equations, I can not avoid this +.

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 11:55 am
by floris v
This bad code seems to work: \( r + r_+ }\), sort of. Definitely a bug.

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 12:20 pm
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.

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 12:22 pm
by floris v
Of course, so stupid of me not to think of that. :lol:

Re: Closing parenthesis problem

Posted: Fri Nov 16, 2012 1:54 pm
by r4zoli
Thanks, it works.
I tried lot other tricks not this one. :crazy:

Re: [Solved] Closing parenthesis problem

Posted: Sat Nov 17, 2012 1:52 am
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 ;)

Re: [Solved] Closing parenthesis problem

Posted: Sat Nov 17, 2012 1:55 pm
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