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

Error parsing math in markdown #2

Open
Eloitor opened this issue Aug 10, 2022 · 8 comments
Open

Error parsing math in markdown #2

Eloitor opened this issue Aug 10, 2022 · 8 comments

Comments

@Eloitor
Copy link

Eloitor commented Aug 10, 2022

Steps to reproduce:

fvim test.md

write this is a test $x^2$ and press esc.

image

@yatli
Copy link
Owner

yatli commented Aug 10, 2022

No repro here:
image

Most probably a neovim version issue. ui_watched is a bleeding edge thing.

@Eloitor
Copy link
Author

Eloitor commented Aug 10, 2022

Thank you, I'm on version 0.7.2, from the void-linux repo. I'll try to build it from the master branch instead.

By the way, the output looks very nice

@Eloitor
Copy link
Author

Eloitor commented Aug 10, 2022

I've compiled it, but the latex preview is not showing... do I need to run some command?

@yatli
Copy link
Owner

yatli commented Aug 10, 2022

You may need to make some edits and return to normal mode to trigger the updates.
One caveat is that the math equation is first sent to an online rendering service... So that might also be an issue if the rendered image could not be retrieved.
Could you first check if other stuff (like ## Titles) work?

@yatli
Copy link
Owner

yatli commented Aug 10, 2022

Note, I also see that underdashes are not rendering correctly in your screenshot. Try play with FVimFontLineHeight '+1.0'

@Eloitor
Copy link
Author

Eloitor commented Aug 10, 2022

I needed to manually run :setfiletype markdown. Now it is working! :)

By the way the images of math equations generated on a title need some scaling. (I don't know how to scale the fonts in a GUI to test if the image scales with the text)

I'd like if this plugin had an option to use an offline renderer, for example https://github.com/mneri/pnglatex or https://github.com/MaT1g3R/pnglatex. I'm willing to help with this if you are interested.

@yatli
Copy link
Owner

yatli commented Aug 10, 2022

I needed to manually run :setfiletype markdown. Now it is working! :)

Good catch. I had to do the same because I later installed vimwiki, but not sure why you need to do it too. What's your default ft for markdown?

By the way the images of math equations generated on a title need some scaling. (I don't know how to scale the fonts in a GUI to test if the image scales with the text)

I'd like if this plugin had an option to use an offline renderer, for example https://github.com/mneri/pnglatex or https://github.com/MaT1g3R/pnglatex. I'm willing to help with this if you are interested.

I've been thinking about using an offline renderer (it's been there for Emacs for decades already!) but this plugin has been in the demo state for a long time.

Improvements to markdown rendering will be a good start.

Also see: #1

@Eloitor
Copy link
Author

Eloitor commented Aug 11, 2022

I finally know why I needed to manually run :setfiletype markdown. The master branch of nvim breaks my current configuration based on astronvim. I don't know what I'll do with it.

I'll try to help with what I can.

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