-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 support for unicode angle brackets, single vertical bar, double vertical bar #1123
Conversation
src/functions/delimsizing.js
Outdated
"<", ">", "\\langle", "\\rangle", "\\lt", "\\gt", | ||
"\\lvert", "\\rvert", "\\lVert", "\\rVert", | ||
"<", ">", "\\langle", "\u27e8", "\\rangle", "\u27e9", "\\lt", "\\gt", | ||
"\\lvert", "\\rvert", "\u2223", "\\lVert", "\\rVert", "\u2225", |
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.
Just out of curiosity, is it valid to have right delimiters, e.g., \rangle
, as a left delimiter?
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 checked with quicklatex.com and it appears so although I'm not sure in what context you'd actually want to do that.
PR #993 and The single character analogue to |
Similarly, |
const cases = [ | ||
['\\left\\langle \\right\\rangle', '\\left< \\right>'], | ||
['\\left\\langle \\right\\rangle', '\\left\u27e8 \\right\u27e9'], | ||
]; |
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 think this could be extend to something like:
const cases = {
'shouldParse': [ ... ],
'shouldBuild': [ ... ],
'shouldNotParse': [ ... ],
'shouldNotBuild': [ ... ],
'shouldParseLike': [ ... ],
'shouldBuildLike': [ ... ],
};
I'll open a separate PR for this.
This PR also allows these symbols to be used with left/right delimiters. This should allow us to finally close #243.
TODO: write some tests