Swapped \phi and \varphi
christianvorhauer opened this issue · 6 comments
Hi, there seems to be a common error or failure in definition regarding the symbols \phi and \varphi
Help:Displaying a formula - Wikipedia, the free encyclopedia, Hilfe:TeX – Wikipedia, LaTeX-Kompendium: Sonderzeichen – Wikibooks, Sammlung freier Lehr-, Sach- und Fachbücher,[4] states it should be as following
φ is \varphi
ϕ is \phi
which is just the other way round of the result of latex-to-unicode. Unfortunatelly I don't know, what should be the authoritative source of this definition.
Thank you for the bug report. This issue has been fixed in 892d284.
The web application and chrome extension will return the correct result now. If you are using it through the gem interface you will need to upgrade to version 0.1.3.
I was very confused now that my original report and the github diff seems to state the facts just the wrong/other way.
But this is only a representation problem and due to the fact that
a) the font http://de.wikipedia.org/wiki/Consolas is defined on github for the codeparts in issues/comments
b) I use Windows 7, where this font is local
c) (of course) the MS-font uses an old unicode interpretion, where the glyphs are swapped.
Looking more deeply at the used codepoints, your fix in 892d284 should be just right.
My original report resulted in trying latx-to-unicode on http://vikhyat.net/stuff/latex_to_unicode/ which unfortunatelly stopped working by now, likely because of a ajax-redirection problem. Maybe there was an old library used or a similar problem occured with wrong fonts.
The cause of this problems is now again described more clearly in http://en.wikipedia.org/wiki/Phi.
The "correct" usage was changed in the standardisationprocess and is somewhat undecided but recent codecharts http://www.unicode.org/charts/PDF/U0370.pdf show
. Consolas just does it wrong! Courier e.g. would do it right, as anyone could verify using firebug.
Symbol here for 03C6: φ
Symbol here for 03D5: ϕ
Editing this comment by the way uses Helvetica, which also does it right....
I've fixed the web interface on http://vikhyat.net/stuff/latex_to_unicode/. I have also changed the output font to Arial, which appears to be giving the correct symbol.
Can you check and confirm?
Hi, sorry, tried hard, but the web interface doesn't work for me. I tried on FF 18.0.2 and IE 9
The getJSON call to /dyn/latex_to_unicode/... doesn't follow the HTTP 301 redirect to http://app.vikhyat.net/latex_to_unicode/... .
On the other hand a direct call to http://vikhyat.net/dyn/latex_to_unicode/%5Cphi%5Cvarphi in my browser follows to http://app.vikhyat.net/latex_to_unicode/%5Cphi%5Cvarphi and gives the correct result
After doing some research I can tell you, this is most propably due to the same-origin-policy https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript?redirectlocale=en-US&redirectslug=Same_origin_policy_for_JavaScript which controls Ajax-requests.
I think this is a caching issue, the current copy of the file on the server should actually be making a call to app.vikhyat.net and not vikhyat.net/dyn. If you try http://vikhyat.net/projects/latex_to_unicode/index2.html it will probably work.
What is odd is the fact that nginx randomly started serving an older version of that page until I restarted it, the actual page was never modified.
Ok, both versions work now. May have been some kind of server-caching I think. Sometimes you just have to lay your hands on the machine :)