-
-
Notifications
You must be signed in to change notification settings - Fork 83
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 math
to interpret content within {}
as a (sub)superscript
#412
base: master
Are you sure you want to change the base?
Conversation
Please also add some tests in https://github.com/racket/scribble/blob/master/scribble-test/tests/scribble/docs/manual.scrbl |
I don't know how to test in |
You can write some content using |
(list (make-element 'italic (list i)))])] | ||
[(eq? i 'rsquo) (list 'prime)] | ||
(match i | ||
[(or (pregexp #px"^(.*)(_|\\^)\\{(.*)\\}(.*)$" |
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 actually skeptical now that you can do this properly with regexp, since braces are supposed to be balanced.
Take A_{B^{C}}
as an example. With the current regexp, you would get "A_{B"
as the first part and "C}"
as the second part.
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.
Resyntax analyzed 1 file in this pull request and found no issues.
I just realized that we can achieve similar functionality by defining functions: (define ^ (compose superscript math))
(define _ (compose subscript math)) I'm not sure if this PR is necessary, feel free to close it. |
See #411.