Adding page breaks to PDFs

When you open your PDF, you may find that page breaks occur in the middle of your code or visualizations. You can add custom page breaks to PDFs by inserting a line of code into an nteract markdown cell. This creates a page break between the notebook cell above and below it. Here are the steps for creating a page break:

  1.  Select the M↓ symbol on the left (highlighted in the following screenshot) to create a new markdown cell:

  1.  Click on the cell and add the following line of code:
<div style="page-break-after: always;"></div>

The preceding code creates a tag that tells nteract to place a page break after the preceding cell.

  1. As shown in the following screenshot, after adding the code, your page break cell will appear in your notebook as a blank bar:

  1. Export the notebook file as a PDF. Page 1 will contain notebook cell 1, while page 2 will start with notebook cell 2.

You can add as many page breaks as you like throughout your document.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.210