EMTEXGI 2.071 Beta
User's Manual
Allin Cottrell
March, 1997
EMTEXGI is a shell for running emTeX and associated utilities under
Windows 3.1 or Windows 95 (and NT). I developed this program for my own
convenience as a user of both MS Windows and emTeX, and was spurred by
discussions on comp.text.tex to offer it for the use of others. Since
first writing EMTEXGI I have migrated to Linux, and I mostly use
teTeX, but I am still interested in promoting the use of TeX by people
running Microsoft operating systems.
The program comes in both a 16-bit version (for Windows 3.1) and a 32-bit
version (for Windows 95/NT). The names of the executables are
emtexgi.exe and emtexgi2.exe respectively. Each has a
little configuration file with extension cfg. When I refer to
``the cfg file'' below, this should be understood to mean
emtexgi.cfg for the 16-bit version and emtexgi2.cfg for
the 32-bit version.
EMTEXGI is written in Microsoft Visual Basic. The VB source code is
freely available on request.
Please consult the Web page
www.wfu.edu/Academic-departments/Economics/ftp/emtexgi.html
Installation is not discussed further here.
- Edit: Calls a File, Open dialog box to select a file for
editing. The first line of the cfg file determines what editor
will be used, the default being Programmer's File Editor (PFE).
- LaTeX: Runs LaTeX on the current file, i.e. the file
that was most recently (a) opened via the Edit button, or (b) selected
via the File, Set jobname menu item. The command used is set in
line 3 of the cfg file, the default being
rsxwin -X tex386 &latex - View dvi: Calls dviwin to preview a dvi file. The command
is set in line 7 of the cfg file and the default is
\dvidrvrs\dviwin.exe -1. Under the Configure menu (see below)
you have the option of calling dvicopy before dviwin, which may be
useful when working with virtual fonts. - ps (300): Calls dvips to make postscript at 300 dpi, from
the current dvi file. The command is set in line 8 of
emtexgi.cfg: default is
rsxwin -X dvips32.exe -M - ps (HiRes): Calls dvips to make a high-resolution
postscript file from the current dvi file. By ``high resolution''
is meant either 600 dpi or 1200 dpi, depending on the content of
the file ljh.cfg. By default this calls for 600 dpi, but
when you first start EMTEXGI you have the option of
changing the default to 1200 dpi. To change the default to
1200 dpi at a later stage, copy optra.cfg to ljh.cfg
in
\emtex\data\dvips. - Print: The default action on pressing this button is to
issue a DOS command to copy a file to a printer
port. This is intended for use with postscript files, where a
postscript printer is attached (either locally or via a network) to
a port on your computer. The default port is LPT2; this is
set on line 6 of the cfg file. You get a chance to verify
the command before it is executed.
From version 2.05 of EMTEXGI, however, this command button
has become more flexible. You can replace line 6
of the cfg file with any printing
command you like. Enclose the command in quotes, and use %f
for the name of the file to be operated on (without extension).
For example, if this line reads "dvilj %f.dvi" then pushing
the print button will cause dvilj to operate on the current dvi
file.
Note also that for non-postscript printing you can just print from
dviwin (although this can be a bit slow)--see its File menu.
- TeX: Runs plain TeX on the current source file. The
command is set on line 10 of the cfg file. Default:
rsxwin -X tex386.exe &plain
- File:
- Set Jobname...: Set the base filename for LaTeXing,
previewing, etc. Use this if you want to set the name of the
job independently of selecting a file to edit via the Edit
button--for instance, if you are working on a multi-part document.
- New...: Create a new LaTeX or plain TeX file and
open it in the default editor. You are prompted for a name for
the file.
- Preview (GSVIEW): Call Ghostview to preview postscript.
Please note that Ghostscript/Ghostview must be installed
(independently of emTeX and EMTEXGI) for this to
be available. The command is set on line 5 of the cfg file.
- View logfile: Open the .log file pertaining to
the most recent LaTeX or TeX job in the default editor.
- BiBTeX (this job): Run BiBTeX on the
current .tex file. See line 15 of
the cfg file. Default:
rsxwin -X bibtex32.exe - Alternate edit: Opens the current file (as given by
Set Jobname) in the alternate editor. This is relevant only if you
have specified an alternate editor on line 2 of the cfg file.
- Purge working dir: Deletes (after confirmation) all the
aux, log, dvi and ps files in the current
directory, as shown in the Jobname label.
- Spell Check: Runs ispell--a TeX-aware spelling
checker--on the current source file.
- Lackeck: This is a dummy item. Put a real
syntax-checking program into the last working line of the cfg
file if you wish.
- Mkidx32: Runs mkidx32.exe on the current job. For
generating indexes.
- Exit: What you'd expect.
- Picture:
- New (TeXcad): Open TeXcad without loading an existing
file.
- Edit (TeXcad)...: Call File, Open dialog box to select
a picture file for editing in TeXcad. Note that when TeXcad starts
up, you have to press the Enter key to load the selected file.
- View (gh): Runs LaTeX on the ``dummy'' file gh.tex.
You will be prompted for the name of a picture file to include. This
provides a way of compiling and previewing a TeXcad picture without
having to embed it in an actual LaTeX document. After the LaTeX\
run, gh.dvi is opened in dviwin.
- Edit (editor)...: Gives a File Open box to select a picture
file for editing in the default editor (i.e. editing the source code
directly).
- Configure:
- Edit emtexgi.cfg: Open EMTEXGI's configuration file
in the default editor.
- Make new .cfg active: Force EMTEXGI to re-read its
configuration file after making changes.
- Shrink: Toggle the state of EMTEXGI between the
default look and a smaller ``button bar'' kind of appearance.
- Dviwin and dvicopy: Opens a box in which you can make
changes (for the current session) in the behavior of dviwin. By
checking the appropriate radio button you can arrange for dvicopy
to be called automatically before dviwin. You can also arrange to
bypass (or not) dvicopy's prompt for options. For an account of
these options see dvicopy.doc in the emTeX doc
directory.
- Big TeX formats: You will probably use this item
and the next only if you intend to customize the basic behavior
of TeX and Metafont. In that case, you presumably know what
you're doing and these items should be fairly self-explanatory.
See also the emTeX documentation.
- Big Metafont bases: See the previous item.
- Make formats, bases using defaults: This should
be done for you the first time you start up
EMTEXGI. But you can redo it here. Look at the emTeX
documentation for explanation (but note that this routine is
an alternative to using emTeX's makebas and makefmt
programs).
- Configure Babel: Opens a window in which you can
choose international hyphenation patterns to include in the LaTeX (and
optionally plain TeX) formats. Please note that to use this
functionality you should install the files babel.zip and
hyphen.zip from the EMTEXGI distribution.
- Metafont:
- About Metafont: A brief explanation of what's on offer here.
- Run Metafont: You are prompted for the Metafont source
and the details of the font to make. If automatic font generation is
working OK you are unlikely to need this.
- Run existing gftopk.bat: For packing a pk font. You won't
need this unless you using the item above, and have a setup that is
non-standard in some way.
- ps2pk:
- About ps2pk: Brief explanatory text.
- Run ps2pk: This item can be used to make pk fonts
(for use with dviwin) from postscript fonts. You will need the
pfb and afm files for the font. You are led through
a process that results in the writing of a DOS batch file to do
the job.
- Run existing ps2pk.bat: You will need this item only
if you use the previous item, and choose not to run the generated
batch file right away (editing it first, perhaps).
- Process missfont.log: This item attempts to run
ps2pk automatically, following a dviwin run that has revealed the
absence of pk versions of postscript fonts specified in your
tex file. Quite a few things have to be right for this
to work. Specifically, you must have appropriate virtual font
files and your psfonts.map must be correct.
- Calculator: Pops up a TeX font ``calculator'' which
may be useful in working with Metafont and/or ps2pk.
- Help: This menu provides shortcuts to various relevant
pieces of documentation included in the distribution. The ``About
help'' item displays the default locations for the files in
question.
EmTeX has a useful feature: if things are correctly set up, then
when tex386 encounters an error on compiling a tex file, if
you press e this will open your source file in an editor,
with the cursor on the line where the error is located. With
release 2.05 of EMTEXGI I have made this automatic for
the PFE editor. For best results the source file should already
be open in PFE, but in the background: pressing e on a
compilation error will pull PFE into the foreground and position
the cursor appropriately.
If you want to adapt this routine to an editor other than PFE, you'll
have to edit the file named rsxwin.ini, which you should find
in the same directory as rsxwin.exe (probably \rsx\bin).
To the right of the string set1=emtexed, (including the comma),
you should put the appropriate command-line arguments to pass to your
editor, using %1 for the line number and %2 for the
name of the file. You will have to consult the documentation for
your editor to work this out. /s /g%1/1 %2 works for PFE.
The most likely source of problems with EMTEXGI is that not all of the
required environment variables are set (correctly). You can check this by
opening a DOS box and typing the commands path and set. With
path you are looking for the inclusion of x:\emtex\bin and
x:\rsx\bin in the DOS search path (where x is a placeholder for
the appropriate drive letter on your system). With set you are looking
for appropriate settings for the environment variables EMTEXDIR,
DVIDRVFONTS, EMX, MAKETEXPK and TEMP. If some of these things do not show up
(correctly), the first thing is to check your autoexec.bat. If everything in
autoexec.bat looks OK, the next potential problem is that you are ``out of
environment space" (so that the settings in autoexec.bat are not actually
sticking) and/or that your PATH exceeds the legal DOS length.
- If your path is too long, look for some extraneous directories
that can be omitted.
- If you're out of environment space, put a line on the following
pattern into your config.sys:
SHELL=C:\DOS\COMMAND.COM /P /E:2048
Obviously, check the path to your command.com. 2048 should probably be
large enough for the environment space but under some conditions you may need
a bigger setting--increase by multiples of 512.
Another potential source of trouble (relating specifically to the
dviwin previewer) is wrong settings in dviwin[2].ini. Look at
this file (which you should find in your windows directory)
in an editor. Check for the following in particular:
fontpath=x:\texfonts\$r [replace x with the correct letter]
mismethod=1 [font-generation is turned on]
miscmd1=x:\dvidrvrs\genpk.pif /e:2048 /c x:\dvidrvrs\genpk.bat
$f $m $x $y $X $Y $d $p $e [but all on one line]
The last setting above is crucial for generating missing fonts.
Again, replace x with the appropriate drive letter.
In case of problems it is obviously useful to be able to read any error
messages. By default, EMTEXGI is set to close rsxwin windows and DOS
boxes on program completion, so you may be unable to read any messages. To
hold open an rsxwin window you can remove the -X flag from the
corresponding rsxwin line in the cfg file. To hold open a DOS box
under Windows 3.1, edit the pif file corresponding to the bat file
that is run in the box, using Windows' pifedit.exe, and uncheck the box
marked "Close window on exit". The most likely candidates for this treatment
are \dvidrvrs\genpk.pif and makecpy.pif in
\emtex\mytex\preview. To hold these boxes open under Windows 95,
select the bat file (e.g. under ``My Computer''), click the right mouse
button, select ``Properties'' from the pop-up menu, then under the
``Program'' tab uncheck ``Close on exit''.
This is beta software: no guarantees, use at your own risk.
Suggestions for improvement welcome. So far as copying goes, the GNU
rules apply. Do what you want with this program, other than trying to
charge anyone for it or its use.
Allin Cottrell
Department of Economics, Wake Forest University
cottrell@wfu.edu