Bracket highlighting in Math / Writer Equation editor

I’d like to use writer to write my papers for school, but there’s lot of stuff going on (5+ levels of brackets), and bracket highlighting would really help me with orienting in the equation. Is that something Writer can do?

Also, can it LO be set up so that the equations are saved exactly as they were written? It has a nasty habit of deleting {} (breaking formulas in process), adding {} and spaces where not needed (like it saves “{e} ^ {x}” instead of “e^x”), and completely removing all line breaks that make the formulas look at least somewhat sane.

Thanks for linking my previous question about this, but you could have saved the work, since there are no answers in there whatsoever.

Did you probably not attach a file (.odt) containing examples for what you are talking of also to the first instance of the question? This may make repetitions obsolete. The question is something where contributors will very probably have to think of examples, but may not be fond of wasting their time creating them. Hopefully your pupils/students are less discerning.

I now see. You surely are a good teacher.
Since some more contributors here may also tend to my kind of “passive aggressivity” (whatever that should be), and even get their upvotings this way (What silly users do so?) you may be better off looking for a different place to post your questions.
Don’t wait for active aggressivity.

@dolezvo1, behave yourself! Being obscene to other contributors will not help you either.

Also, don’t confuse users by asking the same question again. You can always edit your questions to improve it. It has also the benefit to refresh it and push at top of “active” questions.


That said, your question is not crystal-clear. We don’t grasp your purpose. Do you want some “editing clue” while you are typing your equation (seeing which bracket is the current one like some text editors do, highlighting both brackets in a pair, so that you can see if you’re closing the correct nesting level)? Do you want to make visible the matching brackets for your student’s benefit? Some other goal?

Regarding “{} bracket deletion”, it would be interesting to know how you type your equations: fully manual or with the built-in semi-wizard inserting operators with placeholders?

Line breaks: formulas are described with a macro-like description language. Many objects have a descriptive name which will be replaced by a symbol. Therefore, the formula is rather verbose while its representation is concise. Linebreaks in the formula are a convenience for the user in order to avoid very long single-line formula. The formula “programming” may be better readable on several lines.

If you want to keep linebreaks or insert explicit linebreaks, there are several ways depending on context (matrix or non-matrix). Outside matrices, use the “operator” newline.

Math is a complex application (which, incidentally, has not been updated to a more modern design for ages). I highly recommend to read the Math Guide.

Also, don’t confuse users by asking the same question again. You can always edit your questions to improve it. It has also the benefit to refresh it and push at top of “active” questions.

I see, I didn’t know that. I just thought I posted it with wrong tags the first time.

That said, your question is not crystal-clear. We don’t grasp your purpose. Do you want some “editing clue” while you are typing your equation (seeing which bracket is the current one like some text editors do, highlighting both brackets in a pair, so that you can see if you’re closing the correct nesting level)? Do you want to make visible the matching brackets for your student’s benefit? Some other goal?

It’s the first option. Exactly as you say, I would like to be sure on which level I am.

Regarding “{} bracket deletion”, it would be interesting to know how you type your equations: fully manual or with the built-in semi-wizard inserting operators with placeholders?

I type them into the box that pops up when you click an equation.

If you want to keep linebreaks or insert explicit linebreaks, there are several ways depending on context (matrix or non-matrix). Outside matrices, use the “operator” newline .

I think I probably haven’t explained this enough either: What bugs me is that after I save and reload, the whole “code” of the equation is one solid block of mess, even though it had nice line breaks splitting it to make it nicely readable before quitting.

It’s the first option.

Unfortunately, there is no 100% reliable method because of quantum physics where you can have non-matching brackets to delimit bras and kets. You can also play layout tricks where you put a single bracket on a side of an equation (or group an equation) to tell they should be considered as a whole. In this case, the bracket has no “mathematical” function, just a “geometric” or layout role.

I think the closest you can do is to enter your equation “hierarchically” using the bracket toolset: you click on the desired category (inserting the brackets with a placeholder). You navigate to the target placeholder with F4 or Shift+F4 and insert another “object” here.

{} deletion

{ is a special (reserved) delimiter in the formula description language, usually introducing parameters to a function. If you want such a bracket either escape it as \{ (but it won’t adjust to equation size) or use the operator lbrace (but you need a matching right bracket otherwise an error will be noted)

even though it had nice line breaks

Math keeps an internal “compiled” form of your equation removing all “redundant” information (multiple spaces, new lines, …). When you edit your formula, the internal form is “decompiled” and presented to you. Because of redundancy removal, all your pretty-print formatting is lost. Shame, yes. Feel free to modify the source code if you have the capacity and the time to do it.


One last word: we are all benevolent users, not at all affiliated with The Document Information. Being rude is the best way to be ignored and not find answers to questions.

Unfortunately, there is no 100% reliable method because of quantum physics where you can have non-matching brackets to delimit bras and kets.

I see, that’s shame

{} deletion

Actually it turns out this only happened because I was saving into .docx, silly me. No such issue using .odt.

Feel free to modify the source code if you have the capacity and the time to do it.

Is there some consensus about whether this “redundancy removal” is actually a bad thing? I would be really disappointed if I were to find out there is a reason why it has to be there and removing it is not an option.

Redundancy removal: I think (very personal opinion) that it is related to the lack of development in Math. The application is light-years behind the others is ergonomics, styling (I mean paragraph/character styles like in Writer), ease of use and even integration to the suite. It is considered by many as a secondary, if not tertiary, component and has not seen any significant contribution for years. So, the formula description is stored without any extra “hints” (you could consider formatting information is some kind of “comment” added to the formula).

A word of warning: any addition to the way data is stored in a file must maintain compatibility with ODF format.

PS: I suggest you apologize to @Lupp. He’s a very knowledgeable and valuable contributor (remembering that most us, I first, are not English-native).

1 Like

I think (very personal opinion) that it is related to the lack of development in Math.

A word of warning: any addition to the way data is stored in a file must maintain compatibility with ODF format.

I see, that’s all good to know.

PS: I suggest you apologize to @Lupp.

I don’t want to upset you because you were nice and helpful, but I think I’ll save it for later. I don’t blame him for not being able to or not wanting to help after I said what I said, but I do think having comments such as his is not a good look.