python - Jupyter笔记本: Is there a way to fold sections while exporting to html

标签 python jupyter-notebook jupyter folding jupyter-contrib-nbextensions

我正在使用带有 jupyter-contrib-nbextensions 的 Jupyter 笔记本,我可以折叠其中的部分以及代码块。我想知道当笔记本导出为 html 时是否有办法保留折叠功能。目前,当我导出为 html 时,我无法折叠任何内容。如果笔记本很长,即使有目录,操作起来也会很麻烦。我将不胜感激这方面的任何想法。谢谢!

最佳答案

有趣的需求。我简要地研究了这一点。看起来 nbextensions 没有这个功能。我认为也许有两种选择,这两种选择都需要做很多工作:

  • 获取 html 文件并将其转换为某种允许级联样式表的形式,然后手动实现折叠
  • 如果您希望重复执行此操作并且具备相关技能,那么您可以查看 nbextensions 代码并尝试更改它以使其折叠

如果您发现任何其他选项或解决方案,请在此处发布。

关于python - Jupyter笔记本: Is there a way to fold sections while exporting to html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55306404/

相关文章:

python - numpy函数.fft.fft2()给出错误: “cannot do a non-empty take from an empty axis”(opencv,matplotlib,numpy,python27)

python - 在 Jupyter 笔记本 : the smooth way 的 matplotib 图形中打印光标坐标

python - 在 Jupyter 笔记本中使用 Matplotlib 进行交互式绘图时,图形未填充 Canvas

python - 为什么对 `fit` 的第二个 `GridSearchCV` 调用会无休止地工作?

python - 训练 Tensorflow LinearClassifier 时出现类型错误

jupyter-notebook - 有没有办法在集群上为 .ipynb 文件提交 Google Dataproc PySpark 作业?

python - Keras - [0-100] 范围内数字的目标函数

python - 通过固定大小的python数据套接字发送整数

python - 在wxpython中将变量从一个类传递到另一个类

python - 属性错误: type object 'Callable' has no attribute '_abc_registry'