typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
13 stars 0 forks source link

Allow searching for "hbar" in the documentation section "General Symbols" #174

Open Mc-Zen opened 1 year ago

Mc-Zen commented 1 year ago

Hi, it is a bit tricky to find how to typeset the hbar symbol ħ. It is apparently accessible under planck.reduced but coming from LaTeX one would much likely search for "hbar" in the symbol search. I don't know if the search implementation allows to add some sort of tags to each symbol but if so, adding one for hbar would be helpful :)

Mc-Zen commented 1 year ago

I hope I did not post this at a wrong place. It is more "documentation"

laurmaedje commented 5 months ago

I fixed https://github.com/typst/webapp-issues/issues/205, but this still doesn't work because https://github.com/wspr/unicode-math/blob/master/unicode-math-table.tex lists the name as \hslash, not \hbar.

Enivex commented 5 months ago

I fixed https://github.com/typst/webapp-issues/issues/205, but this still doesn't work because https://github.com/wspr/unicode-math/blob/master/unicode-math-table.tex lists the name as \hslash, not \hbar.

The issue is that there's only one proper reduced Planck constant symbol in unicode, and it's up to the font whether that one has a bar or a slash.

There's a further symbol that specifically has a horizontal bar, but it's not intended for use in math.

See the discussion here https://github.com/latex3/unicode-math/issues/563

Not sure there's anything that can be done really

knuesel commented 2 months ago

Not sure there's anything that can be done really

To solve the issue at hand we could add \hbar as a second LaTeX name?

(The user might need to play with Unicode variant forms/stylistic sets to get the actual shape they want if the font supports it but that doesn't prevent us from fixing the symbol search...)