<bdo id='U6iK5'></bdo><ul id='U6iK5'></ul>

  • <i id='U6iK5'><tr id='U6iK5'><dt id='U6iK5'><q id='U6iK5'><span id='U6iK5'><b id='U6iK5'><form id='U6iK5'><ins id='U6iK5'></ins><ul id='U6iK5'></ul><sub id='U6iK5'></sub></form><legend id='U6iK5'></legend><bdo id='U6iK5'><pre id='U6iK5'><center id='U6iK5'></center></pre></bdo></b><th id='U6iK5'></th></span></q></dt></tr></i><div id='U6iK5'><tfoot id='U6iK5'></tfoot><dl id='U6iK5'><fieldset id='U6iK5'></fieldset></dl></div>
  • <tfoot id='U6iK5'></tfoot>

    1. <small id='U6iK5'></small><noframes id='U6iK5'>

        <legend id='U6iK5'><style id='U6iK5'><dir id='U6iK5'><q id='U6iK5'></q></dir></style></legend>

        使用 IPython.display.Latex 时,LaTeX 方程不会在谷歌 Colaboratory 中呈现

        LaTeX equations do not render in google Colaboratory when using IPython.display.Latex(使用 IPython.display.Latex 时,LaTeX 方程不会在谷歌 Colaboratory 中呈现)
        <i id='mwfIe'><tr id='mwfIe'><dt id='mwfIe'><q id='mwfIe'><span id='mwfIe'><b id='mwfIe'><form id='mwfIe'><ins id='mwfIe'></ins><ul id='mwfIe'></ul><sub id='mwfIe'></sub></form><legend id='mwfIe'></legend><bdo id='mwfIe'><pre id='mwfIe'><center id='mwfIe'></center></pre></bdo></b><th id='mwfIe'></th></span></q></dt></tr></i><div id='mwfIe'><tfoot id='mwfIe'></tfoot><dl id='mwfIe'><fieldset id='mwfIe'></fieldset></dl></div>

            1. <legend id='mwfIe'><style id='mwfIe'><dir id='mwfIe'><q id='mwfIe'></q></dir></style></legend>
                  <tbody id='mwfIe'></tbody>

                  <bdo id='mwfIe'></bdo><ul id='mwfIe'></ul>

                  <small id='mwfIe'></small><noframes id='mwfIe'>

                  <tfoot id='mwfIe'></tfoot>

                • 本文介绍了使用 IPython.display.Latex 时,LaTeX 方程不会在谷歌 Colaboratory 中呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在常规的 jupyter 笔记本中,运行例如以下内容:

                  In a regular jupyter notebook, running, for example, the following:

                  from IPython.display import display, Math, Latex
                  display(Math(r'F(k) = int_{-infty}^{infty} f(x) e^{2pi i k} dx'))
                  

                  生成一个用 LaTeX 渲染的方程(通过 Mathjax).

                  produces an equation rendered in LaTeX (via Mathjax).

                  尽管 LaTeX 在 markdown 单元格中运行良好,但如上生成的 LaTeX 方程似乎无法在 Google Colaboratory 中呈现.同样的情况也发生在函数的输出上,例如来自 qutip 的函数,它通常会在乳胶中呈现(例如,qutip.basis(2, 0) 通常会在乳胶中呈现,但不会在 Colaboratory).

                  Even though LaTeX works fine in markdown cells, LaTeX equations produced as above do not seem to render in Google Colaboratory. The same happens to the output of functions for example from qutip, which would normally render in latex (for example, qutip.basis(2, 0) would normally render in latex, but doesn't in Colaboratory).

                  为什么会这样?有没有办法完成这项工作?

                  Why does this happen? Is there a way to have this work?

                  推荐答案

                  更新(2021 年 4 月):

                  可以在 Colab 中编写公式,只需将它们放在 $ 符号之间,无需导入库:

                  It's possible to write formulas in Colab just putting them between $ symbols, with no need to import libraries:

                  $F(k) = int_{-infty}^{infty} f(x) e^{2pi i k} dx$
                  


                  旧答案

                  作为替代方案,以下描述应适用于 Colab 上的文本单元格.

                  As an alternative, the following description should work on text cell on Colab.

                  egin{equation}
                  
                  F(k) = int_{-infty}^{infty} f(x) e^{2pi i k} dx
                  
                  end{equation}
                  

                  这篇关于使用 IPython.display.Latex 时,LaTeX 方程不会在谷歌 Colaboratory 中呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

                  • <bdo id='yMQRw'></bdo><ul id='yMQRw'></ul>

                      <i id='yMQRw'><tr id='yMQRw'><dt id='yMQRw'><q id='yMQRw'><span id='yMQRw'><b id='yMQRw'><form id='yMQRw'><ins id='yMQRw'></ins><ul id='yMQRw'></ul><sub id='yMQRw'></sub></form><legend id='yMQRw'></legend><bdo id='yMQRw'><pre id='yMQRw'><center id='yMQRw'></center></pre></bdo></b><th id='yMQRw'></th></span></q></dt></tr></i><div id='yMQRw'><tfoot id='yMQRw'></tfoot><dl id='yMQRw'><fieldset id='yMQRw'></fieldset></dl></div>
                      <tfoot id='yMQRw'></tfoot><legend id='yMQRw'><style id='yMQRw'><dir id='yMQRw'><q id='yMQRw'></q></dir></style></legend>
                      • <small id='yMQRw'></small><noframes id='yMQRw'>

                              <tbody id='yMQRw'></tbody>