CarpeQueso / craindown

A markdown-like language with a simple, unambiguous spec.
0 stars 0 forks source link

Subscripts and Superscripts #7

Open CarpeQueso opened 3 years ago

CarpeQueso commented 3 years ago

Should subscripts and superscripts be a fundamental part of the language?

If so, superscript styling is a bit easier than subscript. We aren't yet using the ^ character for anything, so we could make a toggle that's similar to other text formatting keywords.

One potential styling idea:

2^n if the superscript has no whitespace.

If the superscript has whitespace, surround it^^with carets^^.

Subscript is more tricky. We're already using ~ and _ which would both be natural candidates for indicating subscript. _ is the latex math subscript symbol and ~ is used in R Markdown. It could be something more unusual, such as . or ,, or we could shift other symbols around a bit.