cases:
  - title: Subscript
    mdast:
      type: root
      children:
        - type: paragraph
          children:
            - type: text
              value: H
            - type: mystRole
              name: sub
              value: '2'
              children:
                - type: subscript
                  children:
                    - type: text
                      value: '2'
            - type: text
              value: O
    myst: |-
      H{sub}`2`O
    html: |-
      <p>H<sub>2</sub>O</p>
    latex: |-
      H\textsubscript{2}O

  - title: Subscript spelled out
    id: subscript
    mdast:
      type: root
      children:
        - type: paragraph
          children:
            - type: text
              value: H
            - type: mystRole
              name: subscript
              value: '2'
              children:
                - type: subscript
                  children:
                    - type: text
                      value: '2'
            - type: text
              value: O
    myst: |-
      H{subscript}`2`O
    html: |-
      <p>H<sub>2</sub>O</p>
    latex: |-
      H\textsubscript{2}O

  - title: Superscript
    mdast:
      type: root
      children:
        - type: paragraph
          children:
            - type: text
              value: '4'
            - type: mystRole
              name: sup
              value: th
              children:
                - type: superscript
                  children:
                    - type: text
                      value: 'th'
            - type: text
              value: ' of July'
    myst: |-
      4{sup}`th` of July
    html: |-
      <p>4<sup>th</sup> of July</p>

  - title: Superscript spelled out
    id: superscript
    mdast:
      type: root
      children:
        - type: paragraph
          children:
            - type: text
              value: '4'
            - type: mystRole
              name: superscript
              value: th
              children:
                - type: superscript
                  children:
                    - type: text
                      value: 'th'
            - type: text
              value: ' of July'
    myst: |-
      4{superscript}`th` of July
    html: |-
      <p>4<sup>th</sup> of July</p>
