diff --git a/typeset_test.go b/typeset_test.go index 0408779..7d4a65f 100644 --- a/typeset_test.go +++ b/typeset_test.go @@ -158,6 +158,8 @@ func TestTextualScripts(t *testing.T) { {`e^{-\frac{x^2}{2}}`, "e^{-x²/2}"}, {`\lim_{n\to\infty} a_n`, "lim_{n→∞} aₙ"}, {`\sum_{p \text{ prime}} p`, "∑_{p prime} p"}, + {`15^\circ`, "15°"}, + {`15^{\degree}`, "15°"}, } for _, c := range cases { if got := render(t, c.in, inline); got != c.want { diff --git a/unicode.go b/unicode.go index 02787f4..4b52ca3 100644 --- a/unicode.go +++ b/unicode.go @@ -24,6 +24,8 @@ var superscriptMap = map[rune]rune{ 'α': 'ᵅ', 'β': 'ᵝ', 'γ': 'ᵞ', 'δ': 'ᵟ', 'θ': 'ᶿ', 'φ': 'ᵠ', 'χ': 'ᵡ', // special + '∘': '°', // e.g. 15^\circ -> degree sign + '°': '°', // degree is already a superscript glyph '′': '′', // prime is already a superscript glyph }