Galadirith / mathjax-wrapper

MathJax in Atom
MIT License
8 stars 1 forks source link

MathJax usually does not render #3

Closed cdstanford closed 8 years ago

cdstanford commented 8 years ago

Hi Galadirith,

First of all, thanks very much for this package; I'm very happy I found it. I have this (mathjax-wrapper) installed alongside markdown-preview-plus. When the preview does work, it works very nicely.

My problem is that 90% of the time opening Atom the preview doesn't work--markdown loads but the math between dollar signs is not rendered, and instead appears in the preview panel as raw text (e.g."$$ X = {f : [0,1] \to [0,1]^2 \;\; : \;\; f \text{ is continuous}, f(0) = (0,0), f(1) = (1,0)}. $$").

If the preview does manage to load correctly, then I can edit my document as much as I want and the preview continues to load correctly. But I can't seem to find any pattern for when it loads correctly and when it doesn't.

Any idea what is going on here? Or is there an error log I can check for problems?

Thanks -cdstanford

Galadirith commented 8 years ago

Thanks @cdstanford really appreciate your kind words.

So it sounds like you have not enabled maths rendering when you open the previews. To do that you need to press ctrl-shift-x once you've opened a preview, and either the editor of preview is focused. You can also enable maths rendering for all previews by default by ticking the option Enable Latex Rendering By Default on markdown-preview-plus's settings page and avoid having to invoking that key combo every time. For a more detailed explanation you can see the math document.

Please let me know how that goes, and hopefully that will fix it for you, but if not I'll keep investigating.

Just for future reference, pretty much all issues to do with previewing markdown should be posted to markdown-preview-plus. That's absolutely not your fault and there's no reason you should have known that, having these two packages makes things slightly confusing, but shortly you won't need mathjax-wrapper any more which should help simply things.

Thanks again @cdstanford

cdstanford commented 8 years ago

Thanks for the quick response!

I do have Enable Latex Rendering By Default turned on in settings, and keybindings turned on; ctrl+shift+x doesn't seem to do anything, nor does going into the menu to toggle LaTeX rendering directly.

The pandoc parser is turned off, if that means anything. Toggling Live Update also has no effect.

The only other package I have installed is language-latex which doesn't appear to be causing the problem (I tried disabling it)

In fact, now I can't seem to get the LaTeX rendering to work at all, though it used to work occasionally and I don't know what I did to change anything!

-cdstanford

cdstanford commented 8 years ago

Aha! So it looks like under the Packages menu, there are two entries: Markdown Preview and Markdown Preview Plus. Both of them have a Toggle Preview option which has shortcut Shift-Ctrl-M. Markdown Preview Plus additionally has a Toggle LaTeX Rendering option.

So if I manually select the toggle preview option under Markdown Preview, LaTeX rendering doesn't work, but if I manually select the toggle preview option under Markdown Preview Plus, LaTeX rendering works. It appears that Shift-Ctrl-M is defaulting to the one under Markdown Preview.

Anyway, thanks for your help; any idea why there are two menus and how to get rid of Markdown Preview?

Galadirith commented 8 years ago

Thanks @cdstanford. So I think we've found your problem. If you take a look at markdown-preview-plus's installation instuctions, we ask all our users to disable markdown-preview (please go to our installation document for more detailed instructions if your not sure how to disable markdown-preview).

The reason why we ask this is because markdown-preview-plus is actually built on top of the code of markdown-preview and adds a layer of features like maths rendering. It is designed to replace, not work alongside markdown-preview. The temperamental nature of sometimes rendering maths and sometimes not is likely to do with whichever package managed to load first.

Please let me know how this goes @cdstanford and hopefully you'll be up and running very shortly.

cdstanford commented 8 years ago

Great, yeah, everything is up and running now! Thanks for the help!!