我想知道如何在导出到 Reveal.JS 时隐藏笔记本中的代码单元
最佳答案
从幻灯片单元格开始,例如
I) 使用“属性检查器”添加标签:
# 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 .
关于python - JupyterLab + Reveal.JS → 如何隐藏代码单元?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67685650/