【发布时间】:2021-05-25 09:54:07
【问题描述】:
我想知道在导出到 Reveal.JS 时如何隐藏笔记本中的代码单元
【问题讨论】:
标签: python jupyter-lab reveal.js
我想知道在导出到 Reveal.JS 时如何隐藏笔记本中的代码单元
【问题讨论】:
标签: python jupyter-lab reveal.js
从一个幻灯片单元格开始,例如
I) 使用“Property Inspector”添加标签:
# In JupyterLab → Property Inspector → Cell Metadata
{
"tags": [
"remove-input"
]
}
II) 使用 nbconvert 手动转换为幻灯片,指定一个预处理器,该预处理器将删除具有给定标签的单元格中的输入,例如:
jupyter nbconvert Presentation.ipynb --to slides --no-prompt --TagRemovePreprocessor.remove_input_tags={\"remove-input\"} --post serve --SlidesExporter.reveal_theme=simple
输出的 html 文件将位于Presentation.slides.html。
基于this comment。
【讨论】: