The main menu
The `main TeX file' is the file containing the preamble (i.e., definitions, macros and
the like) and maybe several
input commands. In our example this is
An `include TeX file' is a file that is included in the main file, e.g.,
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:
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
TeX files pathwill be set accordingly.
TeX files pathwith the currently chosen file extension. Also, all subdirectories and the `mother' directory are shown. Use the cursor keys and [Enter] to search the directory tree and select a file. To make it easier to remember what is in a file, the first line of the file or the 4dos description is also shown (depending on the setting of
change Include TeX file.
change Include TeX file
change Main TeX file, except that on pressing [Esc] the field
TeX file will be cleared.
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
change files eXtensions
By default the file extensions of both the main and the include file are
can change them in case you use different extensions like
.ltx, or perhaps to
simultaneously edit a LaTeX file and a LaTeX style file (
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
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).
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.
Compile TeX file
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
main TeX fileand 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 filebefore compilation.
shows the logfile created by TeX during the last compilation of the
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
loads the 4TeX output menu that provides for viewing and printing the
file. See below for a description of the commands in this menu.
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
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
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.
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.
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
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.
Backup TeX files
backups all relevant files (i.e., new and updated files) in the
directory and its subdirectories. The texfiles home directory is set in
by the environment variable
. Backups are made to the directory set
in the environment variable
and displayed in the field
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
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
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
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
system.set), the scratch files will remain on disk.
These files are:
remove them, you only need to restart 4TeX with any parameter (e.g.,
/r) and quit
again. Naturally you must correct the file
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
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
.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]