How to get terrain orientation when converting IPython to PDF?

I am converting my IPython notebook to PDF using the following command:

ipython nbconvert --to latex --post PDF <notebook_filename> 

and cannot figure out which optional parameter to give, so my final PDF file is displayed in landscape orientation (so that none of my Python codes are cropped).

Does anyone know how to do this?

+5
source share
1 answer

You can first extract the .tex from your .ipynb file, and then edit it using the latex interface.

1) in your terminal use the following code:

ipython nbconvert --to latex your_notebook.ipynb

2) Open the file in the LaTeX interface and use the command below to change the appearance in landscape orientation:

 \documentclass[a4paper,landscape]{article} 
+2
source

Source: https://habr.com/ru/post/1215936/


All Articles