-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tab-completing of \varphi and \phi reversed? #8429
Comments
Rereading the description I just posted made me realize that the problem is in my font rendering and not the way we handle tab-completion. Closing, but user beware. |
And it turns out that Consolas, the default font on my browser (for fixed-width) and shell, is one of the few bad fonts. Here is a quick and dirty way to programmatically check a list of fonts for this issue: type HTML #stolen from an old @stevengj notebook
s::String
end
import Base.writemime
writemime(io::IO, ::MIME"text/html", x::HTML) = print(io, x.s)
for font in ["Andale Mono", "Consolas", "Courant", "Courier", "Courier New",
"DejaVu Sans Mono", "Inconsolata", "Latin Modern Mono", "Letter Gothic Std",
"Linux Libertine Mono O", "Menlo", "MingLiU", "Monaco", "OCR A Std",
"Osaka", "PCMyungjo", "Prestige Elite Std", "PT Mono", "SimHei", "SimSun-ExtB",
"Source Code Pro", "TeX Gyre Cursor"]
display(HTML("""\\phi = <font face="$font">ϕ</font> \\varphi = <font face="$font">φ</font> ($font)<br />"""))
end which in my IJulia session produces tl;dr: don't use Andale Mono, Consolas, Osaka or SimHei if you want Unicode sanity. |
I'm having the same problem with URW Garamond which is my preferred font in LaTeX. For that font, it is even worse for \kappa because it defaults to ϰ instead of κ. |
The current tab-completion behaviour for me does
which is exactly the opposite of what LaTeX does. Needless to say, this is rather confusing...
The Unicode 7.0 tables say (pdf)
According to Wikipedia, Unicode pre-3.0 had the code points assigned the other way (!!!!!) and it looks like it has caused no end of problems. There are still lots of fonts out there that render the glyphs in the opposite fashion.
For us, the problem is that the unicode.xml file used to autogenerate latex_symbols.jl still has the pre-3.0 code points assigned.Technically this an upstream issue, but W3C has decided to document rather than update, so we may have no choice but to special-casephi
andvarphi
handling.cc: @stevengj
The text was updated successfully, but these errors were encountered: