【问题标题】:JupyterLab + Reveal.JS → How to hide code cells?JupyterLab + Reveal.JS → 如何隐藏代码单元?
【发布时间】:2021-05-25 09:54:07
【问题描述】:

我想知道在导出到 Reveal.JS 时如何隐藏笔记本中的代码单元

【问题讨论】:

    标签: python jupyter-lab reveal.js


    【解决方案1】:

    从一个幻灯片单元格开始,例如

    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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-20
      • 2021-04-10
      • 2022-07-03
      • 1970-01-01
      相关资源
      最近更新 更多