-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pylatexenc support not working #32
Comments
What OS are you running? I haven't done any testing with windows, so just checking that first.
|
Using Ubuntu, lates2text worked as expected on both CLI and as a command within nvim ( |
Hmm, could be a few things. I've added some debug statements to the plugin to help figure out whats going on. Can you update the plugin so that you have this recent commit: 7aedbde Set the require('render-markdown').setup({
log_level = 'debug',
}) Then create a markdown file with the following contents: # Inline Formula
$\sqrt{3x-1}+(1+x)^2$
# Block Formula
$$
f(x,y) = x + \sqrt{y}
f(x,y) = \sqrt{y} + \frac{x^2}{4y}
$$ Open it such that this plugin renders the contents, the headings should at least work. Then copy & paste the contents of the log file here. The log file should be located at: |
Based on the logs above it appears you do not have the latex tree sitter parser installed. Please TSInstall it and let me know if it works. |
|
Same, I had the texlab LSP installed so I though it would be sufficient After running |
## Details The requirements to get latex support working for this plugin are not clear as shown by: #32. Update the README to add the missing need for the latex parser. More importantly the current health check logic only checked for the minimum needs of this plugin as there was no way to indicate whether the user wanted latex support or not. Add a `latex_enabled` flag which defaults to true. Functionally it does allow enabling / disabling the latex handler but it is mainly used in the updated health check logic to check for the additional requirements needed for latex, i.e. the parser and the latex2text executable. Setting the flag to false allows users to remove these warnings if they do not want latex support by this plugin.
Ah, that makes sense, should have been more clear of the requirements. I've updated the README as well as the health check to make debugging this easier in the future: a2788a8. Thanks for the feedback! |
I installed pylatexenc using pipx such that it's available globally, but math mode rendering is not working.
I tested copying the markdown file kn the demo folder, and everything looks the same except for the math mode.
Other tests I did to no avail:
The text was updated successfully, but these errors were encountered: