In a Jupyter notebook I am trying to hide the code such that when I print to a pdf or some other format the code will not display.
To do this I have added the tags suggested here, as shown in the screenshot. I have also tried using hide-cell, hide-input, hide-output, etc.
Then when I print to PDF the code cell still shows.
I have also tried using both of these nbconvert commands:
- [Stack Overflow Link] jupyter nbconvert --to pdf "notebook_name.ipynb"
- [StackOverflow Link] jupyter nbconvert --to pdf "notebook_name.ipynb" --TagRemovePreProcessor.remove_cell_tags={"remove-cell"}
Nothing seems to work, the code continues to show every time I export or print.
The closest I have come is using the nbextension "Hide Input" but this does not persist on print or export.
Can someone please help me figure this out? Is this just not possible?
jupyter --version
Selected Jupyter core packages...
IPython : 8.4.0
ipykernel : 6.15.0
ipywidgets : 7.7.0
jupyter_client : 7.3.4
jupyter_core : 4.10.0
jupyter_server : not installed
jupyterlab : not installed
nbclient : 0.6.4
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : 5.3.1
traitlets : 5.3.0
