Math Jupyter笔记本中以标记形式编写的数学符号在GitHub上呈现不一致

Math Jupyter笔记本中以标记形式编写的数学符号在GitHub上呈现不一致,math,jupyter-notebook,markdown,Math,Jupyter Notebook,Markdown,我在Jupyter笔记本上用Markdown写了以下带有数学符号的文本: * (linear regression model prediction) : y = $\theta_0$ + $\theta_1$$x_1$ + $\theta_2$$x_2$ + $\theta_n$$x_n$ * (...in vectorized form) ------------ : y = $h_\theta$(x) = $\Theta$.x 不知何故,当此笔记本上载到GitHub时,第一部分没有正确渲

我在Jupyter笔记本上用Markdown写了以下带有数学符号的文本:

* (linear regression model prediction) : y = $\theta_0$ + $\theta_1$$x_1$ + $\theta_2$$x_2$ + $\theta_n$$x_n$
* (...in vectorized form) ------------ : y = $h_\theta$(x) = $\Theta$.x
不知何故,当此笔记本上载到GitHub时,第一部分没有正确渲染,而第二部分渲染正确,如下图所示:

在VSCode中打开此笔记本时,已正确呈现相同的标记文本:

我想问一下,如何通过Jupyter笔记本中的Markdown来解决呈现数学符号时的这种不一致性


上面提到的有问题的jupyter笔记本正在显示。

如果您查看原始文件,您可以看到它只包含一个带有该数学的标记单元格。所以GitHub的Jupyter渲染不承认这是数学,他们在引擎盖下使用了旧的nbconvert版本

但是,不使用双美元$$可能可以避免这个问题。通常,你会这样用降价法写下:

* linear regression model prediction: $y = \theta_0 + \theta_1x_1 + \theta_2x_2 + \theta_nx_n$
* in vectorized form: $y = h_\theta(x) = \Theta.x$