racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
445 stars 93 forks source link

wrong congruence symbol? #497

Closed Metaxal closed 2 years ago

Metaxal commented 3 years ago

https://github.com/racket/drracket/blob/26db53d6d6739badf21c63e286eb7ceb84640ade/drracket/browser/private/entity-names.rkt#L199

The number 8773 in the table is the right integer code, but for some reason the symbol I get via the table is wrong:

#lang racket
(require mrlib/tex-table)

(define p (assoc "cong" tex-shortcut-table))

p ; ("cong" "≌") ; this is "all equal to", not "congruence" ≅

(map char->integer (string->list (second p))) ; (8780) ; should be (8873)

Any idea what's happening?

This is really no big deal for me, I was just conducting a sanity check for my own code and found a discrepancy on this symbol.

Metaxal commented 3 years ago

Just in case: The small wave at the top of the symbol is in the wrong direction. It's a little subtle for sure.

shhyou commented 2 years ago

The one in your code is hard-wired here. Do you want to change it? https://github.com/racket/gui/blob/60779260137da324a7b1a905396a86012733892d/tex-table/tex-table.rkt#L168

The module in your link is part of the brower library.

rfindler commented 2 years ago

It does seem to be a shame that there are two tables, for sure! Not sure how best to combine them, however. Maybe the tex-table library could get the html entities on the relevant lines and then the (old, dead) browser could refer to that?

Metaxal commented 2 years ago

Can't you just turn the character into an integer to obtain the html entity?

Metaxal commented 2 years ago

(I'll let someone with push access to make the change to tex-table, or anyone willing really)

Metaxal commented 2 years ago

Thanks!