r-lib / marquee

Markdown Parser and Renderer for R Graphics
https://marquee.r-lib.org
Other
85 stars 1 forks source link

Support superscript and subscript #37

Closed holnburger closed 2 months ago

holnburger commented 2 months ago

Superscript and subscript are not part of commonscript as far as I know (https://spec.commonmark.org/0.31.2/) but it's supported in ggtext element_markdown via ^superscript^ or <sup></sup>. Sadly that's not the case for marquee. It would be great if marquee also supports superscript and subscript. In the meantime I used UTF-8 variants of superscript numbers (https://www.compart.com/de/unicode/U+00B3)

thomasp85 commented 2 months ago

There are already classes for it in the main style - just use {.sub ...} or {.sup ...}

holnburger commented 2 months ago

Ah, great! Thank you!