4DOS batch files
4TeX uses 4DOS batch files. These batch files have the file extension
BTM whereas normal batch files have the extension BAT. BTM stands for
batch to memory. Usually a batch file is read and executed line by line,
but 4DOS loads the complete batch file in memory
and then executes it. This makes BTM batch file run faster. A more
imporant advantage of 4DOS is its much richer programming features.
4DOS makes it easy to write fairly sophisticated programs. No compiler
Reading the 4DOS help file and looking at the examples you could start
to change/add BTM files to suit your own personal needs.
If you leave the 4DOSProgram parameter empty in the
4TEX.INI file, 4TeX will use the program
specified by the COMSPEC environment variable. On Windows 95/98 that
will usually be COMMAND.COM; on NT it will usually be CMD.EXE.
If you don't use 4DOS, 4TeX will not start the BTM files as described
below (since BTM files only work with 4DOS), but 4TeX will start the
the batch file with the same name but with the extension
BAT. This means that people who do not want/like to use 4DOS (because it
is shareware and they have to pay for it) can write their own BAT
files and still work with 4TeX.
Below you will find a list and short description of BTM files that are
currently used by 4TeX:
This batch file is called every time you start 4TeX and
when in the 4TEX.INI file the parameter is
set to RunAutoStartBatchFile=1 The original autostart.btm
will load the PFE editor (with the Main and Current TeX file) and start
the LaTeX macro program.
Run BibTeX. This batch file is called when pressing the "run
BibTeX" button in the BibTeX menu.
Used for block compilation,
which is started by selecting a block in the editor and then
right-clicking the "Compile" button.
Used to jump to the correct file and line number when an
error occurs during block compilation.
This batch file is called when quitting 4TeX. It will
"kill" certain processes (the variable KILL in the
4TEXSET.BAT file) and will delete certain files
(specified by the environment variable DELFILES in
A batch file for compiling a ConTeXt file and running TeXUTIL in one go.
The batch file that is called when you press the "Compile"
If the "devirtualize" option is selected in the
Options menu this batch file will run
a program to replace virtual fonts with real fonts in the DVI file.
A utility to store the fonts used by DVIWIN 2.9 in a
Batch file to convert a DVI file to PS or PDF file.
Display PS or PDF file using GhostScript.
Used by CLOSING.BTM to "kill" processes.
Used by GSVIEW.BTM to "kill" an already running instance of GSVIEW (so
you will have only one instance of the GhostScript viewer running at a
Batch file to run MakeIndex (when pressing "Run
MakeIndex" in the MakeIndex menu).
(Re)generates the ls-R (index) files needed for TeX and
related programs to find their resources.
Used when pressing "Run metafont" in the Metafont
Used when pressing "Run MetaPost" in the MetaPost
Used by DVIWIN 2.9 to automatically generate missing
Used when pressing "Generate" button in the Generate
(La)TeX format menu.
Used when pressing the "Generate wordlist" button in the
The following batch files are used for printing or previewing:
Canon Bubblejet 10e (360dpi) through Ghostscript
HP Deskjet 550c color (300dpi) through Ghostscript
HP Deskjet 500c color (300dpi) through Ghostscript
HP Deskjet 500c monochrome (300dpi) through Ghostscript
HP Deskjet (300dpi) through Ghostscript
HP PCL (e.g. HP deskjets) output to printer
DVIWIN 2.9 previewer (needs to devirtualize VF fonts)
Epson FX matrix (240x216dpi) through Ghostscript
HP LaserJet IIp (300dpi) through Ghostscript
HP LaserJet III (300dpi) through Ghostscript
HP LaserJet 4, 5 or 6 (600dpi) through Ghostscript
HP LaserJet Plus (300dpi) through Ghostscript
Windows printer through Ghostscript Choose this option
if your printer is not specified in the list
Adobe PDF through Ghostscript (110dpi/VGA screen)
Adobe PDF through Ghostscript (600dpi)
Adobe PDF through Ghostscript (300dpi)
HP Paintjet XL color (300dpi) through Ghostscript
PS to PDF converter