ray-pH / Nabla-TypeMath-android

Nabla TypeMath is an android application that allow you to easily type mathematical symbols.
https://photon-ray.xyz/nabla/
GNU General Public License v3.0
39 stars 3 forks source link

Improvement idea for \frac #6

Closed alexandru-duca closed 11 months ago

alexandru-duca commented 11 months ago
Input Output [v1.3.2] Suggested Output
.\frac{1}{2}. [¹]⁄[₂] ½
ray-pH commented 11 months ago

You've found a bug. It should be 1⁄2 without the square brackets. Thanks, will try to fix it asap

ray-pH commented 11 months ago

I choose the fraction slash unicode (U+2044) [⁄] because it's more general, and you don't have to handle each particular fraction that exists in Unicode (¼ ½ ¾ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟ ↉).

And also, 1 + ⁄ + 2 = 1⁄2 (three separate characters) will render exactly the same as ½ (U+00BD) for many systems.

alexandru-duca commented 11 months ago

Thanks for elaborating. On my phone, 1⁄2 (which looks more like ¹⁄₂) and ½ render differently (the latter looking neater). I suggest outputting a Unicode-fraction if one exists and three seperate characters if one doesn't exist. I also suggest removing the brackets if the nominator (or denominator) consists of only one symbol.

Input Output [v1.3.2] Suggested Output
.\frac{1}{2}. [¹]⁄[₂] ½
.\frac{1}{9}. [¹]⁄[₉] 1⁄9
ray-pH commented 11 months ago

Sorry for taking a while, I've only recently had the time to address the issue. The problem is now fixed in v1.3.3