我想知道导出到 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
.
基于这条评论 https://github.com/jupyterlab/jupyterlab/issues/4100#issuecomment-370938358.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)