Next: Page Layout submenu Up: Document-related commands Previous: Document-related commands

### Documents submenu

| New Document | <SHF CMD N> |

Use this command to open a new window in TeX mode. Choose New Document or press <SHF CMD N> to bring up a dialog with a pop-up menu of standard document types. This will create a new TeX window, insert a document of the requested type, and automatically run the options command (which is still on the Documents submenu). The old commands article, letter, etc. will be found on the Insert Document subsubmenu (discussed below). Each such command behaves as it did before, that is, it inserts a document template into an empty window or wraps the entire contents of the current window.

| article |  |
| report |  |
| book |  |
| letter |  |
| slides |  |
| generic... |  |

Choosing one of these document templates from the Documents submenu either inserts the desired template at the insertion point, or if there is a current selection, the selection is wrapped up inside the chosen template. In either case, the insertion point is positioned at the beginning of the template where the user may enter any specific document class options that may be required (standard options include `11pt`, `twoside` and `twocolumn`, for example). If none are desired, simply skip over this part of the template (it's okay to leave the square brackets empty). See the options command below for more information on document class options.

| options... |  |
| usepackage | <CTL OPT U> |

The options command presents the user with a dialog box and a list of standard document class options. Choosing one of these options or typing a name into the text box of the dialog inserts the chosen option into the current document at the appropriate place. See the bug list in section 1.7 for a caveat, however.

When you insert a LaTeX document template into the current window, you get one `\usepackage` command by default. To insert another `\usepackage` immediately after the `\documentclass` command, choose the usepackage command on the Documents submenu or press <CTL OPT U>.

| filecontents... |  |
| filecontents All |  |

To facilitate file transfer, LaTeX2e now has a `filecontents` environment that contains the source of a LaTeX auxiliary file or input file. Issuing this command brings up a standard file dialog. After locating the file to be included, `latex.tcl` wraps the file inside a `filecontents` environment and inserts it at the beginning of the document.

There is also a filecontents All command that scans the current document and prepends one `filecontents` environment for each custom package or class file in the current folder. Local files read by `\input` or `\include` are also attached, as well as `.bib` and `.bst` files.

| Rebuild Documents Submenu |  |

This command rebuilds the Documents submenu on-the-fly. It's a temporary fix until I think of a better way to handle the Packages submenu. The Packages submenu contains a list of all packages known to the TeX application. Choosing one of these packages inserts the corresponding `\usepackage` command into the preamble of the current document. To build this submenu, enable the flag buildPkgsSubmenu as described in section 1.4.1, and then choose Rebuild Documents Submenu on the Documents submenu.

Next: Page Layout submenu Up: Document-related commands Previous: Document-related commands