Skip to content
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

TODO: handle _ in latex #40

Open
czhang03 opened this issue May 8, 2018 · 1 comment
Open

TODO: handle _ in latex #40

czhang03 opened this issue May 8, 2018 · 1 comment

Comments

@czhang03
Copy link
Contributor

czhang03 commented May 8, 2018

in latex, we use \b to detect command boundary. However, _ does not match \b.

For example if we type \top_x, the \top symbol will not be prettified.

Any suggestion on how to modify the regex?

@tririver
Copy link

tririver commented May 28, 2019

I use something like this which works:

    "ugly": "\\\\nabla\\s*",
    "pretty": "∇",
    "post": "_|\\^|\\b"

Fundamentally modifying word boundary may be a cleaner way. But I don't know how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants