-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
\lfloor and \rfloor can't be used as function names: invalid character #32077
Comments
We initially make symbols like this invalid to keep our options open in the future. This is an interesting case since I would have thought |
Thanks for the prompt reply. These two symbols and their corresponding LaTeX are familiar to anyone who wish to use them in these semantics because they are already in the field. So no further confusion would be caused. Here's some background of left contraction and right contraction: Source: Geometric algebra - Wikipedia: Extensions of the inner and exterior products P.S. In most Geometric Algebra libraries, |
The problem is that the way they would be parsed for the use as a floor operator is as a balanced bracket pair, whereas you are asking for them to be allowed as standalone infix operators. Those two ways of parsing these characters are quite incompatible, so we'd have to make a choice. The notation of Humans are quire good at disambiguating these kinds of things but parsers don't work like that, unfortunately. LaTeX doesn't have to commit to one or the other parsing because it's just a character and it doesn't care about parsing or meaning. |
I see. So you wish to reserve them for the syntax of ⌊x⌋, instead of being used as general Julia identifiers or operators. I'll close this issue then.
What's standard is relative. For someone in the field of Geometric Algebra, ⌋ for left contraction and ⌊ for right contraction are ubiquitous. Their non-symmetric semantics require visual direction, so it's natural to reuse notations that were used in a balanced bracket pair. This unfortunate ambiguity for parsers is one of the consequences. |
Just as a note, finally I chose \intprod and \intprodr for contractions, they are supported by Julia and they mean left and right interior product in exterior algebra. |
Related to #27697 . |
Currently these two unicode characters can't be used as function names, and they are the symbols used in Geometric Algebra for right contraction and left contraction, respectively, so it's natural to wish to use them as operators.
Actually they have been brought up in #8044 (comment) , suggesting that there're ~300
unicode-math
symbols that are not currently valid Julia identifiers or operators.I wonder if it's ok to create a PR to add them to Julia or are there any particular considerations to avoid adding them to Julia? Or just these two?
The text was updated successfully, but these errors were encountered: