[next] [tail] [up]

4.1 The main menu 

Before a detailed description of all the commands in the main menu is given, we will first explain some of the terminology used in 4TeX.

The `main TeX file' is the file containing the preamble (i.e., definitions, macros and the like) and maybe several \include or \input commands. In our example this is the file book.tex.

An `include TeX file' is a file that is included in the main file, e.g., chap1.tex. Such a file typically contains part of the text that is to be typeset by TeX, and here the definitions and macros of the main file are actually used. If you are working on a large document it makes sense to cut up the complete text into logical parts like chapters or sections, each in a separate include file. Of course, if the document at hand is only a small one, the text can be part of the main TeX file and no include TeX file needs to be defined.

The `TeX files path' is the subdirectory where TeX looks for the main and include files.

The remainder of this section will describe the key combinations that can be used in the main menu:

[M] change Main TeX file
clears the field main TeX file (and also the field include TeX file), and another main file can be chosen. There are essentially three different ways to do this:

Note: using the [Esc] key at any moment during the procedure described above will restore the previous situation. This remark applies to all similar situations, except for change Include TeX file.

[I] change Include TeX file
similar to change Main TeX file, except that on pressing [Esc] the field include TeX file will be cleared.

[P] change TeX files path
clears the field TeX files path and another subdirectory can be chosen. If you enter a directory name with wildcards (or an empty one) 4TeX will display a list of all directories that satisfy the wildcard specification. By using the cursor keys you can select the directory you want. Using this approach you do not have to type the whole directory name (correctly) but only a few letters are often enough. Press [Esc] to restore the directory name to the old setting.

[X] change files eXtensions
By default the file extensions of both the main and the include file are .tex. You can change them in case you use different extensions like .ltx, or perhaps to simultaneously edit a LaTeX file and a LaTeX style file (.sty).

[E] Edit file(s)
invokes the editor chosen in texuser.<os>. Both the main file and the include file are loaded into the editor, the latter is shown and ready for editing.
Although it is possible to use any ascii editor you like, we recommend MS-Dos-users to use TSE junior (shareware by Semware) or tse (commercial software by Semware). At the moment these are the only editors that are fully supported by 4TeX, in the sense that the facilities described in Section 5.1 are only implemented for TSE junior and tse. Windows 95/NT-users we recommend to use the PFE editor (freeware).

[F] choose TeX Format
presents a selection menu showing all the formats (such as plain TeX and LaTeX) that are installed on your system. Select by using the cursor keys and press [Enter]. The difference between the huge versions and the normal format versions is that with huge the huge emTeX compiler (larger memory settings) are used when compiling your document.

[C] Compile TeX file
compiles the main TeX file using the current TeX format. TeX writes all sorts of information on the screen, for instance page numbers and the currently processed include file. If an error occurs, TeX interrupts processing and asks the user to intervene. Press [F1] or [H] to get help. One possibility is to press [E] (followed by [Enter] ). This has the following effects

  1.  compilation is aborted
  2.  the main TeX file and the include file that contains the error are loaded into the editor. Note that this is not necessarily the include file that was selected as the include TeX file before compilation.
  3.  the cursor is positioned in the file at the beginning of the line containing the error.
The user can correct the error and start compilation once more.
Note: This option can also be used in block compiling (see Section 5.1).

[L] show Logfile
shows the logfile created by TeX during the last compilation of the main TeX file. This file contains all remarks and error messages shown on the screen during compilation and a bit more (statistics on memory usage etc.). Under MS-Dos the file is displayed using the internal 4dos command list. Press [Esc] to quit. Under Windows 95/NT the program QuickEdit is used instead.

[O] manage Output
loads the 4TeX output menu that provides for viewing and printing the main TeX file. See below for a description of the commands in this menu.

[S] check Spelling
checks and correct the spelling of the include TeX file or the main TeX file if no include file is selected. This is done by the program amSpell, public domain software by A. Merckens. First a selection menu is presented, showing all languages supported. At this moment Dutch, US English, UK English, French, German, Italian, South-African, and Spanish are supported. Use the cursor keys and press [Enter] to select one.

If only the main file (no include file) is specified, 4TeX will ask whether you would like to spell-check all files that the main file \inputs or \includes. If so, 4TeX will invoke amSpell for each file it finds included in the main file. Input statements may be nested to almost any level.

See Section 7.3 for documentation of amSpell. If you only want to select the document language (e.g., for use of word spell-checking while editing a file) you can use the [Ctrl][L] within the main menu and select a language.

[U] run Utilities
displays a selection menu containing the utilities implemented in 4TeX. Use the cursor keys and [Enter] to select. Many of these utilities will display a submenu. The commands available in these submenus are discussed in Sections 4.3-4.10.

[D] execute Dos command
executes a single dos command. The user is prompted for the command. After execution 4TeX will wait for you to press either [D] to enter another dos command, or any other key to return to return to the main menu.

To execute more than one dos command, use [F9] to shell to dos. At start up 4TeX saves all 4dos aliases (and also the environment and 4dos history) to disk and removes them from memory. They are temporarily reloaded on shelling to dos. To return to 4TeX, enter

Shelling to dos is possible in all 4TeX menus and in the supported editors.

Within 4TeX it is also possible to add, edit and run user specific utilities. This is done by pressing [F5]. This option is available in all 4TeX menus and in the TSE editors.

[B] Backup TeX files
backups all relevant files (i.e., new and updated files) in the texfiles home directory and its subdirectories. The texfiles home directory is set in texuser.<os> by the environment variable TEXFILES. Backups are made to the directory set in the environment variable BACKUP_PATH and displayed in the field backup path : a:\, which is also set in texuser.<os>. Unless stated otherwise in texuser.<os>, a backup is made automatically on quitting 4TeX. Backups can be made using the MS-Dos program Xcopy (default) or archivers like Arj or PKZip.

[Q] Quit
quits the 4TeX workbench. On exit a backup is made (see above), several scratch files created by 4TeX are deleted. Also, an options file (e.g., book.opt) is written. Among other things, this file contains information about the language used in the document and which TeX format was used.1 This information is read if the file book.tex is again loaded as Main TeX file. In this way, the user does not have to supply this information over and over again each time a file is loaded. Moreover, it safeguards the user from time-wasting experiences such as accidental compilation of a SliTeX input file by LaTeX. The file 4texpars.<os> is written at this time (see Section 3.6).

To prevent that you pressed [Q] or [Esc] unintentionally, you will be asked for confirmation before you really quit. You can set the ASKQUIT variable in texuser.<os> to skip the confirmation.

If for some reason 4TeX is disrupted in some other way (e.g., due to wrong settings in the files texuser.<os> and system.set), the scratch files will remain on disk. These files are: _4tex_, keepenv.set, histfile, aliasfil and 4texpars.<os> To remove them, you only need to restart 4TeX with any parameter (e.g., /r) and quit again. Naturally you must correct the file system.set and/or texuser.<os> first.

4.1.1 Shortcuts and extras 

4TeX supports the following extra key combinations in the main menu:

View the output of the current main TeX file. This is a shortcut to going to the output menu, pressing [V] (view output) and returning to the main menu.

Compile the main TeX file and view it. A shortcut for `run'.

By using this key combination you can toggle TeX's batch mode. By default batch mode is off, meaning that TeX will halt at any error that it encounters while compiling a text. In batch mode it will continue as best as it can, not showing any error messages on screen. In case you use tse as your editor you can jump from one error to the next using the key combination [Ctrl][N][E] (next error) while editing (see also Section 5.1).

The emTeX dvi viewer comes in two versions: a `normal' one (DviScr) and a `small' one (DviScrS). The latter needs less memory but is a bit slower. In case you want to view a dvi file that calls many fonts the `normal' viewer may run out of memory and abort. By toggling to the `small' version you may still be able to view the output.

The emTeX compilers support several parameters for runtime memory settings. 4TeX sets them to appropriate values whenever you choose a format file. However, in some circumstances you may need to adjust them. Parameter stack, font memory, main memory, semantic nest size, pool size, save size and pattern memory can be dynamically changed. 4TeX will display defaults and ranges of these parameters, and enables you to change their current values.

Select a language for spell-checking. A selection menu is presented, showing all languages supported. At this moment Dutch, US English, UK English, French, German, Italian, South-African, and Spanish are supported. Use the cursor keys and press [Enter] to select one.

Toggle between the MS-Dos version and the Windows 95/NT version of Ghostscript. This option is introduced since the MS-Dos version is slightly quicker than the Windows 95/NT version.

Reindex the directory trees. 4TeX uses the 4dos directory navigation. For this purpose a index files has to be generated and from to time this file has to be reindexed, so 4dos can find al the newly created directories. The index is saved in the file jpstree.idx.

Toggle devirtualizing fonts. If you get memory errors when running the emTeX viewers, or when you view the .dvi file with DVIwin you need to devirtualize the .dvi file. The .dvi file is devirtualized by the program DVIcopy. This takes some extra time, hence the toggle. See also Section 4.2.

[PgUp] or [PgDn]
Using the [PgUp] or [PgDn] key a history list of the last 10 selections of the main/include file are presented. You can use the cursor keys to select the main/include file you want, or press the [Esc] to abort history selection.

[next] [front] [up]