I have a notebook (assume the notebook name is notebook for now, even though it isn't) that I currently run using the following command: jupyter nbconvert --to pdf --execute notebook.ipynb
. I want the output to be a pdf, not html so I add the --to pdf
. While this runs successfully, I do not want the code cells at the top to show such as my imports and function definitions. Using the edit metadata under view (toolbar), I changed the cells at the top to "hide_input": true
.
From my research, it seems that a template is the best way to hide the code cells. However, I am not sure how to use these correctly. I create a .tplx
file in my working directory that follows the printviewlatex.tplx code here (I directly copied the code and pasted into a file in the same directory as my notebook): https://github.com/mandli/IPython-notebook-extensions/blob/master/templates/printviewlatex.tplx. However, it does not work and I don't fully understand the errors. I have included a snippet of what popped up in my terminal, in case that helps.
I know the pdf generated properly without the template, so there must be an issue with that itself or how I am currently using it. I would love any thoughts on how to fix this, or even other approaches to hide the code input. Ultimately, that is my goal so I am okay with any solution, template or no template. Thank you!