小编Maj*_*jis的帖子

如何在 Visual Studio 代码中的 Jupyter 笔记本中使用 Latex?

我已经看到了与这个问题相关的一些其他链接,如下:

  1. 如何在IPython Notebook中编写LaTeX?
  2. https://towardsdatascience.com/write-markdown-latex-in-the-jupyter-notebook-10985edb91fd
  3. https://colab.research.google.com/drive/18_2yFdH8G-6NXY_7fTcshMoScgJ-SYac#scrollTo=go3imAWqE9au

然而,我在 Jupyter Notebook 中使用 Latex 代码时仍然面临一些问题。

例如,

\begin{align*}
  f(x) &= x^2\\
  g(x) &= \frac{1}{x}\\
  F(x) &= \int^a_b \frac{1}{3}x^3
\end{align*}
Run Code Online (Sandbox Code Playgroud)

这工作正常,Markdown但是

\begin{equation*}
  f(x) &= x^2\\
  g(x) &= \frac{1}{x}\\
  F(x) &= \int^a_b \frac{1}{3}x^3
\end{equation*}
Run Code Online (Sandbox Code Playgroud)

才不是。

在尝试使用以下命令创建有序列表时

\begin{enumerate}
  \item The labels consists of sequential numbers.
  \item The numbers starts at 1 with every call to the enumerate environment.
\end{enumerate}
Run Code Online (Sandbox Code Playgroud)

然而,$\textbf{This is a bold text.}$有效。

我真的很困惑我能用什么和什么不能用。有什么方法可以让我在 Visual Studio 代码中仅使用 Latex 代码(而不是 HTML 或其他代码)来格式化我的文本和方程,而不必担心哪些有效哪些无效?

formatting markdown latex visual-studio-code jupyter-notebook

8
推荐指数
1
解决办法
2万
查看次数