-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
allow characters for lte and gte in a few contexts #1099
base: develop
Are you sure you want to change the base?
Conversation
string => ' <= ', | ||
TeX => '\le ', | ||
kind => "le", | ||
alternatives => [ '=<', "\x{2264}" ], |
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.
I'm confused by the alternatives, as the first one is the same as the actual operator at line 10. Was this meant to go in the previous operator <=
?
One could make =<
an alias for =>
rather than an alternative. I think that might not have been available for operators when this was written.
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.
Wait, I'm looking at this again and I think it is right. Maybe the diff is misleading.
This removes =<
as an operator altogether. And then it makes =<
and "\x{2264}"
be alternatives for <=
. Because the original block for <=
and =<
are right next to each other and nearly identical, the diff that is displayed might be misleading.
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.
My fault, I misread the diffs (argh!).
Note, however, that making =<
and >=
alternatives means they will not be defined by default (as parseAlternatives
is false by default. So that changes the definition of the setup for this context. That is why I was suggesting making =<
and >=
be aliases rather than alternatives, but if you want them removed, you should make that explicit, and in that case you need to change the documentation as well.
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.
OK, I didn't think about how alternatives are not available by default. I was thinking I was just simplifying the code, but of course you are right that it would change behavior. I updated the commit to only add the ≤ and ≥ alternatives. (And ≠ in the other file where !=
has meaning.)
TeX => '\ge ', | ||
kind => 'ge', | ||
reverse => 'le', | ||
alternatives => [ '=>', "\x{2265}" ], |
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.
Similarly here.
Yeah, sorry. I was manually copy-pasting from where I have this in my production server and messed that up. I'll fix it soon. |
This is so a student can directly enter ≤ and ≥ in contexts where
<=
and>=
are valid operators.It affects a bit more than just the two files here, because at least one context (Inequality-SetBuilder) is built on top of
contextInequalities.pl
.