LaTex 不会在 VS Code 中的 jupyter 笔记本中渲染,但会运行 jupyter 笔记本

Mic*_*iak 6 markdown latex visual-studio-code jupyter-notebook

我今天安装了 VS Code 并创建了一个非常简单的 jupyter 笔记本,它运行时没有任何错误,但即使在安装LaTex Workshop扩展后也不会在 VS Code 中渲染 LaTex 。

当我直接在 jupyter 中运行同一个笔记本时,它渲染得很好。

这是相关降价单元中的代码:

### This is another markdown cell with Latex

This equation defines eigenvalues and eigenvectors: $Mx = \lambda x$

another equation:
$\begin{align*}
(a+b)^2 = a^2+2ab+b^2
\end{align*}$
Run Code Online (Sandbox Code Playgroud)

在 jupyter 中,单元格如下所示:

在此输入图像描述

在 VS Code 中,单元格如下所示:

在此输入图像描述

Jor*_*ado 5

我找到了为什么会发生这种情况。答案是 vscode 的 Python 扩展(允许在其中打开 jupyter 笔记本的扩展)目前不支持离线功能。他们甚至因此提出了一个问题。

编辑 [2021 年 6 月 16 日]

vscode这个问题在jupyter 扩展的最新版本中得到了修复。