# Kramdown-parser-gfm SuperScript and Subscript support

**URL:** <https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087>\
**Category:** Help\
**Created:** [April 11, 2024, 5:06pm UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087 "2024-04-11T17:06:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_shivamp](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@t\_shivamp](https://talk.jekyllrb.com/u/t_shivamp)\
**Post date:** [April 11, 2024, 5:06pm UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/1 "2024-04-11T17:06:38Z")

</div>

Hi  
I am using kramdown-parser-gfm to convert my markdowns to html, but when i try to add a superScript using the markdown format `This is a superscript^2` it doesn’t comeout as expected.  
how shall I handle this in my project any suggestions?

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [April 11, 2024, 9:19pm UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/2 "2024-04-11T21:19:57Z")

</div>

what do you mean by it doesn’t come out as expected? can you show us what you get? link to where to see it on the web?

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [April 12, 2024, 5:06am UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/3 "2024-04-12T05:06:48Z")

</div>

Have you tried `superscript^2^` ?

---

<div class="post-metadata">

**Author:** ![t\_shivamp](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@t\_shivamp](https://talk.jekyllrb.com/u/t_shivamp)\
**Post date:** [April 12, 2024, 5:22am UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/4 "2024-04-12T05:22:30Z")

</div>

Yes i did try superscript^2^ it doesn’t work.

---

<div class="post-metadata">

**Author:** ![t\_shivamp](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@t\_shivamp](https://talk.jekyllrb.com/u/t_shivamp)\
**Post date:** [April 12, 2024, 5:28am UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/5 "2024-04-12T05:28:29Z")

</div>

By that i mean its getting rendered in html as

This is a superscript^2

 instead of 

This is a superscript2

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [April 12, 2024, 3:33pm UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/6 "2024-04-12T15:33:06Z")

</div>

is it within an html block? or all markdown?

> [@t\_shivamp](#):
>
> kramdown-parser-gfm

are you sure this supports superscript? I don’t see it on the spec:

[https://github.github.com/gfm/](https://github.github.com/gfm/)

---

<div class="post-metadata">

**Author:** ![wongyah](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/wongyah/32/5895_2.png) [@wongyah](https://talk.jekyllrb.com/u/wongyah)\
**Post date:** [April 25, 2024, 3:36am UTC](https://talk.jekyllrb.com/t/kramdown-parser-gfm-superscript-and-subscript-support/9087/7 "2024-04-25T03:36:37Z")

</div>

I don’t think kramdown support superscript and subscript, unless you use html tags.

```auto
This is superscript<sup>2</sup>.

This is subscript<sub>2</sub>.

```
