shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.47k stars 173 forks source link

code chunk #750

Open kuanghl opened 1 year ago

kuanghl commented 1 year ago

Markdown Preview Enhanced:use code chunk, how config python/java/TikZ environment. if just install Markdown Preview Enhanced plug_in, can not run cases of implementing documents.

VatinaCharo commented 1 year ago

One of the currently known solutions shd101wyy/vscode-markdown-preview-enhanced#748

CheapMeow commented 1 year ago

One of the currently known solutions shd101wyy/vscode-markdown-preview-enhanced#748

It is solution for Linux, but inspired by this, I find how to run code in Windows.

First, make sure that your enableScriptExecution = true, and your environment has set up, for example, set environment var PATH

Second, open vscode in administrator mode, then run code, it will be OK.

I have tested these code chunks and they can work.

```gnuplot {cmd=true output="html"} set terminal svg set title "Simple Plots" font ",20" set key left box set samples 50 set style data points

plot [-10:10] sin(x),atan(x),cos(atan(x)) ```

```latex {cmd=true hide} \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[rounded corners] (1,3)--(2,2)--(4,5); \end{tikzpicture} \end{document} ```