MiKTeX Local Guide

Revision 1.01

February 1997

Christian Schenk <cschenk@berlin.snafu.de>


Table of Contents


Copyright (C) 1996, 97 Christian Schenk

What is MiKTeX?

MiKTeX is an implementation of TeX, METAFONT and related utilities for Windows 95 and Windows NT (x86):

TeX 3.14159
Converts plain TeX files into DVI files.
LaTeX2e
Converts LaTeX files into DVI files.
METAFONT 2.718
Converts font specifications into raster fonts.
MetaPost 0.631
Converts picture specifications into PostScript commands.
dvips 5.66
Converts DVI files into PostScript.
MakeIndex 2.12
Composes indexes.
BibTeX 0.99c
Composes bibliographies.
YAP 0.91
A DVI previewer.
Standard LaTeX Packages
AMS-LaTeX, Babel, PSNFSS, ...
TeXware, MFware, psutils, ...
Lots of utilities.

How to get MiKTeX

You can get MiKTeX from any CTAN(1) mirror. MiKTeX is located in the directory `ctandir/systems/win32/miktex' (replace ctandir with the respective CTAN root directory, usually `tex-archive').

Currently there are two participating CTAN nodes:

ftp.dante.de
ftp.tex.ac.uk

The MiKTeX Project Page

Visit the MiKTeX wwww Page for information about new releases, patches and so on:

http://www.snafu.de/~cschenk/miktex

What's new?

This is the list of changes (as against version 1.05):

New Features

Anti-Features

Updates

Improvements

Resolved Problems

Installing MiKTeX

Distribution Files

The MiKTeX 1.06 distribution consists of the following files:

`install.exe'
MiKTeX Installation Utility
`unzip.exe'
UnZip Utility (by courtesy of Info-ZIP)
`amsf106.zip'
AMS-Fonts
`amsl106.zip'
AMS-LaTeX
`babl106.zip'
Babel system
`bib106.zip'
BibTeX input files
`cm106.zip'
Computer Modern fonts
`dvips106.zip'
dvips input files
`ec106.zip'
EC Fonts
`exe106i.zip'
Executables
`latex106.zip'
LaTeX2e base distribution and format file
`mf106.zip'
METAFONT input files
`misc106.zip'
MiKTeX input files
`mkind106.zip'
MakeIndex input files
`mp106.zip'
PostScript fonts for LaTeX2e
`src106.zip'
Source code
`sty106.zip'
Various LaTeX packages
`tex106.zip'
Plain TeX input files and format file
`vga106.zip'
Packed raster font files for the screen

Installation

  1. Make sure you have all the required zip files and the two executables.
  2. Choose a name for the destination directory, say `c:\texmf'.
  3. If you are updating:
    1. You may want to backup some files (notably `dvips\config.ps' and `miktex\config\miktex.environment') before proceeding with step 4.
    2. On-the-fly generation of EC fonts fails, if the DC-font source files are laying around in the TeXMF hierarchy. It's best is to delete the DC font sources:
      del c:\texmf\fonts\sources\public\dc\*.*
      rmdir c:\texmf\fonts\sources\public\dc
      
  4. Run `install.exe'. When prompted for the destination directory, enter the name chosen in step 2. Here is the transcript of a typical installation process:
    C:\temp> install
    Welcome to MiKTeX 1.07 Installation Utility. This program will
    install MiKTeX 1.07 on your system.
    
    MiKTeX 1.07 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.07. Enter `cancel' to
    cancel the installation.
    
    Destination Directory: d:\texmf
    
    Select optional components that you wish to install:
    
    MiKTeX source files ? [yes/no] no
    
    PK font files for the screen ? [yes/no] yes
    
    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...
    Installing LaTeX2e base distribution and format file...
    Installing Generic METAFONT input files and plain base file...
    Installing MiKTeX input files...
    Installing Generic MakeIndex input files...
    Installing Generic MetaPost input files and plain mem file...
    Installing PostScript fonts for LaTeX2e...
    Installing Various LaTeX packages...
    Installing Generic TeX input files and plain format file...
    Installing PK font files for the screen...
    Writing filename database d:\texmf\miktex\config\texmf.fndb...
    
    Checking that the installation worked:
    
    1. Invoking TeX...
    
    This is TeX, Version 3.14159 (MiKTeX 1.07)
    (test.tex [1] )
    Output written on test.dvi (1 page, 484 bytes).
    Transcript written on test.log.
    
    2. Opening DVI file...
    
    Installation is complete. Please append `d:\texmf\miktex\bin' to
    the environment variable `PATH' and reboot the system.
    
  5. Add the MiKTeX bin directory to the environment variable `PATH'. Under Windows 95 you have to append something like
    set PATH=%PATH%;c:\texmf\miktex\bin
    
    to your `autoexec.bat'. Under Windows NT you can use Control Panel to change the value of `PATH'.
  6. Restart Windows.

If you intend to use dvips, make sure that the settings in `dvips/init/config.ps' match your printer. See See section Configuring dvips, for more information.

The TeX directory structure

This chapter briefly describes the proposed TeX directory structure (TDS). A complete description can be found in A Directory Structure for TeX Files by the TDS Working Group.

The TeX root directory (usually `c:\texmf') contains the following subdirectories:

`bibtex'
For BibTeX input files.
`doc'
For user documentation.
`dvips'
For dvips input files.
`fonts'
For font files.
`makeindex'
For MakeIndex input files.
`metafont'
For METAFONT input files (not font files).
`metapost'
For MetaPost input files.
`miktex'
For MiKTeX related files (application, format files, ...).
`source'
For source files.
`tex'
For TeX input files.

Contents of the MikTeX directory

The MiKTeX directory (usually `c:\texmf\miktex') is reserved for implementation dependend files. It contains these five subdirectories:

`base'
For `.base' (METAFONT base) files.
`bin'
For executable files.
`config'
This directory contains the configuration file `miktex.environment' and the configuration utility `configure.exe' (see section How to configure MiKTeX). Furthermore this directory contains the filename database `texmf.fndb'.
`fmt'
For `.fmt' (TeX format) files.
`mem'
For `.mem' (MetaPost Memory) files.

How to configure MiKTeX

Read this chapter if you intend to change or extend the TeX directory structure.

MiKTeX configuration parameters are stored in the Windows Registry under the key

HKEY_LOCAL_MACHINE\SOFTWARE\MiK\MiKTeX\\CurrentVersion

Instead of changing the settings with the help of Registry Editor(regedit, you use a text editor (e.g. notepad.exe to edit the configuration file `miktex.environment' and then run the configuration utility configure.exe to update the Windows Registry.

Both `miktex.environment' and configure.exe are located in the directory `c:\texmf\miktex\config'.

MiKTeX makes use of a filename data base (fndb). The data base is stored in the file `texmf.fndb' which is located in the MiKTeX config directory.

`miktex.environment'

`miktex.environment' is divided into several named sections. Each section contains configuration settings for a specific application.

General configuration settings

`[MiKTeX]debug'
debug is normally false. The value true causes MiKTeX to output diagnostic information.

TeX related configuration settings

`[TeX]Font Metric Dirs'
The search path (see section How to specify search paths) for `.tfm' (TeX Font Metric) files. Standard is `.;%R\fonts\tfm//'.
`[TeX]Font Metric Temp Dir'
The directory where newly created `.tfm' files will be installed. It must be in `[TeX]Font Metric Dirs' too. Standard is `%R\fonts\tfm\tmp'. Admin note: MiKTeX users must have permission to create files in the specified directory.
`[TeX]Format Dirs'
Where plain TeX looks for format files. Standard is `%R\miktex\fmt//'.
`[TeX]Format Temp Dir'
The directory where newly created `.fmt' files will be installed. It must be in `[TeX]Format Dirs' too. Standard is `%R\miktex\fmt\tmp'. Admin note: All MiKTeX users must have permission to create files in the specified directory.
`[TeX]Input Dirs'
Where plain TeX looks for input files. Standard is `.;%R\tex//'.

LaTeX related configuration settings

`[LaTeX]Input Dirs'
Where LaTeX looks for input files. Standard is `.;%R\tex\latex//;%R\tex//'.

METAFONT related settings

`[METAFONT]Base Dirs'
Search path (see section How to specify search paths) for `.base' (METAFONT Base) files. Standard is `.;%R\miktex\base'.
`[METAFONT]Input Dirs'
Search path for METAFONT input files. Standard is `.;%R\fonts\source//;%R\metafont//'.

MakeTeXPK related settings

`[MakeTeXPK]PK Temp Dir'
The specification of a directory where newly created PK (Packed Raster Font) files will be installed. The specifiation may include special character sequences which are replaced at search-time:
`%%m'
The current METAFONT mode.
`%%d'
The horizontal resolution (in dots per inch).

Standard is `%R\fonts\pk\%%m\tmp\dpi%%d'. Admin note: All MiKTeX users must have permission to create files in the specified directory.

dvips related settings

`[dvips]DVIPSHEADERS'
Search path (see section How to specify search paths) for dvips header files. Standard is `%R\dvips\inputs'.
`[dvips]TEXFONTS'
Search path for `.tfm' files. This should be the same as `Font Metric Dirs' (see section TeX related configuration settings).
`[dvips]TEXPKS'
Search path for `.pk' files. The specifiation may include special character sequences which are replaced at search-time:
`%%m'
The current METAFONT mode.
`%%d'
The horizontal resolution (in pixels).
Standard setting is `%R\fonts\pk\%%m//dpi%%d'.
`[dvips]TEXINPUTS'
Search path for figure files. Standard is `.;%R\dvips\inputs'.
`[dvips]TEXCONFIG'
Search path for dvips configuration files (such as `config.ps'). Standard is `.;%R\dvips\init'.
`[dvips]VFONTS'
Search path for `.vf' (Virtual Font) files. Standard is `.;%R\fonts\vf//'.

MakeIndex related settings

`[MakeIndex]INDEXSTYLE'
Search path (see section How to specify search paths) for MakeIndex style files. Standard is `.;%R\makeindex'.

BibTeX related settings

`[BibTeX]Input Dirs'
Search path (see section How to specify search paths for BibTeX input files (both databases and style files). Standard is `.;%R\bibtex//'.

How to specify search paths

Search paths are used to find special files (such as TeX input files) in a directory hierarchy.

A search path is a list of directory names. List entries are separated by semicolons (`;'). In a directory name, the following character seqeuences have a special meaning:

`%R'
A placeholder for the TeX root directory (e.g. `c:\texmf').
`//'
Causes MiKTeX to perform a recursive search.

Search paths are processed from left to right.

Example

Assuming that `c:\texmf' is the TeX root directory, the search path `.;%R\tex\latex//;%R\tex//' causes LaTeX to search its input files in the following locations:

  1. In the current directory (`.').
  2. In the directory `c:\texmf\tex\latex' and in all directories under `c:\texmf\tex\latex'.
  3. In the directory `c:\texmf\tex' and in all directories under `c:\texmf\tex'.

Invoking configure

configure.exe, the MiKTeX configuration utility, is located in the directory `c:\texmf\miktex\config'. It reads configuration settings from `miktex.environment' and modifies the Registry accordingly. Admin note: You must have permission to change values in the subtree `HKEY_LOCAL_MACHINE\SOFTWARE\MiK\MiKTeX' of the Windows Registry.

You can specify a number of options to modify the behaviour of configure.exe:

`-c filename'
`--config filename'
Specify the configuration file.
`-n'
`--print-only'
Print what would be done. Nothing is changed.
`-r directory'
`--root-directory directory'
Define directory as the new TeX root directory. This option is usefull when you move the TeX directory hierarchy.
`-u'
`--update-fndb'
Refresh the filename database (see section Maintaining the filename data base). Admin note: You must have read-write permission for the file `texmf.fndb'.
`-v'
`--verbose'
Print information on what is being done.
`-V'
`--version'
Print the version number and exit.

Alternative Configuration Files

You can specify an alternative configuration file by using the option `--config'. This is useful if the "master" configuration file is read-only. `miktex.environment'.

Maintaining the filename data base

MiKTeX makes use of a list of known filenames, called the filename data base (fndb). The data base is stored in the file `texmf.fndb'. It is strongly recommended to update `texmf.fndb' whenever files are added to or removed from the TeXMF hiearchy.

You update the filename database by invoking configure.exe with the `--update-fndb' option:

configure --update-fndb

Admin note: You must have read-write permission for `texmf.fndb'.

Programs

In this chapter you will find short manuals for the various programs. You will find more detailed information in the doc directory (usually `c:\texmf\doc'.

How to run TeX

The usual way to invoke TeX is as follows:

tex firstinputline

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

For example, the command

tex story.tex

causes TeX to produce the DVI file `story.dvi' from the input file `story.tex'. You can specify the input file without the `.tex' extension:

tex story

You must specify the `.tex' extension if the filename contains more than one dot. For example, it does not work to say

tex foo.bar

You have to say

tex foo.bar.tex.

instead.

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

How to run LaTeX

The usual way to invoke LaTeX is as follows:

latex latexfile

latexfile is the name of a file which contains LaTeX commands. See Info file `../latex/help/latex2e', node `Top', for more information on LaTeX.

How to create a new format file for LaTeX

The usual way to create a new LaTeX format file is as follows:

initex latex.ltx

This creates the format file `latex.fmt' which you have to move to the format directory (usually `c:\texmf\miktex\fmt').

Loading of hyphenation patterns

You can control the loading of hyphenation patterns by modifying the file `language.dat' which is located in the directory `c:\texmf\tex\generic\hyphen'.

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 `.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 `dvips.dvi' in the `doc\dvips' directory.

Configuring dvips

`config.ps' is the central dvips configuration file is . It is located in the directory `c:\texmf\dvips\init'.

You should inspect `config.ps' and see, if it matches your printer. See the dvips manual for more information.

Command line options

[ This section is borrowed from the dvips manual. ]

The usual way to invoke dvips is as follows

dvips options dvifile

dvifile may be specified without the `.dvi' extension.

Options

`-a'
Conserve memory by making three passes over the `.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.
`-A'
Print only odd pages (TeX pages, not sequence pages).
`-b num'
Generate num copies of each page, but duplicating the page body rather than using the #numcopies option. This can be useful in conjunction with a header file setting char92bop-hook to do color separations or other neat tricks.
`-B'
Print only even pages (TeX pages, not sequence pages).
`-c num'
Generate num copies of every page. Default is 1. (For collated copies, see the `-C' option below.)
`-C num'
Create num copies, but collated (by replicating the data in the PostScript file). Slower than the `-c' option, but easier on the hands, and faster than resubmitting the same PostScript file multiple times.
`-D num'
Set the resolution in dpi (dots per inch) to 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 `-Z' flag should probably also be used.
`-e 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.
`-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 tfm file, so characters that lie outside their enclosing 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.)
`-f'
Read the `.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 `PRINTER' environment variable, and turns off the automatic sending of control D if it was turned on with the `-F' option or in the configuration file; use `-F' after this option if you want both.
`-h name'
Prepend file name as an additional header file. (However, if the name is simply `-' suppress all header files from the output.) This header file gets added to the PostScript `userdict'.
`-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 `-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.
`-k'
Print crop marks. This option increases the paper size (which should be specified, either with a paper size special or with the `-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.
`-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 `%%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.
`-l num'
The last page printed will be the first one numbered num Default is the last page in the document. If the num is prefixed by an equals sign, then it (and any argument to the `-p' option) is treated as a sequence number, rather than a value to compare with char92 count0 values. Thus, using `-l =9' will end with the ninth page of the document, no matter what the pages are actually numbered.
`-m'
Specify manual feed for printer.
`-M'
Turns off the automatic font generation facility. If any fonts are missing, commands to generate the fonts are appended to the file `missfont.log' in the current directory; this file can then be executed and deleted to create the missing fonts.
`-n num'
At most num pages will be printed. Default is 100000.
`-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.
`-o name'
The output will be sent to file name If no file name is given, the default name is `file.ps' where the `.dvi' file was called `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 popen; thus, specifying `!lpr' as the output file will automatically queue the file for printing. This option also disables the automatic reading of the `PRINTER' environment variable, and turns off the automatic sending of control D if it was turned on with the `-F' option or in the configuration file; use `-F' after this option if you want both.
`-O offset'
Move the origin by a certain amount. The offset is a comma-separated pair of dimensions, such as `.1in,-.3cm' (in the same syntax used in the `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.
`-p num'
The first page printed will be the first one numbered num. Default is the first page in the document. If the num is prefixed by an equals sign, then it (and any argument to the `-l' option) is treated as a sequence number, rather than a value to compare with char92 count0 values. Thus, using `-p =3' will start with the third page of the document, no matter what the pages are actually numbered.
`-pp pagelist'
A comma-separated list of pages and ranges (a-b) may be given, which will be interpreted as char92 count0 values. Pages not specified will not be printed. Multiple `-pp' options may be specified or all pages and page ranges can be specified with one `-pp' option.
`-P printername'
Sets up the output for the appropriate printer. This is implemented by reading in `config.printername', which can then set the output pipe (as in, `!lpr -Pprintername' as well as the font paths and any other `config.ps' defaults for that printer only. Note that `config.ps' is read before `config.printername' In addition, another file called `~/.dvipsrc' is searched for immediately after `config.ps'; this file is intended for user defaults. If no `-P' command is given, the environment variable `PRINTER' is checked. If that variable exists, and a corresponding configuration file exists, that configuration file is read in.
`-q'
Run in quiet mode. Don't chatter about pages converted, etc.; report nothing but errors to standard error.
`-r'
Stack pages in reverse order. Normally, page 1 will be printed first.
`-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.
`-S num'
Set the maximum number of pages in each `section'. This option is most commonly used with the `-i' option; see that documentation above for more information.
`-t papertype'
This sets the paper type to papertype. The papertype should be defined in one of the configuration files, along with the appropriate code to select it. (Currently known types include `letter', `legal', `ledger', `a4', `a3'). You can also specify `-t landscape', which rotates a document by 90 degrees. To rotate a document whose size is not letter, you can use the `-t' option twice, once for the page size, and once for landscape. The upper left corner of each page in the `.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 `letter' or `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.
`-T `offset''
Set the paper size to the given pair of dimensions. This option takes its arguments in the same style as `-O.' It overrides any paper size special in the dvi file.
`-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.
`-x num'
Set the magnification ratio to num/1000. Overrides the magnification specified in the `.dvi' file. Must be between 10 and 100000.
`-X num'
Set the horizontal resolution in dots per inch to num.
`-Y num'
Set the vertical resolution in dots per inch to num.
`-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.

MakeIndex

MakeIndex is a program for making an index in a document generated with LaTeX. See `doc\makeindex\makeindex.dvi' for more information.

MakeIndex command line options

[ This section is borrowed from the MakeIndex manual. ]

The usual way to invoke MakeIndex is as follows:

makeindex options [idx0 idx1 idx2...]

Options

`-c'
Compress intermediate blanks (ignoring leading and trailing blanks and tabs). By default, blanks in the index key are retained.
`-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.
`-i'
Take input from stdin. When this option is specified and `-o' is not, output is written to stdout.
`-l'
Letter ordering; by default, word ordering is used (see the ORDERING section).
`-o ind'
Employ ind as the output index file. By default, the file name is created by appending the extension `.ind' to the base name of the first input file (idx0).
`-p num'
Set the starting page number of the output index file to be num (useful when the index file is to be formatted separately). The argument num may be numerical or one of the following:
`any'
The starting page is the last source page number plus 1.
`odd'
The starting page is the first odd page following the last source page number.
`even'
The starting page is the first even page following the last source page number.
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 `.log' to the base name of the first input file (idx0).
`-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.
`-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).
`-s sty'
Employ sty as the style file (no default). The environment variable `INDEXSTYLE' defines the path where the style file should be found.
`-t log'
Employ log as the transcript file. By default, the file name is created by appending the extension `.ilg' to the base name of the first input file (idx0).

BiBTeX

You use BibTeX in conjunction with LaTeX to compose bibliographies.

How to run BibTeX

The usual way to invoke BibTeX is as follows:

bibtex inputfilename

inputfilename must be specified without the extension.

BibTeX databases and style files

`.bst' (BibTeX style files) are located in the directory `c:\texmf\bibtex\bst'.

`.bib' (BibTeX databases) are located in the directory `c:\texmf\bibtex\bib'.

Yet Another Previewer

YAP is a DVI previewer, i.e. it allows you to view your TeXed documents before you send them to the printer.

The usual way to invoke YAP is as follows:

yap `document.dvi'

This opens the file `document.dvi' and displays its first page. Note that you cannot omit the `.dvi' extension from the filename.

Generating missing fonts

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

Printing using YAP

You can use YAP to send the whole document (or individual pages) to the printer:

  1. Select `Options...' from the `View' menu.
  2. Open the `Printer' page.
  3. Choose the correct mode for your printer (see `modes.mf' for details).
  4. Enter the correct resolution for your printer.
  5. Close the dialog box and select `Print...' from the `File' menu.

Screen Previewers for MiKTeX

This chapter was contributed by John Jones and Tom Trotter.

Comments, corrections and suggestions for improvements welcomed:

  John Jones      jj@ASU.edu
  Tom Trotter     trotter@ASU.edu

  Department of Mathematics
  Arizona State University
  Tempe, Arizona 85287
  USA

MiKTeX 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 MiKTeX installation with somewhat more flexible screen previewers. This HOWTO describes the procedures for setting up two alternative screen previewers:

  1. Dviwin (Hippocrates Sendoukas).
  2. Ghostscript (Aladdin Enterprises), and GSview graphical interface (Russell Lang).

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 MiKTeX installed on your computer and that the root directory for MiKTeX 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.

Dviwin

The current version is Dviwin 2.9.

Get the file:

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

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

c:\archive\dviwin29

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

Installing Dviwin

  1. Make the following directories:
    mkdir c:\texmf\dviwin29
    mkdir c:\texmf\dviwin29\bin
    mkdir c:\texmf\dviwin29\doc
    mkdir c:\texmf\dviwin29\filters
    
  2. Go to the Dviwin scratch directory and extract the files.
    cd c:\archive\dviwin29
    unzip dviwin29.zip
    unzip dviwin32.zip
    
  3. 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.
  4. Now that you're ready to resume the installation...
    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
    
  5. 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 d:\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.
  6. 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:
    [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
    
  7. 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
    c:\texmf\dviwin29\bin\dviwin2.exe -1
    
    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.
  8. 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:
    @ECHO OFF
    start c:\texmf\dviwin29\bin\dviwin2.exe -1 %1
    
    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.

Configuring Dviwin

  1. Start the previewer by clicking on the shortcut or by typing "preview" if you have created the batch file described above.
  2. First, you must tell Dviwin where to find fonts. Pull down the Options menu to "Font Directory." Following the standard setup for MiKTeX, we recommend typing the following line in the box:
    c:\texmf\fonts\pk\ljfive\tmp\dpi$r;c:\texmf\fonts\pk\cx\tmp\dpi$r
    
    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.
  3. This section is based on recommendations provided by John Young. Go to c:\texmf\dviwin29\bin. Use your text editor to create a file called genpk.bat. This file should contain the following lines:
    @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=ljfive
    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        
    
  4. As commented on in the 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
    c:\texmf\metafont\misc\modes.mf 
    
    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.
  5. Pull down the Options Menu to "Missing Fonts." Mark the tick "Execute command" and insert the following line in the Cmd box:
    c:\texmf\dviwin29\bin\genpk.bat $f $x $y $m
    
  6. 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.

Dvips

The current version is Dvips 5.58.

Configuring Dvips

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

  1. 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:
    D 300
    M cx
    
    We replace them by:
    D 600
    M ljfive
    
    As above, the actual edits you make to config.ps will depend on you printer (see modes.mf).
  2. The config.ps file included with MiKTeX uses the A4 paper size as the default. The fifth and sixth lines read:
    @ A4size 210mm 297mm
    @+ %% PaperSize: A4
    
    In the US, you will want to replace those lines with a single line:
    @ letterSize 8.5in 11in
    

GhostScript and GSview

The current versions are Ghostscript 4.03 and GSview 2.1.

Get the following four files:

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

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

c:\archive\ghost

For lots of information on Ghostscript and related programs, see

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

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

Installing GhostScript/GSview

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

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

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 `c:\GStools'.

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

c:\GStools\gsview\gsview32.exe  

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 `gsview.bat' with your text editor and place this file in `c:\texmf\miktex\bin'. The file should contain two lines:

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

Now to view the postcript file `jobname.ps', you type

gsview jobname

on the command line.

Printing

There are several ways to print from MiKTeX and the previewers discussed above.

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 `jobname.tex' with tex or latex and produced a file `jobname.dvi', which you have previewed and now want to print, you can type:

dvips jobname
print jobname.ps

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

dvips -o lpt1 jobname

Or, you could create the batch file `pdvi.bat' and put it in your path.

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

Then, use the command

pdvi jobname

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

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

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 `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 `File' menu and click on `Print'. You will get a dialogue window with `Print' in the titlebar. One of the options listed in this window is a box for `External print'. In this box, you can type:

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

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

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.

Implementation details

TeX compiler

`mem_max=262136'
Greatest index in TeX's internal mem array.
`buf_size=500'
Maximum number of characters simultaneously present in current lines of open file.
`stack_size=200'
Maximum number of simultaneous input sources.
`max_in_open=20'
Maximum number of input files and error insertions that can be going on simultaneously.
`font_max=256'
Maximum internal font number
`font_mem_size=131068'
Number of words of font_info for all fonts.
`max_strings=20000'
Maximum number of strings.
`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.
`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.
`save_size=4000'
Space for saving values outside of current group.
`trie_size=60000'
Space for hyphenation patterns.
`trie_op_size=2048'
Space for "opcodes" in the hyphenation patterns.
`dvi_buf_size=8192'
Ssize of the output buffer
`file_name_size=260'
File names shouldn't be longer than this.
`hash_size=20000'
Maximum number of control sequences.

LaTeX

Latex makes use of EC fonts.

dvips

dvips has been compiled with the following options:

Index

.

  • .base, .base
  • .bib
  • .bst
  • .fmt, .fmt
  • .tfm
  • a

  • Administrator, Administrator, Administrator, Administrator
  • b

  • Base Dirs
  • c

  • config.ps
  • configure.exe
  • d

  • DVIPSHEADERS
  • e

  • emtex
  • f

  • Font Metric Dirs
  • Format Dirs
  • h

  • HKEY_LOCAL_MACHINE\SOFTWARE\MiK\MiKTeX
  • Hypertext
  • i

  • INDEXSTYLE
  • Input Dirs, Input Dirs, Input Dirs, Input Dirs
  • j

  • Jones, John
  • l

  • language.dat
  • latex.fmt
  • m

  • MiKTeX Directory
  • miktex.environment
  • p

  • PK Temp Dir
  • t

  • TEXCONFIG
  • TEXFONTS
  • TEXINPUTS
  • texmf.fndb
  • TEXPKS
  • tpic
  • Trotter, Tom
  • v

  • VFONTS
  • w

  • Windows Registry

  • Footnotes

    (1)

    CTAN: Comprehensive TeX Archive Network


    This document was generated on 14 Febuary 1997 using the texi2html translator version 1.51.