%%bash ipython nbconvert '04 - Custom Display Logic.ipynb' %%bash ipython nbconvert --to=html '04 - Custom Display Logic.ipynb' %%bash ipython nbconvert --to=latex '04 - Custom Display Logic.ipynb' %%bash ipython nbconvert --to=latex '04 - Custom Display Logic.ipynb' --post=pdf pyfile = !ipython nbconvert --to python '04 - Custom Display Logic.ipynb' --stdout for l in pyfile[20:40]: print l %%writefile simplepython.tpl {% extends 'python.tpl'%} {% block markdowncell -%} {% endblock markdowncell %} ## we also want to get rig of header cell {% block headingcell -%} {% endblock headingcell %} ## and let's change the appearance of input prompt {% block in_prompt %} # This was input cell with prompt number : {{ cell.prompt_number if cell.prompt_number else ' ' }} {%- endblock in_prompt %} pyfile = !ipython nbconvert --to python '04 - Custom Display Logic.ipynb' --stdout --template=simplepython.tpl for l in pyfile[4:40]: print l print '...' %%bash # ipython nbconvert --to html --template= %loadpy soln/coloreddiff.tpl # ipython nbconvert --to html '04 - Custom Display Logic.ipynb' --template=soln/coloreddiff.tpl