如何在jupyter中编写LaTeX(不仅仅是方程式)

时间:2016-02-10 17:16:16

标签: latex jupyter

是否可以在jupyter中编写LaTeX?似乎IPython.display.Latex仅支持LaTeX方程的子集。特别是我想使用\tabular和其他LaTeX命令(HTML不是一个选项)。

2 个答案:

答案 0 :(得分:1)

您应该查看https://github.com/ipython-contrib/IPython-notebook-extensions中的latex_envs扩展名(从此repo安装,它是最新版本 - 按照自述文件中的说明操作)。这里有一些文档https://rawgit.com/jfbercher/latex_envs/master/doc/latex_env_doc.html

答案 1 :(得分:0)

我最近在Jupyter实验室尝试过此操作。将单元格标记为“原始”。然后:

   %%latex

  \bf{This is a test} \\
 It allows latex $\alpha=\beta$ and test:

 \begin{equation}
 \alpha = \beta
 \end{equation}
 % this is a latex comment

然后选择文件->将笔记本导出为-> PDF