Paginate

Introduction

The Paginate palette enables you to assign page numbers to one or more notebooks. You must paginate your source notebook(s) at least once before you generate a table of contents or index. Otherwise, the table of contents or index will not contain any page numbers.

1.gif

Paginating Notebooks

To paginate one or more notebooks:

1.  For a single notebook, open the notebook and make it the currently selected notebook. For multiple notebooks, open the Make Project dialog box and load the project file for your project. (If you have not already created a project file, see "Creating a Project File" to learn how.)

2.  Open the Paginate palette.

3.  Click Paginate.

Options for Pagination

The three buttons at the bottom of the palette enable you to specify options that control how the page numbers are assigned. To set the value of an option, click the button bearing the name of that option. This brings up a dialog box displaying the current value of the option. You can edit the text and click Apply for the changes to take effect. Click OK to close the dialog box.

Here are the options:

Pagination Programmatically

The Wolfram System kernel refers to any open notebook via an expression of the form NotebookObject[fe,id], where fe specifies the front end in which the notebook is open and id is a unique serial number for the notebook.

The command Notebooks[] returns a list of notebook objects corresponding to all notebooks currently open in the front end.

This assigns the variable nb to represent the first notebook object in the list.

Alternatively, you can identify a notebook by specifying the name and location of the notebook file. You can use the ToFileName function to construct a string specifying the full pathname of the file.

This loads the AuthorTools package.

This paginates the specified notebook. If the argument is a project file, the command paginates all notebooks in the project.

Paginate [ nb ]

This paginates all notebooks in a project. The setting StartingPages->"Next" means that the starting page for each notebook is the next page following the last page of the previous notebook.

Paginate [ projectfile , StartingPages -> "Next"]

Other possible settings for StartingPages are "Even", "Odd", Inherited, or a list of integers. The following command paginates all notebooks in a project and sets the starting page for the first four notebooks to be 1, 25, 57, and 83.

Paginate [ projectfile , StartingPages -> {1,25,57,83}]

The following paginates all notebooks in a project. The starting page number for each notebook in the project is inherited from the setting of the option StartingPageNumber for that notebook.

Paginate [ projectfile , StartingPages -> Inherited]