\input texinfo   @c -*-texinfo-*-

@c %**start of header
@setfilename miktex.rtf
@settitle MiK@TeX{} Local Guide
@c %**end of header

@set REV 1.03
@set DATE 26 August 1997
@set MONTH August 1997
@set MIKTEXREV 1.08

@syncodeindex fn cp
@syncodeindex vr cp
@syncodeindex pg cp

@iftex
@afourpaper
@end iftex

@ifinfo
@format
MiK@TeX{} @value{MIKTEXREV} Local Guide
Copyright @copyright{} 1996, 97 Christian Schenk
@end format
@end ifinfo

@titlepage
@title MiKTeX Local Guide
@subtitle Revision @value{REV}
@subtitle @value{MONTH}

@author Christian Schenk <cschenk@@berlin.snafu.de>
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1996, 97 Christian Schenk

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Free Software Foundation.
@end titlepage
@page

@c **************************************************************************

@ifinfo
@node Top, Introduction, (dir), (dir)
@top MiKTeX Local Guide, revision @value{REV}

This help file documents MiK@TeX{} @value{MIKTEXREV}.

@end ifinfo

@menu
* Introduction::                What is MiK@TeX{}?.
* 1.08::                        What's new?
* Installation::                Installing MiKTeX
* Directory Tree::              Description of the @TeX{} directory structure.
* Configuration::               How to change configuration settings.
* config.ps::                   Configuring Dvips
* Format Files::                Making Format Files
* fndb::                        Maintaining the file name data base
* Manual Pages::                Manual Pages
* Viewers::                     Screen Previewers for MiKTeX
* Implementation::              Implementation notes
* Index::                       Index.
@end menu

@c **************************************************************************

@node Introduction, 1.08, Top, Top
@chapter What is MiK@TeX{}?

MiK@TeX{} is an implementation of @TeX{} and friends
for Windows 95 and Windows NT. The MiK@TeX{} distribution includes the
following applications:

@table @asis
@item @TeX{} 3.14159
Converts plain @TeX{} files into DVI files.

@item La@TeX{}2e
Converts La@TeX{} files into DVI files.

@item METAFONT 2.718
Converts font specifications into raster fonts.

@item MetaPost 0.632
Converts picture specifications into PostScript commands.

@item dvips 5.74
Converts DVI files into PostScript.

@item MakeIndex 2.12
Composes indexes.

@item Bib@TeX{} 0.99c
Composes bibliographies.

@item YAP 0.91
A DVI previewer.

@item Standard La@TeX{} Packages
AMS-La@TeX{}, Babel, PSNFSS, ...

@item TeXware, MFware, psutils, ...
Lots of utilities.
@end table

@menu
* Getting::                     How to get MiK@TeX{}
* Latest News::                 The MiK@TeX{} Project Page
@end menu

@node Getting, Latest News, Introduction, Introduction
@section How to get MiK@TeX{}

You can find MiK@TeX{} on any CTAN@footnote{CTAN: Comprehensive TeX
Archive Network} mirror in the directory @file{systems/win32/miktex}.

Currently there are two participating CTAN nodes:

@example
ftp.dante.de
ftp.tex.ac.uk
@end example

@node Latest News,  , Getting, Introduction
@section The MiK@TeX{} Project Page

Visit the MiK@TeX{} Page for information about new releases,
patches and so on:

@example
http://www.snafu.de/~cschenk/miktex
@end example

@c **************************************************************************

@node 1.08, Installation, Introduction, Top
@chapter What's new in MiKTeX 1.08?

What follows is the list of changes (as against version 1.07).

@heading New Features

@itemize @bullet
@item
MiK@TeX{} supports multiple TEXMF directory trees. This feature allows
you to make use of an existing comprehensive TEXMF tree (such as a
shared te@TeX{} installation).

@item
Support of UNC file names. It should now be possible to do without a
drive letter when you create a shared MiK@TeX{} directory.

@item
Certain internal @TeX{} parameters have been increased.

@item
MakeTeX@{PK,TFM@} now determines the standard destination directory. (In
the past, all generated fonts ended up in a temporary directory tree.)
Please note that the new method is not compatible with DviWin, which
cannot search recursively for PK files. You can restore the old method
by changing back the value @samp{PK Temp Dir}.

@item
MakeIndex searches recursively for style files.

@item
It's now possible to define per-user search paths.
@end itemize

@heading New Applications

@itemize @bullet
@item
Modified version of GNU Makeinfo which converts Texinfo docs into
RTF. You can use this utility to make WinHelp files from Texinfo
documents.

@item
8-bit enhanced version of BibTeX with extra large processing capacity.
Executable is called @file{BIBTEX8.EXE}. Documentation is in
@file{DOC\BIBTEX8}.

@item
MakeTeXFMT makes a new format file and moves it into the format folder.
@end itemize

@heading Upated

@itemize @bullet
@item
dvips 5.74

@item
MetaPost 0.632

@item
La@TeX{} Jun'97
@end itemize

@heading Resolved Problems

@itemize @bullet
@item
TeX capacity exceeded.

@item
On-the-fly generation of fonts fails, if the font sources are placed in
the current directory.
@end itemize

@c **************************************************************************
@node Installation, Directory Tree, 1.08, Top
@chapter Installing MiKTeX

@heading Archives

What follows is a list of archives and executables needed for installation.
Essential files are typeset @strong{like this}. The other files are optional.

@table @file
@item @strong{install.exe}
MiK@TeX{} Installation Utility

@item @strong{unzip.exe}
UnZip Utility (by Info-ZIP)

@item amsf108.zip
AMS-Fonts

@item amsl108.zip
AMS-LaTeX

@item babl108.zip
Babel system

@item bib108.zip
Generic BibTeX input files

@item cm108.zip
Computer Modern fonts

@item dvips108.zip
Generic dvips input files

@item ec108.zip
EC fonts

@item @strong{exe108ia.zip}
intel-based executables, part 1/2

@item @strong{exe108ib.zip}
intel-based executables, part 2/2

@item latex108.zip
LaTeX2e base distribution

@item mf108.zip
Generic METAFONT input files

@item @strong{mik108.zip}
Essential MiKTeX files

@item misc108.zip
Various input files

@item mkind108.zip
Generic MakeIndex input files

@item mp108.zip
Generic MetaPost input files

@item ps108.zip
PostScript fonts for LaTeX2e

@item src108.zip
MiKTeX source files

@item sty108.zip
Standard LaTeX packages

@item tex108.zip
Generic TeX input files

@item txi108.zip
Texinfo input files and documentation

@item vga108.zip
PK font files for the screen
@end table

@heading Installation

@enumerate
@item
Make sure that you have the necessary files (see previous section).

@item
Choose a name for the root TEXMF directory, say @file{c:\texmf}.  Please
note, that due to a bug in Unzip 5.31, you cannot choose a UNC path
here.  Work-around: Use a non-UNC path for installation. Later you can
redefine the root directory with the help of the Configuration Utility.

@item
Decide whether you want to use pre-existing TEXMF trees (such as
a shared teTeX directory hierarchy).

@item
Don't install MiK@TeX{} @value{MIKTEXREV} over an older MiK@TeX{} version.
If you have an old version, then you should remove it (after you have saved
you local additions).

@item
Invoke @file{install.exe}.

@enumerate a
@item
When prompted for the destination directory, enter the name chosen
in step 2.

@item
When prompted for the root directories of other TEXMF trees, enter a
semicolon-separated list of existing TEXMF root directories. Enter
nothing, if you just want to use the TEXMF tree that comes with MiK@TeX{}.

For example, if your workstation is connected to a shared teTeX
directory, then you can enter its UNC name (e.g. @file{\\server\tetex}).

If you have a @TeX{} Live 2 CD, then you can enter @file{x:\share\texmf}
(replace @file{X} with the CD-ROM drive letter).
@end enumerate

@item
Add the MiK@TeX{} bin directory to the environment variable PATH.
Under Windows 95 you have to append something like

@example
set PATH=c:\texmf\miktex\bin;%PATH%
@end example

@noindent
to your @file{autoexec.bat}.  Under Windows NT you can use Control
Panel to change the value of PATH.

@item
Restart Windows.
@end enumerate

@heading Example Installation

Here comes the transcript of a standard installation procedure.
@file{c:\texmf} is the destination directory. No additional TEXMF trees will
be incorporated.

@example
Welcome to MiKTeX 1.08 Installation Utility. This program will install
MiKTeX 1.08 on your system.

MiKTeX 1.08 will be installed in `c:\texmf'.

To install to this directory, press <RETURN>.

To install to a different directory, enter the name of another directory.

You can choose not to install MiKTeX 1.08. Enter `cancel' to cancel the
installation.

Destination Directory: 

You can cause MiKTeX to incorporate additional TEXMF trees.
To do so, enter a semicolon-separated list of directory names.
Press <RETURN>, to use nothing but the TEXMF tree that comes with MiKTeX.

Incorporate other TEXMF trees:

Installing AMS-Fonts...
Installing AMS-LaTeX...
Installing Babel system...
Installing Generic BibTeX input files...
Installing Computer Modern fonts...
Installing Generic dvips input files...
Installing EC fonts...
Installing intel-based executables, part 1/2...
Installing intel-based executables, part 2/2...
Installing LaTeX2e base distribution...
Installing Generic METAFONT input files...
Installing Essential MiKTeX files...
Installing Various input files...
Installing Generic MakeIndex input files...
Installing Generic MetaPost input files...
Installing PostScript fonts for LaTeX2e...
Installing Various LaTeX packages...
Installing Generic TeX input files...
Installing Texinfo input files and documentation...
Installing PK font files for the screen...

Writing file name data base...

Checking that the installation worked:

  1. Invoking TeX...

This is TeX, Version 3.14159 (MiKTeX 1.08)
(test.tex
Babel <v3.6h> and hyphenation patterns for english, german, loaded.
[1] )
Output written on test.dvi (1 page, 552 bytes).
Transcript written on test.log.

  2. Opening DVI file...

Installation is complete. Please append `c:\texmf\miktex\bin' to
the environment variable `PATH' and reboot the system.
@end example

@noindent
You should now inspect the Dvips configuration file. You have to modify
it, because it probably doesn't match your printer and paper size.
@xref{config.ps, Configuring Dvips}, for more information.

@c **************************************************************************
@node Directory Tree, Configuration, Installation, Top
@chapter The MiK@TeX{} directory tree

When you have installed MiK@TeX{}, the TeXMF root directory
(usually @file{c:\texmf}) contains the following subdirectories:

@table @file
@item bibtex
For Bib@TeX{} input files.

@item doc
For user documentation.

@item dvips
For dvips input files.

@item fonts
For font files.

@item makeindex
For MakeIndex input files.

@item metafont
For METAFONT input files.

@item metapost
For MetaPost input files.

@item miktex
For MiK@TeX{} related files.

@item source
For source files.

@item tex
For @TeX{} input files.
@end table

Read @cite{A Directory Structure for @TeX{} Files}
(@file{c:\texmf\doc\general\tds.dvi}) by the TUG Working Group on a
@TeX{} Directory Structure, for more information about the standard
@TeX{} hierarchy.

@ifinfo
Click !(here!)![!ExecProgram("yap.exe ../general/tds.dvi", 0)!] to open this
document now.
@end ifinfo

@menu
* miktex Directory::            Contents of the MiK@TeX{} directory.
@end menu

@c --------------------------------------------------------------------------

@node miktex Directory,  , Directory Tree, Directory Tree
@section Contents of the MiK@TeX{} directory
@cindex Format files
@cindex Base files
@cindex Mem files
@cindex MiK@TeX{} Directory

The MiK@TeX{} directory (usually @file{c:\texmf\miktex}) is reserved for
implementation dependend files.  It contains five subdirectories:

@table @file
@item base
For @file{.base} (METAFONT base) files.

@item bin
For executable files.

@item config
This directory contains the configuration file @file{miktex.environment}
and the configuration utility @file{configure.exe}
(@pxref{Configuration}).

Furthermore this directory contains the file name data base
@file{texmf.fndb}.

@item fmt
For @file{.fmt} (@TeX{} format) files.

@item mem
For @file{.mem} (MetaPost Memory) files.
@end table

@c **************************************************************************

@node Configuration, config.ps, Directory Tree, Top
@chapter How to configure MiK@TeX{}
@pindex HKEY_LOCAL_MACHINE\SOFTWARE\MiK\MiKTeX
@cindex Windows Registry
@pindex configure.exe
@pindex miktex.environment

MiK@TeX{} configuration parameters are stored in the Windows Registry
under the key

@example
HKEY_LOCAL_MACHINE\SOFTWARE\MiK\MiKTeX\CurrentVersion
@end example

Instead of changing the settings with the help of Registry Editor
(@code{regedit}), you use a text editor (e.g. @code{notepad.exe}) to
edit a configuration file and then run the configuration utility
@code{configure.exe} to update the Registry.

By default, @code{configure.exe} processes the master configuration file
@file{miktex.environment}. Both files are located in the MiK@TeX{}
config directory (usually @file{c:\texmf\miktex\config}).

@menu
* Layout::                      Layout of a MiK@TeX{} Configuration File
* configure::                   How to run @code{configure}.
* Personal search paths::       How to specify personal search paths
@end menu

@c --------------------------------------------------------------------------

@node Layout, configure, Configuration, Configuration
@section Layout of a MiK@TeX{} Configuration File

A configuration file is divided into several named sections. Each
section contains configuration settings for a specific application.

@menu
* MiKTeX-config::               General configuration settings
* TeX-config::                  @TeX{} related configuration settings
* LaTeX-config::                La@TeX{} related configuration settings
* METAFONT-config::             METAFONT related settings
* MakeTeXPK-config::            MakeTeXPK related settings
* dvips-config::                dvips related settings
* MakeIndex-config::            MakeIndex related settings
* BibTeX-config::               Bib@TeX{} related settings
* Search Paths::                Search path syntax.
@end menu

@c ..........................................................................

@node MiKTeX-config, TeX-config, Layout, Layout
@subsection General configuration settings
@cindex Administrator
@pindex MakeTeXPK
@pindex Bin Directories
@pindex Debug

@table @samp
@item [MiKTeX]Bin Directories
This search path is used by some utilities (e.g. @code{MakeTeXPK}) to
find MiK@TeX{} executables. The default value is @file{%R\miktex\bin}.

@item [MiKTeX]Debug
This is a comma separated list of debug options, which cause MiK@TeX{}
to output diagnostic information:

@table @samp
@item ndebug
No diagnostic output.
@item fndb
For fndb related information.
@item filesearch
Traces the find file machinery.
@end table
@end table

@node TeX-config, LaTeX-config, MiKTeX-config, Layout
@subsection @TeX{} related configuration settings
@pindex Font Metric Dirs
@pindex Font Metric Temp Dir
@pindex Format Dirs
@pindex Input Dirs
@pindex tex

@table @samp
@item [TeX]Font Metric Dirs
The search path (@pxref{Search Paths}) for @file{.tfm} (@TeX{} Font
Metric) files. Standard is @file{.;%R\fonts\tfm//}.

@item [TeX]Font Metric Temp Dir
The directory where newly created @file{.tfm} files will be
installed. It must be in the search domain for @file{.tfm} files.

The specifiation may include special character sequences which are
replaced at search-time:

@table @samp
@item %s
The font supplier (e.g. @samp{public}).
@item %t
The typeface name (e.g. @samp{cm}).
@end table

The standard value is @samp{%R\fonts\tfm\%s\%t}.  @strong{Admin note:} MiKTeX
users must have permission to create files in the specified directory.

@item [TeX]Format Dirs
Where plain @TeX{} looks for format files.  Standard is
@file{%R\miktex\fmt//}.

@item [TeX]Input Dirs
Where plain @TeX{} looks for input files. Standard is @file{.;%R\tex//}.
@end table

@c ..........................................................................

@node LaTeX-config, METAFONT-config, TeX-config, Layout
@subsection La@TeX{} related configuration settings
@pindex Input Dirs
@pindex latex

@table @samp
@item [LaTeX]Input Dirs
The search path for La@TeX{} input files.

Standard value: @file{.;%R\tex\latex//;%R\tex\generic//}.
@end table

@c ..........................................................................

@node METAFONT-config, MakeTeXPK-config, LaTeX-config, Layout
@subsection METAFONT related settings
@pindex Base Dirs
@pindex Input Dirs
@pindex mf

@table @samp
@item [METAFONT]Base Dirs
Search path (@pxref{Search Paths}) for @file{.base} (METAFONT Base) files.
Standard is @file{.;%R\miktex\base}.

@item [METAFONT]Input Dirs
Search path for METAFONT input files. @file{.;%R\fonts\source//;%R\metafont//}
is the standard value.
@end table

@c ..........................................................................

@node MakeTeXPK-config, dvips-config, METAFONT-config, Layout
@subsection MakeTeXPK related settings
@pindex MakeTeXPK
@pindex PK Temp Dir
@pindex DviWin

@table @samp
@item [MakeTeXPK]PK Temp Dir
The specification of a directory where newly created PK (Packed Raster
Font) files will be installed. The directory must be in the search domain
of PK files.

The specifiation may include special character sequences which will be
replaced at search-time:

@table @samp
@item %m
The current METAFONT mode.
@item %d
The horizontal resolution (in dots per inch).
@item %s
The font supplier (e.g. @samp{public}).
@item %t
The typeface name (e.g. @samp{cm}).
@file{typeface.map}.
@end table

The standard value is @samp{%R\fonts\pk\%m\%s\%t\dpi%d}.  @strong{Admin
note:} All MiK@TeX{} users must have permission to create files in the
specified directory.

Note that the standard value will not work in conjunction with the
DviWin previewer, because DviWin cannot search recursively for PK
files. For DviWin, set @samp{PK Temp Dir} to
@samp{%R\fonts\pk\%m\tmp\dpi%d}. @xref{Configuring Dviwin}, for more
information.
@end table

@c ..........................................................................

@node dvips-config, MakeIndex-config, MakeTeXPK-config, Layout
@subsection dvips related settings
@pindex DVIPSHEADERS
@pindex TEXFONTS
@pindex TEXPKS
@pindex TEXINPUTS
@pindex TEXCONFIG
@pindex VFONTS
@pindex config.ps
@pindex dvips

@table @samp
@item [dvips]DVIPSHEADERS
Search path (@pxref{Search Paths}) for dvips header files.
Standard is @file{%R\dvips//}.

@item [dvips]TEXFONTS
Search path for @file{.tfm} files. This should be the same as
@samp{Font Metric Dirs} (@pxref{TeX-config}).

@item [dvips]TEXPKS
Search path for @file{.pk} files.  The specifiation may include special
character sequences which will be replaced at search-time:

@table @samp
@item %m
The current METAFONT mode.
@item %d
The horizontal resolution (in pixels per inch).
@end table

Standard setting is @file{%R\fonts\pk\%m//dpi%d}.

@item [dvips]TEXINPUTS
Search path for figure files. Standard is @file{.;%R\dvips//}.

@item [dvips]TEXCONFIG
Search path for Dvips configuration files (such as @file{config.ps}).
The standard value is @file{.;%R\dvips//}.

@item [dvips]VFONTS
Search path for @file{.vf} (Virtual Font) files.
Standard is @file{.;%R\fonts\vf//}.
@end table

@c ..........................................................................

@node MakeIndex-config, BibTeX-config, dvips-config, Layout
@subsection MakeIndex related settings
@pindex INDEXSTYLE
@pindex MakeIndex

@table @samp
@item [MakeIndex]INDEXSTYLE
Search path (@pxref{Search Paths}) for MakeIndex style files. Standard
is @file{.;%R\makeindex//}.
@end table

@c ..........................................................................

@node BibTeX-config, Search Paths, MakeIndex-config, Layout
@subsection Bib@TeX{} related settings
@pindex Input Dirs
@pindex bibtex

@table @samp
@item [BibTeX]Input Dirs
Search path (@pxref{Search Paths} for Bib@TeX{} input files (both
databases and style files).  Standard is @file{.;%R\bibtex//}.
@end table

@c ..........................................................................

@node Search Paths,  , BibTeX-config, Layout
@subsection How to specify search paths
@cindex Search paths

Search paths are used by MiK@TeX{} to find special files (such as @TeX{}
input files) within a directory hierarchy.

A search path is a list of directory paths, which are
separated by semicolons (@samp{;}).  In a directory path, the following
character seqeuences have a special meaning:

@table @samp
@item %R
A placeholder for the list of TEXMF root directories.

@item //
Causes MiK@TeX{} to search recursively
@end table

@noindent
Search paths are processed from left to right.

@subsubheading Example

Assuming that @file{c:\texmf;\\myserver\texmf} is the list of TEXMF
root directories, the search path @samp{.;%R\tex\latex//;%R\tex\generic//}
causes La@TeX{} to search its input files in the following locations:

@enumerate
@item
In the current directory (@file{.}).

@item
In the directory @file{c:\texmf\tex\latex} and in all directories below it.

@item
In the directory @file{\\myserver\texmf\tex\latex} and in all
directories below it.

@item
In the directory @file{c:\texmf\tex\generic} and in all directories below it

@item
In the directory @file{\\myserver\texmf\tex\generic} and in all
directories below it.
@end enumerate

@c --------------------------------------------------------------------------

@node configure, Personal search paths, Layout, Configuration
@section Invoking @code{configure}
@cindex Administrator
@pindex configure

@code{configure.exe}, the MiK@TeX{} configuration utility, is located in
the MiK@TeX{} config directory (usually @file{c:\texmf\miktex\config}).
@code{configure.exe} reads a configuration file
and modifies the Registry
accordingly.

You can specify a number of options to modify the behaviour of
@code{configure.exe}:

@table @samp
@item -c @var{filename}
@itemx --config @var{filename}
Specify the configuration file name. By default, @code{configure}
processes the file @file{miktex.environment}.

@item -n
@itemx --print-only
Print what would be done. Nothing is changed.

@item -p @var{filename}
@itemx --personal @var{filename}
Process a personal configuration file and store the settings in the
@file{HKEY_CURRENT_USER} part of the Windows Registry.

@item -r @var{dirlist}
@itemx --root-directories @var{dirlist}
Specify the list of TEXMF root directories.

@item -u [=@var{root}]
@itemx --update-fndb [@var{root}]
Refresh the MiK@TeX{} fndb. If @var{root} is specified, then only
the fndb for this one TEXMF root directory will be refreshed.

@item -v
@itemx --verbose
Print information on what is being done.

@item -V
@itemx --version
Print the version number and exit.
@end table

@c --------------------------------------------------------------------------

@node Personal search paths,  , configure, Configuration
@section How to specify personal search paths
@pindex HKEY_CURRENT_USER

You can cause @code{configure} to store search path specifications
in the @code{HKEY_CURRENT_USER} part of the Windows Registry.

To do so, write your own configuration file, say @code{miktex.ini},
and specify your personal search paths in it. For example, if you want
La@TeX{} to search the directory hierarchy @file{c:\users\alice\latex}
(in addition to the global one), then @code{miktex.ini} should look like
this:

@example
[LaTeX]
Input Dirs=.;c:\users\alice\latex//
@end example

To process this configuration file, run @code{configure} with
the @code{--personal} option:

@example
c:\texmf\miktex\config\configure --personal miktex.ini
@end example

La@TeX{} will then search in @file{c:\users\alice\latex} as well as in
the standard places.

Personal and global search paths are combined at run-time. In
the example above, if @file{.;%R\tex\latex//;%R\tex\generic//} is the
global La@TeX{} search path, then the combined La@TeX{} search path will be
@file{.;c:\users\alice//latex;.;%R\tex\latex//;%R\tex\generic//}.

@c **************************************************************************

@node config.ps, Format Files, Configuration, Top
@chapter Configuring Dvips
@pindex dvips
@pindex config.ps
@cindex METAFONT mode
@cindex Paper size
@cindex Resolution

As distributed with MiK@TeX{}, Dvips is configured as follows:

@itemize @bullet
@item
When generating fonts, Dvips uses METAFONT mode @samp{ljfour} (HP
Laserjet 4).
@item
Horizontal resolution is 600 dpi.
@item
Paper size is A4.
@end itemize

You probably have to change some of theses settings for your site.  To
do so, open the Dvips configuration file
@file{c:\texmf\dvips\config\local\config.ps} with your favourite text
editor.

The line starting with @samp{M} specifies the METAFONT mode which Dvips
uses for the generation of new raster fonts. Enter a suitable mode
here. If you don't know the mode for your output device, then take a
look at @file{c:\texmf\metafont\misc\modes.mf}. This file contains an
annotated list of METAFONT modes.

The line starting with @samp{D} specifies the resolution.  Enter a value
that matches your printer.

See the
@iftex
Dvips manual,
@end iftex
@ifinfo
!(dvips manual!)![!ExecProgram("yap.exe ../dvips/dvips.dvi", 0)!],
@end ifinfo
for more information about configuring Dvips.

@c **************************************************************************

@node Format Files, fndb, config.ps, Top
@chapter Making Format Files
@pindex language.dat
@pindex latex.fmt
@pindex plain.fmt

You can use the @code{MakeTeXFMT} utility to make and install a new
format file for plain @TeX{} resp. La@TeX{}.

The general @code{MakeTexFMT} syntax is

@example
maketexfmt @var{format}
@end example

@noindent
where @var{format} is the name of a macro package.
For example, to make a new La@TeX{} format file, you would say

@example
maketexfmt latex
@end example

This creates the format file @file{latex.fmt}. @code{MakeTeXFMT} moves
it into the MiK@TeX{} Format Directory (usually
@file{c:\texmf\miktex\config\fmt}.

@menu
* language.dat::                Hyphenation Patterns
@end menu

@node language.dat,  , Format Files, Format Files
@section Controlling Which Hyphenation Patterns Are Loaded

You can control the loading of hyphenation patterns by modifying the
file @file{language.dat}, which is located in the directory
@file{c:\texmf\tex\generic\hyphen\local}.

As distributed with MiK@TeX{}, @file{language.dat} has the following
contents:

@example
% File    : language.dat
% Purpose : specify which hypenation patterns to load 
%           while running iniTeX 
english ushyphen.tex
%ukenglish ukhyphen.tex
german ghyph31.tex
%italian ithyph.tex
%dutch nehyph2.tex
%finnish fihyph.tex
%norwegian nohyph.tex
%french f8hyph.tex
@end example

@noindent
Lines starting with @samp{%} are comments. The only uncommented lines in
the example are @samp{english ushyphen.tex} and @samp{german
ghyph31.tex}. That is, only hyphenation patterns for U.S. English and German
will be loaded by ini@TeX{}. To load other hyphenation patterns, you have to
uncomment the corresponding lines.

After modifying @file{language.dat}, you have to use @code{MakeTeXFMT}
to build a new format file.

@c **************************************************************************

@node fndb, Manual Pages, Format Files, Top
@chapter Maintaining the file name data base
@cindex Administrator
@cindex fndb

To speed up file search, MiK@TeX{} makes use of a list of known file
names. This list is called the file name data base (fndb). The fndb is
spread over several fndb files, one for each TEXMF root directory.

The fndb file for the first TEXMF tree
is called @file{texmf.fndb}. For the second
tree it is called @file{texmf1.fndb}. And so on.

It is strongly recommended that you update the fndb whenever files
are added to or removed from one of the TEXMF trees.

You update all fndb files by invoking @code{configure.exe} with
the @samp{--update-fndb} option:

@example
configure --update-fndb
@end example

@noindent
You can update a certain fndb file by specifying the TEXMF root, e.g.

@example
configure --update-fndb c:\texmf
@end example

@noindent
will update the fndb file for the tree rooted at @file{c:\texmf}.

@c **************************************************************************

@node Manual Pages, Viewers, fndb, Top
@chapter Manual Pages

In this chapter you will find short man pages for some of the programs
that come with MiK@TeX{}.

You will find more detailed information in @file{c:\texmf\doc}.

@menu
* Running TeX::                 How to run @TeX{}.
* LaTeX::                       How to run La@TeX{}.
* dvips::                       How to run dvips.
* MakeIndex::                   How to run MakeIndex.
* BibTeX::                      How to run Bib@TeX{}.
* YAP::                         How to run YAP.
@end menu

@c --------------------------------------------------------------------------

@node Running TeX, LaTeX, Manual Pages, Manual Pages
@section How to run @TeX{}

The usual way to invoke @TeX{} is as follows:

@example
tex @var{firstinputline}
@end example

@var{firstinputline}, if supplied, specifies the first input line.
It is normally the name of an input file.

For example, the command

@example
tex story.tex
@end example

@noindent
causes @TeX{} to produce the DVI file @file{story.dvi} from the input
file @file{story.tex}. You can specify the input file without the
@file{.tex} extension:

@example
tex story
@end example

You must specify the @file{.tex} extension if the filename contains more
than one dot. For example, it does not work to say

@example
tex foo.bar
@end example

@noindent
You have to say

@example
tex foo.bar.tex.
@end example

@noindent
instead.

Please note: you cannot specify file names that contain space
characters, even if the file system allows such names.

@c --------------------------------------------------------------------------

@node LaTeX, dvips, Running TeX, Manual Pages
@section How to run La@TeX{}

The usual way to invoke La@TeX{} is as follows:

@example
latex @var{latexfile}
@end example

@var{latexfile} is the name of a La@TeX{} document.
@inforef{Top, LaTeX2e Help, ../latex/help/latex2e}, for more information on La@TeX{}.

@c --------------------------------------------------------------------------

@node dvips, MakeIndex, LaTeX, Manual Pages
@section dvips

[ This following paragraph is borrowed from the dvips manual. ]

The program dvips takes a DVI file produced by @TeX{} (or by some other
processor such as GFtoDVI) and converts it to PostScript, normally
sending the result directly to the laserprinter.  The DVI file may be
specified without the @file{.dvi} extension.  Fonts used may either be
resident in the printer or defined as bitmaps in PK files, or a
`virtual' combination of both.  dvips will automatically invoke METAFONT
to generate fonts that don't already exist.

For more information, see the manual @file{dvips.dvi} in the
@file{doc\dvips} directory.
@ifinfo
You can click !(here!)![!ExecProgram("yap.exe ../dvips/dvips.dvi", 0)!] to
view the dvips manual.
@end ifinfo

@menu
* dvips Options::               How to run dvips.
@end menu

@c ..........................................................................

@node dvips Options,  , dvips, dvips
@subsection Command line options

[ This section is borrowed from the dvips manual. ]

The usual way to invoke dvips is as follows

@example
dvips @var{options} @var{dvifile}
@end example

@var{dvifile} may be specified without the @file{.dvi} extension.

@subsubheading Options

@table @samp
@item -a
Conserve memory by making three passes over the @file{.dvi} file instead
of two and only loading those characters actually used.  Generally only
useful on machines with a very limited amount of memory, like some PCs.

@item -A
Print only odd pages (@TeX{} pages, not sequence pages).

@item -b @var{num}
Generate @var{num} copies of each page, but duplicating the page body
rather than using the @var{#numcopies} option.  This can be useful in
conjunction with a header file setting @var{char92bop-hook} to do color
separations or other neat tricks.

@item -B
Print only even pages (@TeX{} pages, not sequence pages).

@item -c @var{num}
Generate @var{num} copies of every page.  Default is 1.  (For collated
copies, see the @samp{-C} option below.)

@item -C @var{num}
Create @var{num} copies, but collated (by replicating the data in the
PostScript file).  Slower than the @samp{-c} option, but easier on the
hands, and faster than resubmitting the same PostScript file multiple
times.

@item -D @var{num}
Set the resolution in dpi (dots per inch) to @var{num}.  This affects
the choice of bitmap fonts that are loaded and also the positioning of
letters in resident PostScript fonts. Must be between 10 and 10000.
This affects both the horizontal and vertical resolution.  If a high
resolution (something greater than 400 dpi, say) is selected, the
@samp{-Z} flag should probably also be used.

@item -e @var{num}
Make sure that each character is placed at most this many pixels from
its `true' resolution-independent position on the page. The default
value of this parameter is resolution dependent.  Allowing individual
characters to `drift' from their correctly rounded positions by a few
pixels, while regaining the true position at the beginning of each new
word, improves the spacing of letters in words.

@item -E
Makes dvips attempt to generate an EPSF file with a tight bounding box.
This only works on one-page files, and it only looks at marks made by
characters and rules, not by any included graphics.  In addition, it
gets the glyph metrics from the @var{tfm} file, so characters that lie
outside their enclosing @var{tfm} box may confuse it.  In addition, the
bounding box might be a bit too loose if the character glyph has
significant left or right side bearings.  Nonetheless, this option works
well for creating small EPSF files for equations or tables or the like.
(Note, of course, that dvips output is resolution dependent and thus
does not make very good EPSF files, especially if the images are to be
scaled; use these EPSF files with a great deal of care.)

@item -f
Read the @file{.dvi} file from standard input and write the PostScript
to standard output.  The standard input must be seekable, so it cannot
be a pipe.  If you must use a pipe, write a shell script that copies the
pipe output to a temporary file and then points dvips at this file.
This option also disables the automatic reading of the @samp{PRINTER}
environment variable, and turns off the automatic sending of control D
if it was turned on with the @samp{-F} option or in the configuration
file; use @samp{-F} after this option if you want both.

@item -h @var{name}
Prepend file @var{name} as an additional header file. (However, if the
name is simply @file{-} suppress all header files from the output.)
This header file gets added to the PostScript `userdict'.

@item -i
Make each section be a separate file.  Under certain circumstances,
dvips will split the document up into `sections' to be processed
independently; this is most often done for memory reasons.  Using this
option tells dvips to place each section into a separate file; the new
file names are created replacing the suffix of the supplied output file
name by a three-digit sequence number.  This option is most often used
in conjunction with the @samp{-S} option which sets the maximum section
length in pages.  For instance, some phototypesetters cannot print more
than ten or so consecutive pages before running out of steam; these
options can be used to automatically split a book into ten-page
sections, each to its own file.

@item -k
Print crop marks.  This option increases the paper size (which should be
specified, either with a paper size special or with the @samp{-T}
option) by a half inch in each dimension.  It translates each page by a
quarter inch and draws cross-style crop marks.  It is mostly useful with
typesetters that can set the page size automatically.

@item -K
This option causes comments in included PostScript graphics, font files,
and headers to be removed.  This is sometimes necessary to get around
bugs in spoolers or PostScript post-processing programs.  Specifically,
the @samp{%%Page} comments, when left in, often cause difficulties.  Use
of this flag can cause some included graphics to fail, since the
PostScript header macros from some software packages read portions of
the input stream line by line, searching for a particular comment.  This
option has been turned off by default because PostScript previewers and
spoolers have been getting better.

@item -l @var{num}
The last page printed will be the first one numbered @var{num} Default
is the last page in the document.  If the @var{num} is prefixed by an
equals sign, then it (and any argument to the @samp{-p} option) is
treated as a sequence number, rather than a value to compare with
@var{char92} @var{count0} values.  Thus, using @samp{-l =9} will end
with the ninth page of the document, no matter what the pages are
actually numbered.

@item -m
Specify manual feed for printer.

@item -M
Turns off the automatic font generation facility.  If any fonts are
missing, commands to generate the fonts are appended to the file
@file{missfont.log}
in the current directory; this file can then be
executed and deleted to create the missing fonts.

@item -n @var{num}
At most
@var{num}
pages will be printed. Default is 100000.

@item -N
Turns off structured comments; this might be necessary on some systems
that try to interpret PostScript comments in weird ways, or on some
PostScript printers.  Old versions of TranScript in particular cannot
handle modern Encapsulated PostScript.

@item -o @var{name}
The output will be sent to file @var{name} If no file name is given, the
default name is @file{file.ps} where the @file{.dvi} file was called
@file{file.dvi}; if this option isn't given, any default in the
configuration file is used.  If the first character of the supplied
output file name is an exclamation mark, then the remainder will be used
as an argument to @code{popen}; thus, specifying @file{!lpr} as the
output file will automatically queue the file for printing.  This option
also disables the automatic reading of the @samp{PRINTER} environment
variable, and turns off the automatic sending of control D if it was
turned on with the @samp{-F} option or in the configuration file; use
@samp{-F} after this option if you want both.

@item -O @var{offset}
Move the origin by a certain amount.  The @var{offset} is a
comma-separated pair of dimensions, such as @samp{.1in,-.3cm} (in the
same syntax used in the @samp{papersize} special).  The origin of the
page is shifted from the default position (of one inch down, one inch to
the right from the upper left corner of the paper) by this amount.

@item -p @var{num}
The first page printed will be the first one numbered @var{num}.
Default is the first page in the document.  If the @var{num} is prefixed
by an equals sign, then it (and any argument to the @samp{-l} option) is
treated as a sequence number, rather than a value to compare with
@var{char92} @var{count0} values.  Thus, using @samp{-p =3} will start
with the third page of the document, no matter what the pages are
actually numbered.

@item -pp @var{pagelist}
A comma-separated list of pages and ranges (a-b) may be given, which
will be interpreted as @var{char92} @var{count0} values.  Pages not
specified will not be printed.  Multiple @samp{-pp} options may be
specified or all pages and page ranges can be specified with one
@samp{-pp} option.

@item -P @var{printername}
Sets up the output for the appropriate printer.  This is implemented by
reading in @file{config.printername}, which can then set the output pipe
(as in, @samp{!lpr -Pprintername} as well as the font paths and any
other @file{config.ps} defaults for that printer only.  Note that
@file{config.ps} is read before @file{config.printername} In addition,
another file called @file{~/.dvipsrc} is searched for immediately after
@file{config.ps}; this file is intended for user defaults.  If no
@samp{-P} command is given, the environment variable @samp{PRINTER} is
checked.  If that variable exists, and a corresponding configuration
file exists, that configuration file is read in.

@item -q
Run in quiet mode.  Don't chatter about pages converted, etc.; report nothing
but errors to standard error.

@item -r
Stack pages in reverse order.  Normally, page 1 will be printed first.

@item -s
Causes the entire global output to be enclosed in a save/restore pair.
This causes the file to not be truly conformant, and is thus not recommended,
but is useful if you are driving the printer directly and don't care too
much about the portability of the output.

@item -S @var{num}
Set the maximum number of pages in each `section'.  This option is most
commonly used with the
@samp{-i}
option; see that documentation above for more information.

@item -t @var{papertype}
This sets the paper type to @var{papertype}.  The @var{papertype} should
be defined in one of the configuration files, along with the appropriate
code to select it.  (Currently known types include @samp{letter},
@samp{legal}, @samp{ledger}, @samp{a4}, @samp{a3}). You can also specify
@samp{-t landscape}, which rotates a document by 90 degrees.  To rotate
a document whose size is not letter, you can use the @samp{-t} option
twice, once for the page size, and once for landscape.  The upper left
corner of each page in the @file{.dvi} file is placed one inch from the
left and one inch from the top.  Use of this option is highly dependent
on the configuration file.  Note that executing the @samp{letter} or
@samp{a4} or other PostScript operators cause the document to be
nonconforming and can cause it not to print on certain printers, so the
paper size should not execute such an operator if at all possible.

@item -T @samp{offset}
Set the paper size to the given pair of dimensions.  This option takes
its arguments in the same style as
@samp{-O.}
It overrides any paper size special in the dvi file.

@item -U
Disable a PostScript virtual memory saving optimization that stores the
character metric information in the same string that is used to store
the bitmap information.  This is only necessary when driving the Xerox
4045 PostScript interpreter.  It is caused by a bug in that interpreter
that results in `garbage' on the bottom of each character.  Not
recommended unless you must drive this printer.

@item -x @var{num}
Set the magnification ratio to
@var{num}/1000. Overrides the magnification specified in the @file{.dvi} file.
Must be between 10 and 100000.

@item -X @var{num}
Set the horizontal resolution in dots per inch to
@var{num}.

@item -Y @var{num}
Set the vertical resolution in dots per inch to
@var{num}.

@item -Z
Causes bitmapped fonts to be compressed before they are downloaded,
thereby reducing the size of the PostScript font-downloading information.
Especially useful at high resolutions or when very large fonts are
used.  Will slow down printing somewhat, especially on early 68000-based
PostScript printers.
@end table

@c --------------------------------------------------------------------------

@node MakeIndex, BibTeX, dvips, Manual Pages
@section MakeIndex

MakeIndex is a program for making an index in a document generated with
La@TeX{}.
@iftex
See @file{doc\makeindex\makeindex.dvi} for more information.
@end iftex
@ifinfo
Click !(here!)![!ExecProgram("yap.exe ../makeindex/makeindex.dvi", 0)!] to view
the Makeindex manual.
@end ifinfo

@menu
* MakeIndex Options::           How to run MakeIndex.
@end menu

@c ..........................................................................

@node MakeIndex Options,  , MakeIndex, MakeIndex
@subsection MakeIndex command line options

[ This section is borrowed from the MakeIndex manual. ]

The usual way to invoke MakeIndex is as follows:

@example
makeindex @var{options} [@var{idx0} @var{idx1} @var{idx2}...]
@end example

@subheading Options

@table @samp
@item -c
Compress intermediate blanks (ignoring leading and trailing blanks and
tabs).  By default, blanks in the index key are retained.

@item -g
Employ German word ordering in the index, in accord with rules set forth
in DIN 5007.  By default, makeindex employs a word ordering in which
precedence is: symbols, numbers, uppercase letters, lowercase letters.
The sequence in German word ordering is: symbols, lowercase letters,
uppercase letters, numbers.  Addition- ally, this option enables
makeindex to recognize the German TeX-commands @{"a, "o, "u and "s@} as
@{ae, oe, ue and ss@} during the sorting of the entries.  The quote
character must be redefined in a style file (for example, redefine quote
as '+').  If the quote character is not redefined, makeindex will
produce an error message and abort.

@item -i
Take input from stdin.  When this option is specified and @samp{-o} is
not, output is written to stdout.

@item -l
Letter ordering; by default, word ordering is used (see the ORDERING
section).

@item -o @var{ind}
Employ @var{ind} as the output index file.  By  default,
the  file  name is created by appending the extension @file{.ind}
 to the base name of the first input file (idx0).

@item -p @var{num}
Set the starting page number of the output index file to be @var{num}
(useful when the index file is to be formatted separately).  The
argument @var{num} may be numerical or one of the following:

@table @samp
@item any
The starting page is the last source page number plus 1.

@item odd
The starting page is the first odd page following the last source page
number.

@item even
The starting page is the first even page following the last source page
number.
@end table

The last source page is obtained by searching backward in the log file
for the first instance of a number included within paired square
brackets ([...]).  If a page number is missing or the log file is not
found, no attempt will be made to set the starting page number.  The
source log file name is determined by appending the extension
@file{.log} to the base name of the first input file (idx0).

@item -q
Quiet mode; send no messages to stderr.  By default, progress and error
messages are sent to stderr as well as to the transcript file.

@item -r
Disable implicit page range formation; page ranges must be created by
using explicit range operators; see SPECIAL EFFECTS below.  By default,
three or more successive pages are automatically
abbreviated as a range (e.g. 1-5).

@item -s sty
Employ @var{sty} as the style file (no default).  The environment
variable @samp{INDEXSTYLE} defines the path where the style file should
be found.

@item -t @var{log}
Employ log as the transcript file.  By default, the file name is created
by appending the extension @file{.ilg} to the base name of the first
input file (idx0).
@end table

@c --------------------------------------------------------------------------

@node BibTeX, YAP, MakeIndex, Manual Pages
@section BiB@TeX{}

You use Bib@TeX{} in conjunction with La@TeX{} to compose
bibliographies.  MiK@TeX{} comes with two Bib@TeX{} implementations: an
`traditional' Bib@TeX{} 0.99c implementation called @file{bibtex.exe}
and an 8-bit-enhanced implementation called @file{bibtex8.exe}. I
recommend using the enhanced version since it has a larger processing
capacity.

Documentation for the enhanced BiB@TeX{} is in @file{c:\texmf\doc\bibtex8}.

@menu
* BibTeX Invocation::           How to run Bib@TeX{}.
* BibTeX Files::                File locations.
@end menu

@c ..........................................................................

@node BibTeX Invocation, BibTeX Files, BibTeX, BibTeX
@subsection How to run BibTeX

The usual way to invoke the traditional Bib@TeX{} is as follows:

@example
bibtex @var{inputfilename}
@end example

@var{inputfilename} must be specified without the extension.

@c ..........................................................................

@node BibTeX Files,  , BibTeX Invocation, BibTeX
@subsection Bib@TeX{} databases and style files
@pindex .bst
@pindex .bib

@file{.bst} (Bib@TeX{} style files) are located in the directory
@file{c:\texmf\bibtex\bst}.

@file{.bib} (Bib@TeX{} databases) are located in the directory
@file{c:\texmf\bibtex\bib}.

@c --------------------------------------------------------------------------

@node YAP,  , BibTeX, Manual Pages
@section Yet Another Previewer

YAP is a DVI previewer, i.e. it allows you to view your @TeX{}ed documents
before you send them to the printer.

The usual way to invoke YAP is as follows:

@example
yap @file{@var{document}.dvi}
@end example

This opens the file @file{@var{document}.dvi} and displays its first
page. Note that you cannot omit the @file{.dvi} extension from the
filename.

@menu
* Missing Fonts::               Generating missing fonts
* YAP/Printing::                Printing using YAP
@end menu

@node Missing Fonts, YAP/Printing, YAP, YAP
@subsection Generating missing fonts

YAP automatically creates missing fonts if the corresponding font source
files are available.

@node YAP/Printing,  , Missing Fonts, YAP
@subsection Printing using YAP

You can use YAP to send the whole document (or individual pages) to the
printer. Before you can do this, you have to tell YAP some facts about
your printer:

@enumerate
@item
Select @samp{Options...} from the @samp{View} menu.

@item
Open the @samp{Printer} page.

@item
Choose the correct mode for your printer. The file
@file{c:\texmf\metafont\misc\modes.mf} contains an annotated list of
valid mode names. You should consult this file if you don't know the the
mode for your printer.

@item
Enter the correct resolution for your printer.
@end enumerate

@c **************************************************************************

@node Viewers, Implementation, Manual Pages, Top
@chapter Screen Previewers for MiKTeX
@cindex Jones, John
@cindex Trotter, Tom

@quotation
This chapter was contributed by John Jones and Tom Trotter.

Comments, corrections and suggestions for improvements welcomed:
@format
  John Jones      jj@@ASU.edu
  Tom Trotter     trotter@@ASU.edu

  Department of Mathematics
  Arizona State University
  Tempe, Arizona 85287
  USA
@end format
@end quotation

MiK@TeX{} is distributed with Yap, a freely distributable screen 
previewer which will be satisfactory for many users.  But some 
people may prefer to supplement the basic MiK@TeX{} installation 
with somewhat more flexible screen previewers.  This HOWTO 
describes the procedures for setting up two alternative screen 
previewers:

@enumerate
@item
Dviwin (Hippocrates Sendoukas).

@item
Ghostscript (Aladdin Enterprises), and 
GSview graphical interface (Russell Lang).
@end enumerate

The immediate question is "Why two?  Why not just one good
one?"  The answer is simple.  Dviwin is particularly good
for previewing TeX and LaTeX text files and can handle a variety of
graphics specials *except* for postscript figures.  On the 
other hand, Ghostscript displays postscript figures very well,
although its resolution on text is not as good as dviwin.
It is also somewhat slower.  This HOWTO also includes some 
remarks on the configuration of dvips, as this step is essential 
to the production of files which can be viewed with Ghostscript.

NOTE:  Throughout this HOWTO, we assume that you
already have MiK@TeX{} installed on your computer and that
the root directory for MiK@TeX{} is "c:\texmf".   Also, we assume 
that you have the file "unzip.exe" in your path.  Finally,
we assume that the root directory for your operating system
is "c:\windows".  If you are using Windows NT, this root directory
is more likely to be something like "c:\winnt" or "c:\winnt40".  If 
this is the case, you must modify the commands and the paths
in the batch files given below to make the appropriate changes.

@menu
* Dviwin::                      Dviwin
* Dvips::                       Dvips
* GSview::                      GhostScript and GSview
* Printing::                    Printing
@end menu

@node Dviwin, Dvips, Viewers, Viewers
@section Dviwin

The current version is Dviwin 2.9.

Get the file:

@example
ftp://ftp.cdrom.com/pub/tex/ctan/dviware/dviwin/dviwin29.zip
@end example

@noindent
and save it to a scratch directory on your hard disk, say

@example
c:\archive\dviwin29
@end example

You can get this file by anonymous ftp or with your web
browser.

@menu
* Installing Dviwin::           Installing Dviwin
* Configuring Dviwin::          Configuring Dviwin
@end menu

@node Installing Dviwin, Configuring Dviwin, Dviwin, Dviwin
@subsection Installing Dviwin

@enumerate
@item
Make the following directories:

@example
mkdir c:\texmf\dviwin29
mkdir c:\texmf\dviwin29\bin
mkdir c:\texmf\dviwin29\doc
mkdir c:\texmf\dviwin29\filters
@end example

@item
Go to the Dviwin scratch directory and extract the files.

@example
cd c:\archive\dviwin29
unzip dviwin29.zip
unzip dviwin32.zip
@end example

@item
It's a good idea to pause and read some of the documentation.
In particular, see the README file which you can open with
your text editor or Wordpad.  Also, use Explorer to open
the file dviwin2.hlp.

@item
Now that you're ready to resume the installation...

@example    
copy *2.exe c:\texmf\dviwin29\bin
copy *.str c:\texmf\dviwin29\bin
copy *.hlp c:\texmf\dviwin29\bin
copy miscwin2.dll c:\texmf\dviwin29\bin
copy graphio2.dll c:\texmf\dviwin29\bin
copy README c:\texmf\dviwin29\doc
copy *2.flt c:\texmf\dviwin29\filters
@end example

@item
IMPORTANT:  You can store the Dviwin help files anywhere 
if you only access them with Explorer.  But if you want to 
access the Help files from the "Help" menu in Dviwin, they 
must be somewhere in your path.  We recommend adding 
@file{c:\texmf\dviwin29\bin} to your path rather than separating
the help files from the rest of the Dviwin files.
If you place the help files in your path and click on the
Help menu in Dviwin, you will get "dviwin.hlp", not
"dviwin2.hlp."  You can access "dviwin2.hlp" via the File
menu.  Alternatively, if you want Dviwin to open "dviwin2.hlp",
then rename dviwin.hlp to olddvi.hlp and then rename dviwin2.hlp
to dviwin.hlp. 

@item     
As outlined in Dviwin's README file, the previewer has
the ability to display graphics files in a variety of formats.
We consider this step optional, but if you want the full
spectrum of options, then it is necessary to 
add the following section to your c:\windows\win.ini file, 
using your favorite text editor:

@example
[NT Graphic Import Filters]
PC Paintbrush(.PCX)=c:\texmf\dviwin29\filters\pcxin2.flt,PCX
Microsoft Paint(.MSP)=c:\texmf\dviwin29\filters\mspin2.flt,MSP
Bitmaps(.BMP)=c:\texmf\dviwin29\filters\bmpin2.flt,BMP
Bitmaps(.DIB)=c:\texmf\dviwin29\filters\bmpin2.flt,DIB
Bitmaps(.RLE)=c:\texmf\dviwin29\filters\bmpin2.flt,RLE
Compuserve GIF(.GIF)=c:\texmf\dviwin29\filters\gifin2.flt,GIF
X Pixmaps(.XPM)=c:\texmf\dviwin29\filters\xpmin2.flt,XPM
@end example

@item
Use Explorer to create a shortcut to c:\texmf\dviwin29\dviwin2.exe
and put it on your desktop, or wherever you prefer to keep
links of this type.  Using the properties item in the menu,
set the "target" for the shortcut to be 

@example
c:\texmf\dviwin29\bin\dviwin2.exe -1
@end example

Now you can preview a file by clicking on the shortcut.
When Dviwin appears, you can select a file using the
"File" menu, which is at the top left corner.

@item
If you like to invoke a screen previewer from the command line,
create a batch file, say "preview.bat" using a text editor,
and place this file somwhere in your path, for example, in
c:\texmf\miktex\bin.  The file should contain two lines:

@example
@@ECHO OFF
start c:\texmf\dviwin29\bin\dviwin2.exe -1 %1
@end example

When you are processing a file, say "jobname.tex" and you
create "jobname.dvi", you can then preview this file
by typing "preview jobname" or "preview jobname.dvi" on 
the command line.  If you just type "preview", then Dviwin 
is started and you then select a file using the "File" menu.
There may be some problems in using such a batch file when
your jobname has spaces or more that one dot.  In this case,
you should use the shortcut.
@end enumerate

@node Configuring Dviwin,  , Installing Dviwin, Dviwin
@subsection Configuring Dviwin

@enumerate
@item
Start the previewer by clicking on the shortcut or by typing 
"preview" if you have created the batch file described above.

@item
First, you must tell Dviwin where to find fonts. 

Pull down the Options menu to "Font Directory."
Following the standard setup for MiK@TeX{}, we recommend typing
the following line in the box:

@example
c:\texmf\fonts\pk\ljfive\tmp\dpi$r;c:\texmf\fonts\pk\cx\tmp\dpi$r
@end example

Note that we are assuming that you will just leave the fonts
in the "tmp" directory and not move them up one level higher
in the directory tree.

@item
This section is based on recommendations provided by John Young.
Go to directory @file{c:\texmf\dviwin29\bin}.  Use your text editor to
create a file called @file{genpk.bat}.  This file should contain
the following lines:

@example
@@ECHO OFF
REM =========================================================
REM Filename:  genpk.bat
REM =========================================================
REM This batch file uses the maketexpk.exe program (with
REM metafont) to create missing fonts when the Dviwin
REM screen previewer is used.  First the resolution determines
REM the mode passed to metafont.
REM =========================================================
set mode=ljfive
if %3==300 set mode=cx
if %3==600 set mode=ljfivemp
REM =========================================================
REM You may need to edit these lines or add
REM additional lines to set the correct METAFONT
REM for your particular printer.
REM =========================================================
c:\texmf\miktex\bin\maketexpk.exe %1 %2 %3 magstep(%4) %mode%
set mode=
REM EOF        
@end example

@item
As commented on in the file @file{genpk.bat}, the building of fonts
is dependent on the mode parameter which is passed to
metafont.  You may want to edit the file genpk.bat to use
modes which correspond to your printer.  See the file 

@example       
c:\texmf\metafont\misc\modes.mf 
@end example

@noindent
to find the mode for your particular printer.  We find that
Dviwin works best at the resolutions of 300 and 600.
The display quality using the ibmvga mode at 110 is not
on the same level.

@item
Pull down the Options Menu to "Missing Fonts."
Mark the tick "Execute command" and insert the following 
line in the Cmd box:

@example
c:\texmf\dviwin29\bin\genpk.bat $f $x $X $m
@end example

@item
As these instructions provide, you can now invoke Dviwin at
the resolutions 300 and 600.  As a general rule, displaying
at 600 will provide sharper resolution, but depending on the size
and quality of your monitor, you may have difficulty getting
a page to fit on your screen, even with the zoom set to 6.  On
a 21" Viewsonic 21PS, a full page of text will almost fit on the
screen when the resolution is set to 600, but it is necessary to 
use the arrow keys to see the last line or two.  A full page at 
300 fits nicely on the screen with the zoom set to 4.
@end enumerate

@node Dvips, GSview, Dviwin, Viewers
@section Dvips

The current version is Dvips 5.74.

@menu
* Configuring Dvips::           Configuring Dvips
@end menu

@node Configuring Dvips,  , Dvips, Dvips
@subsection Configuring Dvips 

Edit the file c:\texmf\dvips\init\config.ps as follows:

@enumerate
@item
Set the resolution and mode for your printer.
If you are using a 300dpi HP Lasejet, there is nothing
to do here, as this is the default.  We are using an 
HP Laserjet 5MP, so we change the second and third lines.
Currently, these lines are: 

@example
D 300
M cx
@end example

We replace them by:

@example   
D 600
M ljfive
@end example

As above, the actual edits you make to config.ps will
depend on you printer (see modes.mf).

@item
The config.ps file included with MiK@TeX{} uses the A4 paper size
as the default.  The fifth and sixth lines read:

@example
@@ A4size 210mm 297mm
@@+ %% PaperSize: A4
@end example

In the US, you will want to replace those lines with a single
line:

@example
@@ letterSize 8.5in 11in
@end example
@end enumerate

@node GSview, Printing, Dvips, Viewers
@section GhostScript and GSview

The current versions are Ghostscript 4.03 and GSview 2.1.

Get the following four files:

@example
ftp://ftp.cs.wisc.edu/ghost/aladdin/gs403fn1.zip
ftp://ftp.cs.wisc.edu/ghost/aladdin/gs403ini.zip
ftp://ftp.cs.wisc.edu/ghost/aladdin/gs403w32.zip
ftp://ftp.cs.wisc.edu/ghost/rjl/gsview21.zip
@end example

@noindent
and save them to a scratch directory on your hard disk, say:

@example     
c:\archive\ghost
@end example

For lots of information on Ghostscript and related programs,
see

@example
http://www.cs.wisc.edu/~ghost/index.html
@end example

Information about downloading and installing the most recent
versions of the software can always be found there.

@menu
* Installing GSview::           Installing GhostScript/GSview
@end menu

@node Installing GSview,  , GSview, GSview
@subsection Installing GhostScript/GSview

To install the system for Windows 95/NT, type:

@example
cd c:\archive\ghost
unzip gsview21.zip
setup.exe
@end example

Almost everything will be taken care of by the setup
program.  When in doubt on a yes/no question, answer yes.
The most meaningful decision you will have to make is where
to put the actual installation.  The default is @file{c:\GStools}.

We recommend making a shortcut to the previewer.
The target for this shortcut will be:

@example
c:\GStools\gsview\gsview32.exe  
@end example

There are a few more setup questions asked the first time 
gsview is run, but they are pretty simple (again, "yes" is 
a pretty safe answer).

Now to preview a postscript file using GSView21, you
click on the shortcut, and use the File menu to select
the particular file.

If you like to work on the command line, create a batch file,
say @file{gsview.bat} with your text editor and place this file
in @file{c:\texmf\miktex\bin}.  The file should contain two lines:

@example
@@ECHO OFF
start c:\GStools\gsview\gsview32.exe %1.ps
@end example

Now to view the postcript file @file{jobname.ps}, you type

@example
gsview jobname
@end example

@noindent
on the command line.

@node Printing,  , GSview, Viewers
@section Printing

There are several ways to print from MiK@TeX{} and the
previewers discussed above.

@menu
* Printing/dvips::              Printing using dvips
* Printing/Dviwin::             Printing using Dviwin.
* Printing/GSview::             Printing using GSview
@end menu

@node Printing/dvips, Printing/Dviwin, Printing, Printing
@subsection Printing using dvips

With a postscript printer, we recommend using dvips since it
offers the fastest printing.  For example, if you have
processed a file, say @file{jobname.tex} with tex or latex and
produced a file @file{jobname.dvi}, which you have previewed and
now want to print, you can type:

@example
dvips jobname
print jobname.ps
@end example

@noindent
to produce a @file{jobname.ps} file which is then sent to your
printer.  This can also be accomplished in one step.  You
can give the single command

@example
dvips -o lpt1 jobname
@end example

Or, you could create the batch file @file{pdvi.bat} and put
it in your path.

@example
@@ECHO OFF
REM =========================================================
REM Filename:  pdvi.bat
REM=========================================================
dvips -o lpt1 %1 %2 %3 %4 %5
@end example

Then, use the command

@example
pdvi jobname
@end example

This final approach may save the most keystrokes if you use
dvips for both printing and for creating @file{.ps} files to be viewed
through GSview.

In all cases, if your printer is connected to a different
port (e.g., @file{COM2}), then you should replace @file{lpt1} by the name
of the correct port.

@node Printing/Dviwin, Printing/GSview, Printing/dvips, Printing
@subsection Printing using Dviwin.

Dviwin can be used to send dvi files to your printer.  It works
fairly well with a wide variety of printers.  If you click on
the @samp{print} command in the file menu, then Dviwin will
send the dvi file to your printer.  Our experience is that
this is fairly slow, although the output is high quality.

One can also have dviwin use dvips for printing.  This is
typically faster (and saves a trip back to the command
line).  Open a test file with Dviwin.  Drag down the
@samp{File} menu and click on @samp{Print}.  You will get a dialogue
window with @samp{Print} in the titlebar.  One of the options
listed in this window is a box for @samp{External print}.  In
this box, you can type:

@example
c:\texmf\miktex\dvips.exe -o lpt1 -p$1 -l$2 $b
@end example

This will pipe the dvi file through dvips and then on to
your printer (again assuming your printer is connected
to the port @file{lpt1}).

@node Printing/GSview,  , Printing/Dviwin, Printing
@subsection Printing using GSview

If you are previewing a file with GSview, then you can also
send the file to your printer.  Curiously, this can also be
done even if you don't have a postscript printer.

@c **************************************************************************

@node Implementation, Index, Viewers, Top
@appendix Implementation details

@menu
* TeX/impl::                    TeX compiler
* dvips/impl::                  dvips
@end menu

@node TeX/impl, dvips/impl, Implementation, Implementation
@section @TeX{} compiler

@table @samp
@item mem_max=1048576
Greatest index in @TeX{}'s internal @code{mem} array.

@item buf_size=3000
Maximum number of characters simultaneously present in
current lines of open file.

@item stack_size=300
Maximum number of simultaneous input sources.

@item max_in_open=20
Maximum number of input files and error insertions that
can be going on simultaneously.

@item font_max=256
Maximum internal font number

@item font_mem_size=131068
Number of words of @code{font_info} for all fonts.

@item param_size=500
Maximum number of simultaneous macro parameters.

@item max_strings=20000
Maximum number of strings.

@item string_vacancies=96000
The minimum number of characters that should be
available for the user's control sequences and font names,
after @TeX{}'s own error messages are stored.

@item pool_size=120000
Maximum number of characters in strings, including all
error messages and help texts, and the names of all fonts and
control sequences.

@item save_size=32768
Space for saving values outside of current group.

@item trie_size=60000
Space for hyphenation patterns.

@item trie_op_size=2048
Space for ``opcodes'' in the hyphenation patterns.

@item dvi_buf_size=8192
Ssize of the output buffer

@item file_name_size=260
File names shouldn't be longer than this.

@item hash_size=20000
Maximum number of control sequences.
@end table

@node dvips/impl,  , TeX/impl, Implementation
@section dvips
@cindex emtex
@cindex tpic
@cindex Hypertext

dvips has been compiled with the following options:

@itemize @bullet
@item
tpic support

@item
Default resolution is 600 dpi

@item
Write @samp{CreationDate} comment into the output file.

@item
Hypertext support

@item
emtex specials support
@end itemize

@c **************************************************************************

@node Index,  , Implementation, Top
@appendix Index

@printindex cp

@c **************************************************************************

@contents
@bye
