Depending on the version of IPython you are using, there are more or less hacker methods for removing Out [] hints.
Ipython 1.x
Assuming you are using latex_article base, a custom template (sphinx_template.tplx) with input blocks removed might look like
((* extends 'latex_article.tplx' *)) ((* block input *)) ((* endblock input *)) ((* block output_group *)) % Add remainer of the document contents below. ((* for output in cell.outputs *)) ((( render_output(output) ))) ((* endfor *)) ((* endblock *))
To permanently delete a prompt, you must use Sphinx's simple style mode, so use it as ipython nbconvert --to latex --SphinxTransformer.output_style=simple --template=sphinx_template.tplx test.ipynb
IPython Wizard
In the IPython class, additional cell styles have been added, see, for example, PR4112 . How to use these styles is shown, for example. in example1 and examples2 .
To summarize, here the template (bw_python.tplx) might look (with input)
((= This line selects the cell style. =)) ((* set cell_style = 'style_bw_python.tplx' *)) ((= This line inherits from the built in template that you want to use. =)) ((* extends 'latex_article.tplx' *))
This is used without additional parameters, hence ipython nbconvert --to=latex --template=bw_python.tplx test.ipynb
Jakob source share