-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
LaTeX inline_math parsered not porperly #1562
Comments
I think this isn't a bug it's not something wanted but it's the correct behavior |
I know $ is part of norg syntax, but it is also used in latex syntax. |
I am making a plug for latex and all latex-injected language, and I want it work in norg, too. |
well if |
Since there is no separate parser for latex_inline_math, we need to pass $ to tell latex parser it’s inline_math in it. |
@dirichy how do you suggest we pass a |
I tried remove the #offset! line and it works will, since “|” is named node in norg parser, it will not pass to latex parser. |
BTW, if you really think the part of neorg syntax should not be passed, the offset number should be 2, not 1, since “|” is norg syntax, too, but now pass to latex parser. |
Prerequisites
Neovim Version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info
Neorg setup
require(“neorg”).setup()
Actual behavior
I have some snip and conceal for latex only in mathmode.
This code:
is not parsed as latex mathmode.
I can’t use mathmodesnip and mathmode conceal in it.
Expected behavior
Change the injection.scm, remove the line contains “offset” in latex injection, then the “$”will pass to latex parser. So that we can know it’s in mathmode form latex parser.
Steps to reproduce
Put your cursor on “\alpha” and run this function(used in latex file to detect whether the cursor is in mathmode)
will return false, but it should return true.
Potentially conflicting plugins
No response
Other information
No response
Help
Yes
Implementation help
just remove the offset line in injection.scm for inline_math will work.
The text was updated successfully, but these errors were encountered: