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

overline not working with multiple characters (even in Latex Mode) #9

Closed Rom1-GoPlay closed 10 months ago

Rom1-GoPlay commented 10 months ago

Hi ! I Love Nabla, this app is really useful !! But I am facing a problem: I would like to display something like: Snapdrop_15 oct. 2023 11_57_22_.png

But I am not able. Without latex mode the bar cover only the last character (I get: z + z'̅ ).

With latex mode I try to type: \overline{z + z'} (between initial string and end string) and I get: \overline{z + z'} (the same without initial and end strings)

Notice that with a single characters I get the expected result: z̅ with \overline{z}

ray-pH commented 10 months ago

I don't think you can do that. It's the limitation of Unicode. What's available in Unicode are "combining overline" (U+0305 ◌̅) and "combining double macron" (U+035E ◌͞).

Even with just normal words, it looks weird because the height of each letter is different https://www.reddit.com/r/Unicode/comments/8msm2j/can_i_overline_an_entire_word/ using combining overline U+0305: s̅i̅g̅n̅a̅l̅ … T̅e̅s̅t̅ … f̅u̅l̅l̅-̅t̅i̅m̅e̅ ̅w̅o̅r̅k̅ using combining double macron U+035E: s͞i͞g͞n͞a͞l … T͞e͞s͞t … f͞u͞l͞l͞-͞t͞i͞m͞e͞ ͞w͞o͞r͞k͞

Rom1-GoPlay commented 10 months ago

Thanks ! But why is this working on logseq ? When I type: \overline{z + z'} In logseq (a note app) on my desktop, I get the expected result. I guess logseq doesn't use unicode to render the formula.

ray-pH commented 10 months ago

yeah, logseq doesn't use Unicode, they use some renderer to render their equation (I believe they use KaTeX). On platforms that support rendering math expressions (like logseq, or even GitHub*), you can easily write $\overline{z+z'}$ ($\overline{z+z'}$). But you can't copy-paste them outside those platforms, they act pretty much like an image. $$\overline{z+z'}$$ Outside of those platforms, Unicode is the best you can do.

*only in GitHub desktop, apparently the mobile app doesn't support math rendering