Jupyter 笔记本中的公式编号 [英] Equation numbering in Jupyter notebooks

查看:47
本文介绍了Jupyter 笔记本中的公式编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

事实是,在官方文档Jupyter - 激励示例 支持

The fact is, that in official documentation Jupyter - motivating examples stands

等式编号和引用将在 Jupyter notebook 的未来版本中提供.

Equation numbering and referencing will be available in a future version of the Jupyter notebook.

我知道有很多关于这个话题的讨论.有些人声称可以通过一些变通方法解决此问题.

I know there is a lot of discussion about this topic. There are some people who claim to solve this issue with some workarounds.

但对于普通用户来说,很难理解变通方法,或者黑客真正的肮脏/有用.

But for ordinary user it is hard to understand the workarounds, or how dirty/useful the hacks really are.

所以我的问题是:

  1. 在未来版本中可用"是什么意思?它的意思是新的一个月/一年"还是可能永远不会,因为太不可能了"之类的意思?

  1. what means the "available in future version"? Does it mean something like "new month/year" or something like "probably never because it is too impossible"?

互联网上提供的任何解决方法是否对人类安全是安全的?我的意思是值得吗?因为可以使用Sphinx或其他东西来创建教程,所以工作量会更多,但是实现一些hack,安装插件等工作会更多吗?

If any of the workarounds provided on the Internet safe for a human consumption? I mean is it worthy? Because it is possible to use Sphinx or something else for creation of tutorials, it will be more work, but it will be more work that implementing some hacks, installing plug-ins and so on?

注意:对于某些人来说,这似乎是一个需要基于意见的答案的问题,但我很确定它不是.任何建议都可以帮助我(或其他用户)做出正确/错误的决定.

Note: For somebody it could seems to be a question requiring opinion based answer, but I am pretty sure it is not. Any advice can help me (or others users) to make a good/bad decision.

推荐答案

我相信基本上所有与这个问题相关的信息都可以在这个长篇 Github issue 线程.

I believe that essentially all information relevant to this question can be found in this long Github issue thread.

那里的对话已经进行了(此时)3.5 6.5 8 年并且仍然活跃.重要亮点:

The conversation there has been ongoing for (at this moment) 3.5 6.5 8 years and is still active. Important highlights:

  • 您可以通过执行包含以下内容的单元格来非常简单地打开编号:

  • You can very simply turn on numbering by executing a cell with the following content:

%%javascript
MathJax.Hub.Config({
    TeX: { equationNumbers: { autoNumber: "AMS" } }
});

  • 有一个扩展 用于等式编号.

    开发人员 minrk 认为这个扩展是正确的方法,可以合并到 master 中(但默认情况下会关闭该功能).

    Developer minrk has suggested that this extension is the right approach and could be merged into master (but the functionality would be turned off by default).

    通过pip安装扩展:

    pip install jupyter_contrib_nbextensions
    

    通过扩展.com/" rel="nofollow noreferrer">蟒蛇:

    To install the extensions via Anaconda:

    conda install -c conda-forge jupyter_contrib_nbextensions 
    

    使用上面提供的一种安装方式后,启用扩展:

    After using one of the ways to install provided above, enable the extension:

    jupyter contrib nbextension install --user
    jupyter nbextension enable equation-numbering/main
    

    这篇关于Jupyter 笔记本中的公式编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆