GlaceCelery
GlaceCelery

Reputation: 1033

JupyterLab + Reveal.JS → How to hide code cells?

I would like to know how to hide the code cells in my notebook when exporting to Reveal.JS

Upvotes: 4

Views: 2459

Answers (1)

krassowski
krassowski

Reputation: 15379

Starting with a cell that is a slide, e.g.

enter image description here

I) Add a tag using "Property Inspector":

# In JupyterLab → Property Inspector → Cell Metadata
{
    "tags": [
        "remove-input"
    ]
}

enter image description here

II) convert to slides manually using nbconvert, specifying a pre-processor that will remove inputs in cells with given tag, e.g.:

jupyter nbconvert Presentation.ipynb --to slides --no-prompt --TagRemovePreprocessor.remove_input_tags={\"remove-input\"} --post serve --SlidesExporter.reveal_theme=simple

result

The output html file will be in Presentation.slides.html.

Based on this comment.

Upvotes: 3

Related Questions