Ipython notebook align Latex equations in Ipython.Display module

隐身守侯 提交于 2019-12-06 04:17:56

I'm not sure how familiar you are with LaTeX, but the notebook does allow you to use things like \begin{align}, allowing you to organize things into columns by separating them with & symbols. For example, this works if you enter it into a Markdown cell:

$$
\begin{align}
a = \frac{1}{2} && b = \frac{1}{3} && c = \frac{1}{4} \\
a && b && c
\end{align}
$$

This also works using display(Math()), e.g.:

display(Math(
r"""
\begin{align}
a = \frac{1}{2} && b = \frac{1}{3} && c = \frac{1}{4} \\
a && b && c \\
1 && 2 && 3
\end{align}
"""))

Giving you this output:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!