Q & A: Print part of notebook

Question.  How do I print just part of a Mathematica notebook?

Answer. You can easily print any part of a notebook that consists of cells that you can select together. Here are three methods.

Method 1: Select cells and use Print Selection.

This method is quickest. But you´ll have to do it for each set of pages you want, and you´ll have to do it all over again if you print again.

  1. Select the cells you want to print by selecting their cell brackets (or, if the cells are in a group, just select the group´s bracket!).
  2. From the File menu select Print Selection.

Method 2: Paste into a new notebook and print from there.

This method is quick.  But you´ll have to do it for each set of pages you want, and you´ll have to do it all over again if you print again.

  1. From the File menu select New to create a new, blank notebook.
  2. Select the cells you want to print by selecting their cell brackets (or, if the cells are in a group, just select the group´s bracket!).
  3. Print the new notebook in the usual way.

Method 3: Insert page breaks using the Option Inspector.

This method leaves the printing page breaks where you insert them. You´ll have to use the analogous procedure to remove the inserted page breaks.

  1. Select the cell just after where you want the page to break by clicking its bracket.
  2. From the Format menu select Option Inspector.
  3. Make sure the Show option values for field says Selection (if not, choose Selection from the drop-down list).
  4. Expand the Cell Options section in the Option name outline by clicking the + next to its entry; then similarly expand the Page Breaking sub-section.
  5. Change the setting for the PageBreakAbove item from Automatic to True (select True from the drop-down list you get by clicking on the little down-arrow at the far right of the PageBreakAbove item line.)
  6. Click the Apply button on the Option Inspector dialog box..
  7. With the Option Inspector dialog box still open, click on another cell above which you want to insert a page break and repeat Steps 2–6.
  8. Close the Option Inspector dialog box when you are done.

You can see the page breaking settings applied to a cell by clicking anywhere in the cell (or clicking its cell bracket) then and selecting Show Expression from the Format menu. This shows the ASCII text that the Mathematica front end uses to display the cell.  Select Show Expression again to toggle the cell back to ordinary display in notebook format.

Method 4: Insert pagebreaks by editing the notebook expressions for the cells where you want the breaks.

Like Method 3, this method leaves the printing page breaks where you insert them.  It´s quicker than Method 3, but you have to be very careful not to introduce errors into the cell expression.

  1. Click anywhere in a cell (or on its bracket) above which you want a printing page break.
  2. Select Show Expression from the Format menu. This shows the ASCII text that the Mathematica front end uses to display the cell. Select Show Expression again to toggle back to ordinary display of the cell in notebook format.
  3. Just before the closing ] in the cell expression you see, insert the text:

       , PageBreakAbove->True
     
  4. Select Show Expression again from the Format menu to toggle the cell back to ordinary front end display.
[Home] [News] [Homework] [Files] [Exams] [Notes] [Policy] [Links]