From here: https://ga7g08.github.io/2015/06/25/ipython-nbconvert-latex-template-to-hide-code/
- Create a file named
hidecode.tplx
in the directory of your notebook with the following content:
((*- extends 'article.tplx' -*))
((* block input_group *))
((*- if cell.metadata.get('nbconvert', {}).get('show_code', False) -*))
((( super() )))
((*- endif -*))
((* endblock input_group *))
- Export your jupyter notebook to pdf using the template:
$ jupyter nbconvert --to pdf --template hidecode Notebook.ipynb
Working with me, thanks