Markdown-preview-enhanced: latex not rendering

Created on 29 Oct 2018  路  4Comments  路  Source: shd101wyy/markdown-preview-enhanced

I have just installed your plugin and would like to use it to embed latex in my markdown.
My operating system is ubuntu 18.04.1, and I have installed the texlive-full and pdf2svg packages.

Running the sample from your website:

 ```latex {cmd:true, hide:true}
\documentclass{standalone}
\begin{document}
   Hello world!
\end{document}
 `` (adding the third tick here messed up the markdown encoding. I'm using all three though)

This adds latex with syntax highlighting to the preview (and also the html export), but doesn't seem to execute latex.

(In fact, none of the code samples seem to do anything but add syntax highlighting. gnuplot, matplotlib, etc).

Most helpful comment

@lhk Did you check the option enableScriptExecution in the extension settings?

All 4 comments

Run the following command to install necessary packages

sudo apt install -y pdf2svg texlive texlive-latex-extra

Then set cmd=true, and don't hide
```latex {cmd=true} \documentclass{standalone} \begin{document} Hello world! \end{document} ```

Press shift+enter to render latex.
Thanks

Thanks for the quick answer.
I have executed
sudo apt install -y pdf2svg texlive texlive-latex-extra

0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.

Your sample (without hide) still just gives me latex with syntax highlighting. I tried shift+enter both in the markdown and in the preview, it does nothing.
In the preview, it also gives me a blue button with a play symbol - I guess that's for executing, too ?
It doesn't do anything when pressed though.

@lhk Did you check the option enableScriptExecution in the extension settings?

@shd101wyy , whoops that's embarrassing.
Enabling the script execution does the trick (I had jumped right to the tikz section and skipped code chunk intro - sorry).

Thanks for this awesome support.

Was this page helpful?
0 / 5 - 0 ratings