I'm converting my IPython notebook to PDF, using the following command:
ipython nbconvert --to latex --post PDF <notebook_filename>
and can't figure out what extra option to give, such that my final PDF is rendered in landscape orientation (so that none of my Python code gets clipped).
Anyone know how to accomplish this?
Solution: A better, hassle-free option is to use an online converter which will convert the *.html version of your *.ipynb to *.pdf. First, from your Jupyter notebook interface, convert your *.ipynb to *.html using:
If you get a PDF document with a mix of landscape and portrait pages, you can use a PDF editor like PDFelement to change PDF pages from portrait to landscape or vice versa with the rotate PDF page tool to help you make all pages consistent in three simple steps! Step 1. Open a PDF File. Launch PDFelement and open the PDF file you want to edit.
Change Orientation of PDF with Page Right-click 1 Step 1. Open a PDF File#N#Launch PDFelement and open the PDF file you want to edit. Click on the "Open files" button in... 2 Step 2. Select "Rotate Pages" Tool#N#After opening a PDF file, find the PDF page you want to change orientation,... 3 Step 3. Change Orientation of PDF More ...
1 Open the terminal 2 Navigate to the folder containing the jupyter notebook 3 type "jupyter nbconvert --to pdf your_jupyter_notebook.ipynb "
You can firstly produce a .tex out of your .ipynb file and then edit it using your latex interface.
1) in your terminal use the following code:
ipython nbconvert --to latex your_notebook.ipynb
2) Open your file in a LaTeX interface and use the command below to change the look to landscape:
\documentclass[a4paper,landscape]{article}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With