Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superscript in combined subscript and superscript goes missing in "Copy as MathML" #1945

Closed
robert-dodier opened this issue Aug 29, 2024 · 2 comments

Comments

@robert-dodier
Copy link
Collaborator

Working with wxMaxima 24.08.0 + Linux.

When I copy the display form of an expression such as x[k]^n as MathML (i.e., via menu item "Copy as MathML" on right click after highlighting the expression), the subscript is shown in the copied expression, but the superscript is missing. For x[k]^n, I get:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <msubsup>
      <mo>x</mo>
      <mo>k</mo>
    </msubsup>
  </semantics>v
</math>

Note that msubsup is the output; that's correct, but it's missing its third argument, which is supposed to be the superscript. See: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/msubsup

Note that x[k] and x^n are both correctly represented in MathML output, as

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <msub>
      <mo>x</mo>
      <mo>k</mo>
    </msub>
  </semantics>
</math>

and

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <msup>
      <mo>x</mo>
      <mo>n</mo>
    </msup>
  </semantics>
</math>

respectively.

For an example of this bug in an actual document, see #1942.

@robert-dodier
Copy link
Collaborator Author

Also, superscript in combined superscript and subscript goes missing when I select "Copy" (first item on right click menu) and then paste into MS Word. The pasted item becomes an equation and the superscript is replaced by a small empty square.

@daute daute closed this as completed in 9a5a0cb Sep 19, 2024
@daute
Copy link
Member

daute commented Sep 19, 2024

I fixed the 'Copy as MathML' issue now (and closed the issue). Concerning the simple "Copy" - then I have
x[k]^n in the clipboard - that should be correct? What else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants