|Handling a Project
|Creating a Project File
|Processing Multiple Notebooks Programmatically
The Make Project dialog box makes it easy to set up and manage projects involving multiple notebooks. For example, you can use this dialog box to generate a unified table of contents or index for a set of notebooks.
The first step in processing multiple notebooks is to create a project file. This is a file that specifies the names and location of all notebooks in a project. You can create any number of project files, one for each project you are working on. Each project file has a .m suffix.
2. Click Load and choose the project file you need. (If you have not already created a project file, see "Creating a Project File" to learn how.)
The first step in processing multiple notebooks is to create a project file. This is a file that specifies the names and locations of all notebooks in a project. You will need to create a different project file for each project you are working on.
- Enter the project data in the text fields of the Make Project dialog box. (See "Creating a Project File" for details.)
- Use the command WriteProjectData[file,data], where data specifies the project data in the list format shown in the preceding box.
Once you have created a project file, you can process all notebooks in the project in one step. To do this, you simply specify the project file as the argument to the AuthorTools function you want to use.
For example, to generate a table of contents for a project, you can evaluate the command MakeContents[projectfile,"Book"]. The command for generating a table of contents for a single notebook is MakeContents[nb,"Book"].
When you evaluate an AuthorTools function with a project file as an argument, the Wolfram Language uses Get to read in the project file. Any Wolfram Language commands present in the project file are evaluated at this time. Thus, the project file is a convenient place to store commands that you want to apply to a project.
This sets the option SelectedCellStyles of the AuthorTools function MakeContents. If you then use MakeContents to create a table of contents for that project, the option setting specified in the project file will be automatically used, overriding the default behavior of MakeContents.
Note: Any commands you have added to a project file will be overwritten if you use the WriteProjectData function or the Make Project dialog box to modify the project file.