-
-
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
add unicode superscripts and subscripts to latex substitutions #6927
Conversation
I noticed this caused the following weird error
|
Looks like mystery issue #5712 |
I'd prefer without the braces, i.e. |
@@ -781,6 +781,51 @@ const latex_symbols = [ | |||
"\\openbracketright" => "〛", | |||
"\\overbrace" => "︷", | |||
"\\underbrace" => "︸", | |||
"\\^{0}" => "⁰", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please put a comment or something to separate them from the auto-generated list.
@stevengj That was my original plan but there were conflicts with |
…EPL, and allow a wider range of chars (for things like JuliaLang#6927)
I suppose we could have numeric super/subscripts be Any opinions? |
Why do you need braces for single letters like I would just dump the schwa. In general, I wanted to avoid more and more LaTeX code creeping in, which is why I omitted things like |
I think we should try to be as close to latex as possible. If there is a more common name, such as in the case of \hbar and \Elzxh there is no reason not to have both. We could also have \grad map to ∇ like it does for \nabla. As for braces around
|
I agree that we should pick the most common name when there are several to choose from; definitely The completion of |
I don't see the problem. If I do:
then completion of |
It also looks like we are missing most of the IPA symbols (LaTeX In general, beware that the W3C's unicode.xml file dates from 2003 (I couldn't find any more recent comprehensive table), so it may have many omissions. |
Hmm, seems like i confused h with n. It is hard to tell the difference when its a subscript. In anycase, the curly braces don't seem necessary. Must of fixed whatever issue I was having with it. However I still have an issue with
|
Funnily enough when I just go through the list
|
Probably something in |
I believe it's considered a word boundary and thus not completed. |
|
Now, |
Added. |
LGTM. |
"\\_p" => "ₚ", | ||
"\\_s" => "ₛ", | ||
"\\_t" => "ₜ", | ||
"\\hbar" => "ħ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have \hslash
for U+210F. U+0127 looks better to me in upright text, to be honest, so it's not completely clear to me what we should use here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW Wikipedia always uses U+210F for Planck's constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
U+0127 is also used in IPA, where it is called \textcrh
or \crossh
, depending upon the LaTeX package.
Well \hbar ħ (U+0127), looks more like a bar and \hslash ℏ (U+210F) looks more like a slash. So I think the current names at least make logical sense. My preference is to keep it as is. Perhaps when this gets documented we can sort it meaningfully so it will be easier to find alternatives. |
I am ready for this to be merged if there are no other comments. |
Arguments in favor of U+0127 for
Argument against: most people using On balance, I'm inclined to support U+0127. In this context, typographical consistency (upright vs. italic) is more important than code point definitions. |
+1 for U+0127 |
…ad of U+2329/232A (angle bracket), as the former are recommended by Unicode for math & technical usage
add unicode superscripts and subscripts to latex substitutions
Since there seem to be no further objections (and LaTeX abbreviations are fairly innocuous anyway), I went ahead and merged. |
Added Unicode superscripts and subscripts to latex substitutions.