-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
epsilon symbol in unicode-to-latex not supported #7387
Comments
Does anything happen? (I get some issues when I try to copy-paste the 𝜖 into JabRef, so I can't test it myself) |
Hm, your Epsilon is somehow the wrong char or is it written in italics? |
I believe it is Mathematical Italic Epsilon Symbol 𝜖. I am getting graphical issues when I am copying it into JabRef and non-sense if I try to convert it to latex. |
Yes, it is originally the https://www.overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols |
@k3KAW8Pnf7mkmdSMPHz27 Yes, mac has a problem with displaying italic, I see the same issue. |
For me, it converts Is this the behaviour you are seeing? I think this is caused by the UnicodeToLatexFormatter. jabref/src/main/java/org/jabref/logic/formatter/bibtexfields/UnicodeToLatexFormatter.java Lines 37 to 42 in c422098
As you can see, we are explicitly converting the codepoint to a char. Italic epsilon however has a codepoint of (decimal) 120598 which can't be represented by a java char. Another problem is that italic epsilon is not a bmp codepoint. it is represented by a surrogate pair so the actual length of the character italic epsilon is 2 which is why it converts it into 2 separate characters above. This fixes the issue. int cpCurrent = result.codePointAt(i);
Integer cpNext = result.codePointAt(i + 1);
String code = HTMLUnicodeConversionMaps.ESCAPED_ACCENTS.get(cpNext);
if (code == null) {
// skip next index to avoid reading surrogate as a separate char
if (!Character.isBmpCodePoint(cpCurrent)) {
i++;
}
sb.append(new String(Character.toChars(cpCurrent)));
} else { This doesn't fix the actual issue though since italic epsilon can't be converted to latex without the amsmath latex package. I am not too sure about that though since I am not familiar with latex. |
Yup that is what I am getting ^^
I don't know what is the correct conversion. Other conversions suggest AMS font symbols so that in itself should not be an issue, see jabref/src/main/java/org/jabref/logic/util/strings/HTMLUnicodeConversionMaps.java Line 700 in 8c3424c
|
Yep! That works. Good catch.
Alright, I guess it's ok to just add another entry for the epsilon (U+1D716) in that case? |
I am having issues reproducing the correct character, what do you convert it to in latex? |
EDIT: This works but the dependency used for converting latex to unicode (https://github.com/tomtung/latex2unicode) can't handle that expression for some reason. It converts it to a "smallest element of" character https://www.fileformat.info/info/unicode/char/220a/index.htm. |
I am not sure of what is the right answer here.
AMS math convert it to |
Yes, U+1D716 is the correct character. |
I am sorry, but could you give me some more information regarding how you produce this? I am having issues reproducing it outside of an ACM template, where |
I am also using Overleaf on Windows 10. I just include amsmath and use |
I'd say |
JabRef version 5.1 on MacOs 11.1
If 𝜖 in title of a reference, it is not converted to \epsilon when selecting "cleanup" and "unicode-to-latex"
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: