Skip to content

Superscript text doesn't get the superscript attribute #1606

Description

@peerDE

I have text with runs containing superscript characters. One of the corresponding xml elements looks like this:

<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wpc="http://schemas.microsoft.com/office/word/20
10/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:offic
e" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006
/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http:
//schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.
microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.
microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.mi
crosoft.com/office/word/2010/wordprocessingShape" w:rsidRPr="00F80467">
  <w:rPr>
    <w:rFonts w:asciiTheme="majorHAnsi" w:hAnsiTheme="majorHAnsi" w:cstheme="majorHAnsi"/>
    <w:sz w:val="24"/>
    <w:szCs w:val="24"/>
    <w:vertAlign w:val="superscript"/>
  </w:rPr>
  <w:t>9</w:t>
</w:r>

but the expression

run.style.font.superscript

for that run, using Release 1.1.0+dfsg-2 of Ubuntu 24.04.4 LTS, does not yield True, which it should.

So this a bug, or maybe a missing attribute of the "Run" object, e.g. "run.superscript" which doesn't exist, like "run.italic" or "run.bold" which do exist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions