Bug 55086

Summary: it is impossible to typeset an overlapping overbrace and underbrace pair
Product: LibreOffice Reporter: Andras Timar <timar74>
Component: Formula EditorAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: xiscofauli
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 39750    
Attachments: scanned image of the formula
Screenshot showing formula and rendering in v4.1.3.2.

Description Andras Timar 2012-09-19 09:35:51 UTC
Created attachment 67370 [details]
scanned image of the formula

It is impossible to typeset the attached formula in Math, while it is possible in LaTeX:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\[
  \rlap{$\overbrace{\phantom{a+b}}^x$}a
     +\underbrace{b+c}_y
\]
\end{document}

The formatting command like \rlap is missing from Math.
Comment 1 Owen Genat (retired) 2013-11-13 03:28:28 UTC
Created attachment 89113 [details]
Screenshot showing formula and rendering in v4.1.3.2.

I am confirming this bug. Status set to NEW. There remains no elegant way to typeset the indicate formula in Math. Attached is a screenshot (taken under Crunchbang 11 linux running v4.1.3.2) showing an inelegant workaround, but the line spacing remains too great. Formula in the screenshot:

stack { 
alignl { { phantom { a "+" b } } overbrace x } #
a "+" b "+" c # 
alignr { { phantom { b "+" c } } underbrace y } 
}
Comment 2 Owen Genat (retired) 2014-03-15 23:03:14 UTC
Summary edited for clarity.
Comment 3 dante19031999 2020-06-28 12:04:54 UTC
You're right, but I'm not sure it can be implemented with the starmath actual system.
Comment 4 dante19031999 2020-07-04 04:44:17 UTC
I've been making further research on the matter.
The nodes system may support it, but not the parser.
Maybe it can be done. I'll try to do it, but gonna take at least one month.
Comment 5 Xisco Faulí 2021-02-09 13:18:06 UTC
Removing Assignee. No action done in a while
Comment 6 dante19031999 2021-02-09 15:56:45 UTC
(In reply to Xisco Faulí from comment #5)
> Removing Assignee. No action done in a while

This bug is impossible.
It is easy to introduce code for it in parser.
But I can't find any way to make it compatible with mathml.
Comment 7 Andras Timar 2023-01-08 11:34:23 UTC
<math display="block">
  <mrow>
    <mpadded width="0px">
      <mrow>
        <mover>
          <mover>
            <mphantom>
              <mi>a</mi>
              <mo>+</mo>
              <mi>b</mi>
            </mphantom>
            <mo stretchy="true" style="math-depth:0;">⏞</mo>
          </mover>
          <mi>x</mi>
        </mover>
      </mrow>
    </mpadded>
    <mi>a</mi>
    <mo>+</mo>
    <mrow>
      <munder>
        <munder>
          <mrow>
            <mi>b</mi>
            <mo>+</mo>
            <mi>c</mi>
          </mrow>
          <mo stretchy="true" style="math-depth:0;">⏟</mo>
        </munder>
        <mi>y</mi>
      </munder>
    </mrow>
  </mrow>
</math>