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.
- 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!).
- 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.
- From the File menu select New to create a new, blank notebook.
- 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!).
- 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.
- Select the cell just after where you want the page to break by clicking its bracket.
- From the Format menu select Option Inspector.
- Make sure the Show option values for field says Selection (if not, choose Selection from the drop-down list).
- 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.
- 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.)
- Click the Apply button on the Option Inspector dialog box..
- 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.
- 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 (advanced): Insert page breaks 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.
- Click anywhere in a cell (or on its bracket) above which you want a printing page break.
- 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.
- Just before the closing ] in the cell expression you see, insert the text:
, PageBreakAbove->True
- Select Show Expression again from the Format menu to toggle the cell back to ordinary front end display.
|