The compilers tex86.exe
tex186.exe
btex86.exe
btex186.exe
tex386.exe
htex386.exe
However, in 4TeX only the 80386 versions are used, i.e., tex386.exe
and
htex386.exe
.
These programs use the emx dos-extender by default. If they detect there is no vcpi-host, but there is a dpmi-host, they will use the rsx dos-extender instead. This situation is likely to occur if you run 4TeX in an MS-Dos-box under MS-Windows or os/2.
If your machine doesn't have at least 3MB of memory, [h]tex386
may run very
slowly. You'll need even more memory if a large part of it is already occupied (RAM
disks, operating system).
In case you find that TeX cannot compile a file because its capacity is exceeded (it will write such a message on screen and in the log file), and you are sure the TeX code is correct, you may need to use the huge version of the TeX compiler (see above).
The TeX compilers have default values for memory settings which can be changed
to some extend by setting the environment variable EMTEXOPT
. In section 5.2.2 some
settings are listed. See the emTeX documentation (use [F3]) for more details and the
[Ctrl][E] key in the main menu (Section 4.1).
The variable EMTEXOPT
can be changed by pressing [Ctrl][E] in the main menu.
4TeX will show the current setting and all possible parameters and their ranges. You
can edit the current setting. Press [Enter] when you have finished editing, and you
will return to the main menu.
Note: The variable EMTEXOPT
is automatically reset to its default by 4TeX each
time you choose a new main file or format file.
5.2.1 Preparation
The remainder of this section is of interest mainly for those who want to set up their own system. Or maybe you are just curious about what happens behind the scenes.
In order to make installation easier we define the environment variable
EMTEXDIR
which denotes the root of the complete 4TeX system, e.g. if you
have installed 4TeX on the
c:
drive you set EMTEXDIR=C:
\
EMTEX. In case
you run 4TeX from CD-rom and your CD-rom drive is drive D: you set
EMTEXDIR=D:
\
EMTEX.4
TeX also needs some environment variables that tell it where to look for its files:
\
tfm.tfm
files that contain font metrics.
\
texinput\
btexfmts.fmt
files, that contain hyphenation patterns and macros.
The big TeX version tex386
looks for the parameter BTEXFMT
:
\
btexfmtshtex386
) looks for
HTEXFMT
.
Note: When TeX tries to find a any TeX text or macro input file it first searches
the current directory, then the directories listed in TEXINPUT
. We suggest that you run
TeX from the directory where you keep your text files. However, it is also possible to
add a directory to the
TEXINPUT
variable, e.g.,
\
inputs;c:\
texfiles\
texinput
MYTEXINPUT
in texuser.<os>
to such
a directory. Similar remarks apply to the
[B|H]TEXFMT
variable and .fmt
files.
The emTeX compilers can automatically search subdirectories of a given path.
E.g., if you specify TEXINPUT=%EMTEXDIR
\
inputs!
(note the exclamation mark),
the compiler will search %EMTEXDIR
\
inputs
and all its subdirectories (e.g.,
%EMTEXDIR
\
inputs
\
pstricks
and %EMTEXDIR
\
inputs
\
bibtex
) for input files. Note
that the order in which subdirectories are searched is not determined. One
exclamation marks stands for searching one level deeper, no more. If you want the
compiler to search an the entire branch (subsubdirectories and deeper) you should
supply two exclamation marks after the path name.
Beware that that currently not all programs that use these variables are capable of subdirectory searching, and some programs use a different syntax. 4TeX deals with these incompatibilities where necessary.
5.2.2 Command line
The syntax of the compilers is
[H]TEX386 [options] [![]() |
.log
, where <filename> is the input filename you gave.
[B|H]TEXFMT
. For plain TeX the format
is plain
; for LaTeX latex2e
. For the (obsolete) LaTeX version 2.09 the format is
lplain
. Most LaTeX formats provided by 4TeX contain hyphenation patterns
for English, French, Dutch and German--which is why extra memory is
claimed for hyphenation patterns. Format files are generated by running the
TeX compiler with the /i
option. This process is described in Sections 4.8 and
5.2.4.
[input file] should represent the name of a text file. An extension .tex
is assumed
if none is given. If no input file is given, TeX will run interactively, i.e., it will show
the TeX prompt from which you can enter text.
Thus, a TeX command line might look something like
mytext.tex
, using the (precompiled) LaTeX macro package
latex2e.fmt
and creates mytext.dvi
from which the appropriate printer program
can generate output. Error messages, statistics etc. will be written to the logfile
mytext.log
.
Any selection of options can be put in the environment variable EMTEXOPT
--as is
done by 4TeX. For example:
?
prompt, then you can terminate the TeX compilation by typing [X] followed by
[Enter].
In case TeX can't find a file and asks you to type in a name, you can stop TeX by
entering [Ctrl][Z], or cause it to skip a file by entering null
. You can interrupt
TeX by pressing [Ctrl][Break].
5.2.3 Connecting an editor
TeX files can be prepared using any ascii editor. It is very convenient if the editor can display line numbers, as we will discuss below. While PC Magazine's ted won't do, the Norton Editor, Emacs, vde and WordPerfect's pe are all fine. If you don't mind changing editors, we suggest using TSE if you run 4TeX on MS-Dos, os/2 or MS-Windows 3.x. If you run MS-Windows 95 or MS-Windows NT PFE would be an excellent choice.
When TeX encounters an error and prints a questionmark, one of the answers you can give is [E] (from Editor). If the system is set up properly, this answer results in TeX being terminated and the editor of your choice being called.
Here is how it works: if TeX was called with an option /a
<filename> and
you entered [E] after the ?
prompt, TeX will write certain information to
<filename>. The environment variable EMTEXED
controls what information.
EMTEXED
may contain parameters
%1
for the line number, %2
for the input
file and %3
for the logfile. For TSE Junior 4.0 you might set EMTEXED
as
follows:
\
tsejr40\
q.exe %2 -n%1%2
, which is the input file, and jump to line %1
, which is the
line where the error occurred. For PFE
Note: In a batch file (e.g., autoexec.bat
) you'll need double percent
signs:
\
tsejr40\
q.exe %%2 -n%%1
@echo off if exist e.bat del e.bat tex386 /mt:65000 /ae.bat &plain %1 if exist e.bat e.bat |
e.bat
. If this
batch file exists, it is called. e.bat
in its turn will call your editor.
5.2.4 Format files
4TeX version 4.71 as you find it on the CD-rom supports the following format files:
latex2e.fmt
)
plain.fmt
)
eplain.fmt
)
lplain.fmt
and lplainn.fmt
with NFSS)
splain.fmt
and splainn.fmt
with NFSS)
greek.fmt
)
mex.fmt
)
lamex.fmt
)
pllatex.fmt
)
lgreek.fmt
)
lhamste.fmt
lhlatex.fmt
and blhlnfss.fmt
with NFSS)
lhplain.fmt
)
cslatex.fmt
)
slovak.fmt
)
blue.fmt
)
texsis.fmt
)
texinfo.fmt
)
lollipop.fmt
)
sllplain.fmt
)
slplain.fmt
)
contxen.fmt
, contxnl.fmt
and contxde.fmt
)For documentation on plain TeX, LaTeX, and others we refer to the books listed in the bibliography and the on-line documentation.
Babel
With TeX 3.0 it has become possible to load hyphenation patterns for more than one language. To take advantage of this new feature some extra book keeping is needed. Babel is a TeX program that provides a simple way to generate TeX format files (see below) with multiple languages, and some control sequences to switch languages within one TeX document.
4TeX supports hyphenation patterns for the UK English, US English, Dutch,
German, French, Russian, Portugese, Greek, Italian, Spanish, Polish, Turkish and
several other languages, some even in different flavors. This means that you can
generate a format (see Format menu, Section 4.8) that supports hyphenation for one
or more of the languages above. From within a LaTeX document you can
switch to and from any of these languages, provided you have included the
matching LaTeX style files such as francais
or dutch
(see documentation of
Babel).
Generating new format files
On the CD-rom (nearly) all format files are available in two versions: one `big'
version (for BigTeX) and one `huge' version (for HugeTeX). The first resides
in the directory indicated by BTEXFMT
, and is generated by tex386. The
second resides in the directory indicated by
HTEXFMT
, and is generated by
htex386.
The easiest way to generate new formats is to start 4TeX and run the Format utility (see Section 4.8). Below we will describe step by step how you can generate a format file from the command line. All the environment variables that are needed are set by 4TeX, so the easiest way to generate formats is from a MS-Dos shell on top of 4TeX. Use [F9] from the main menu to start the shell.
First we will show how to generate the standard plain format.
c:
\
texfiles
\
4system
. This is where the format file will
be written. If all goes well you can move it to the correct directory
later.
ushyphen.tex
*
). Now you can
enter
\
dump
plain.fmt
will be written to disk.
?:
\
emtex
\
btexfmts
.?:
\
emtex
\
htexfmts
.c:
\
texfiles
\
4system
. This is where the format file will
be written. If all goes well you can move it to the correct directory
later.
fonttext.lx
fontmath.lx
preload.lx
hyphen.cfg
which enables the Babel
multiple language system. This system will load the file language.dat (if
available) in which you must have specified which languages you will be using
with this format.
latex.fmt
will be written to disk.
?:
\
emtex
\
btexfmts
.?:
\
emtex
\
htexfmts
.c:
\
texfiles
\
4system
. This is where the format file will
be written. If all goes well you can move it to the correct directory
later.
babel.hyp
lfonts.nfs
fontdef.ori
preload.ori
newlfont.sty
*
). Now you can
enter
\
dump
lplain.fmt
will be written to disk.
lplainn.fmt
.
?:
\
emtex
\
btexfmts
.?:
\
emtex
\
htexfmts
.splain.fmt
) are generated in almost the same way as the plain
formats.