Skip to content

Error parsing math in markdown #2

Open

Description

@Eloitor

Steps to reproduce:

fvim test.md

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

image

Activity

  1. yatli commented on Aug 10, 2022

    @yatli
    Owner

    No repro here:
    image

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

  2. Eloitor commented on Aug 10, 2022

    @Eloitor
    Author

    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

  3. Eloitor commented on Aug 10, 2022

    @Eloitor
    Author

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

  4. yatli commented on Aug 10, 2022

    @yatli
    Owner

    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?

  5. yatli commented on Aug 10, 2022

    @yatli
    Owner

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

  6. Eloitor commented on Aug 10, 2022

    @Eloitor
    Author

    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.

  7. yatli commented on Aug 10, 2022

    @yatli
    Owner

    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

  8. Eloitor commented on Aug 11, 2022

    @Eloitor
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions