teamshortcut / Discord-Maths-Bot

Uses the Kings Maths School Seven Day Maths Weekly Challenge and their archive of problems for a Python Discord bot.
MIT License
0 stars 5 forks source link

Subscripts/Superscripts not displaying correctly #1

Closed teamshortcut closed 6 years ago

teamshortcut commented 6 years ago

For example, x squared would simply be displayed as x2 Unicode superscript characters: ⁰¹²³⁴⁵⁶⁷⁸⁹ Unicode subscript characters: ₀₁₂₃₄₅₆₇₈₉

https://en.wikipedia.org/wiki/Superscripts_and_Subscripts https://www.fileformat.info/info/unicode/block/superscripts_and_subscripts/list.htm

(harder) could check to see if subscript/superscript character exists in Unicode, rather than manually checking for certain ones. This would allow characters like +⁺₊ to be added without manually filtering, useful for recursive relations or indices problems. Kings Maths School website seems to use <sup> and <sub> currently.

teamshortcut commented 6 years ago

Could be fun to create a sub/superscript library?

teamshortcut commented 6 years ago

HTML to Markdown would fix many of the current issues. These could be useful: https://github.com/kennethreitz/pyandoc https://github.com/Alir3z4/html2text https://github.com/gaojiuli/tomd

teamshortcut commented 6 years ago

https://github.com/teamshortcut/Discord-Maths-Bot/issues/10