12/1/94
=======

This is the distribution for DVIWIN 2.9 which is a DVI driver for previewing
and printing DVI files under MS-Windows 3.1 and Windows NT. The following
steps will help you install the program as quickly as possible. You CAN use
both versions under Windows 3.1 or Windows NT, but I would suggest that you
use the 16-bit version under Windows 3.1 or Win-OS/2, and the 32-bit version
under Windows NT. Both versions SHOULD also run without problems under
Chicago, but neither has been tested under that system.

===========================================================================
I. Installing the 16-bit version
===========================================================================

1. Basic program setup
   a. Copy the files dviwin.exe, wbr.exe, clipmeta.exe, dde2exe.exe,
      miscwin.dll, graphio.dll, dviwin.str, wbr.str, clipmeta.str,
      genpk.bat, genpk.pif, genall.bat, genall.pif, dviwin.hlp and
      wbr.hlp to any directory in your path. Copy the file ctl3dv2.dll
      to the windows\system directory.
   b. Add a section in win.ini about the graphics filters. The section
      should look like:
         [MS Graphic Import Filters]
         PC Paintbrush(.PCX)=XXXXXX\pcxin.flt,PCX
         Microsoft Paint(.MSP)=XXXXXX\mspin.flt,MSP
         Bitmaps(.BMP)=XXXXXX\bmpin.flt,BMP
         Bitmaps(.DIB)=XXXXXX\bmpin.flt,DIB
         Bitmaps(.RLE)=XXXXXX\bmpin.flt,RLE
         Compuserve GIF(.GIF)=XXXXXX\gifin.flt,GIF
         X Pixmaps(.XPM)=XXXXXX\xpmin.flt,XPM
      where XXXXXX is the name of the directory where you want to
      store the filters. Then place the five filters (pcxin.flt, mspin.flt,
      bmpin.flt, gifin.flt and xpmin.flt) in the specified directory.
   c. Make an entry in a Program Manager group and specify the command line
      as: "dviwin.exe -1"
   d. Make new entries in one of your Program Manager groups for the two
      other programs (wbr.exe and clipmeta.exe).

2. Font setup
   a. You can use FLI files by placing them in any directory and specifying
      the directory name in the "Font Directory" entry in the Options menu.
   b. Alternatively, you can use PK files by storing them in separate
      directories according to their resolution and specifying a template in
      the "Font Directory" entry in the Options menu. In the template, the
      sequence $r will be substituted by the actual resolution number at
      runtime. If for example you store the PK files in the directories
      "c:\texfonts\300", "c:\texfonts\360", etc., the template should be:
      "c:\texfonts\$r"

3. Metafont linkage for automatic generation of missing fonts
   a. You first need a working copy of Metafont and gftopk.exe; these
      can be obtained from the net. Follow the Metafont instructions
      to install that program.
   b. Follow the instructions in the comments of the file genpk.bat to
      generate the plain base (which should include the information from
      the file modes.mf).
   c. Edit the first four statements in the file genpk.bat to tailor the
      file to your directory setup.
   d. Select the "Execute command" option from the "Missing Fonts" entry
      in the "Options" menu of dviwin. The "Cmd." field should be:
           genpk.pif /e:2048 /c genpk.bat $f $m $x $y $X $Y $d $p $e
   e. The above option does not work properly under NT or OS/2. In
      those cases, select the option "Append line to file and execute
      command" from the "Missing Fonts" entry in the "Options" menu.
      The "Line" field should be:
           call genpk $f $m $x $y $X $Y $d $p $e
      The "File" field should be:
           $(TEMP)\missing.bat
      The "Cmd." field should be:
           genall.pif $(TEMP)\missing.bat

4. Editor linkage for inverse search
   Dviwin can interface with most text editors supporting the DDE protocol.
   PFE is such an editor and is freely available from ftp.cica.indiana.edu.
   The interface is accomplished by setting several fields in the "Inverse
   Search" dialog from the "Options" menu. Set the "Command" field to
   "pfe.exe $f", the "Service" field to "PFE", the "Topic" field to "System",
   the "Message 1" field to "[FileOpen("$f")] [EditGotoLine($l,0)]
   [EditSelectLine()]", leave the "Message 2" field empty, and check the
   "Uses DDE" box (You'll need PFE version 0.05.007G or later). When you
   double click the left mouse button, dviwin will instruct PFE to display
   the appropriate TeX file at the appropriate location (provided of course
   that the DVI file contains src specials). For more info on this, please
   read the dviwin help file.

5. Editor setup for forward search
   You can also do a forward search (ie., find the location in the DVI file
   that corresponds to a particular location in the TeX file) provided that
   the DVI file contains src specials. Assuming that you use PFE, go to the
   "Configure Windows Tools" dialog from the "Execute" menu, set the "Tool"
   field to "Dviwin" and the "Command Line" field to:
   dde2exe 'dviwin -1 -s\'' PFE|Editor!LineNumber ' ' PFE|Editor!FileName '\''
   Once you load a TeX file, you will be able to do a forward search by
   selecting the "Dviwin" tool from the "Launch Windows Tool" dialog in the
   "Execute" menu. If the DVI file contains src specials, dviwin will
   try to position you at the DVI location corresponding to the current
   line number of the current file.

6. External print linkage
   Assuming that you want to use dvips (version 5.49 or later) for printing,
   you can do the following steps:
   a. Write a batch file called rundvips.bat containing the lines:
         dvips -p=%1 -l=%2 %4 %3
         copy %3.ps prn /b
         del %3.ps
   b. Make a PIF file called rundvips.pif for the above batch file
   c. Go to the Print dialog from the File menu, specify the external
      print template as:
         rundvips.pif $1 $2 $b $R-r
      and check the "Enable" box.

===========================================================================
II. Installing the 32-bit version
===========================================================================

1. Basic program setup
   a. Copy the files dviwin2.exe, wbr2.exe, clipmet2.exe, dde2exe2.exe,
      miscwin2.dll, graphio2.dll, dviwin.str, wbr.str, clipmeta.str,
      genpk.bat, genpk.pif, genall.bat, genall.pif, dviwin.hlp and wbr.hlp
      to any directory in your path. Copy the file ctl3d32.dll to the
      windows\system directory (or windows\system32 under NT). Note that
      all 32-bit executables are inside the file "dviwin32.zip", so you
      will need to unzip that file first.
   b. Add a section in win.ini about the graphics filters. The section
      should look like:
         [NT Graphic Import Filters]
         PC Paintbrush(.PCX)=XXXXXX\pcxin2.flt,PCX
         Microsoft Paint(.MSP)=XXXXXX\mspin2.flt,MSP
         Bitmaps(.BMP)=XXXXXX\bmpin2.flt,BMP
         Bitmaps(.DIB)=XXXXXX\bmpin2.flt,DIB
         Bitmaps(.RLE)=XXXXXX\bmpin2.flt,RLE
         Compuserve GIF(.GIF)=XXXXXX\gifin2.flt,GIF
         X Pixmaps(.XPM)=XXXXXX\xpmin2.flt,XPM
      where XXXXXX is the name of the directory where you want to
      store the filters. Then place the five filters (pcxin2.flt, mspin2.flt,
      bmpin2.flt, gifin2.flt and xpmin2.flt) in the specified directory.
   c. Make an entry in a Program Manager group and specify the command line
      as: "dviwin2.exe -1"
   d. Make new entries in one of your Program Manager groups for the two
      other programs (wbr2.exe and clipmeta2.exe).

2. Font setup
   a. You can use FLI files by placing them in any directory and specifying
      the directory name in the "Font Directory" entry in the Options menu.
   b. Alternatively, you can use PK files by storing them in separate
      directories according to their resolution and specifying a template in
      the "Font Directory" entry in the Options menu. In the template, the
      sequence $r will be substituted by the actual resolution number at
      runtime. If for example you store the PK files in the directories
      "c:\texfonts\300", "c:\texfonts\360", etc., the template should be:
      "c:\texfonts\$r"

3. Metafont linkage for automatic generation of missing fonts
   a. You first need a working copy of Metafont and gftopk.exe; these
      can be obtained from the net. Follow the Metafont instructions
      to install that program.
   b. Follow the instructions in the comments of the file genpk.bat to
      generate the plain base (which should include the information from
      the file modes.mf).
   c. Edit the first four statements in the file genpk.bat to tailor the
      file to your directory setup.
   d. Select the "Execute command" option from the "Missing Fonts" entry
      in the "Options" menu of dviwin. The "Cmd." field should be:
           genpk.pif /e:2048 /c genpk.bat $f $m $x $y $X $Y $d $p $e
   e. The above option does not work properly under 16-bit Windows. In
      those cases, select the option "Append line to file and execute
      command" from the "Missing Fonts" entry in the "Options" menu.
      The "Line" field should be:
           call genpk $f $m $x $y $X $Y $d $p $e
      The "File" field should be:
           $(TEMP)\missing.bat
      The "Cmd." field should be:
           genall.pif $(TEMP)\missing.bat

4. Editor linkage for inverse search
   Dviwin can interface with most text editors supporting the DDE protocol.
   PFE is such an editor and is freely available from ftp.cica.indiana.edu.
   The interface is accomplished by setting several fields in the "Inverse
   Search" dialog from the "Options" menu. Set the "Command" field to
   "pfe32.exe $f", the "Service" field to "PFE32", the "Topic" field to
   "System", the "Message 1" field to "[FileOpen("$f")] [EditGotoLine($l,0)]
   [EditSelectLine()]", leave the "Message 2" field empty, and check the
   "Uses DDE" box (You'll need the 32-bit version of PFE version 0.05.007G
   or later). When you double click the left mouse button, dviwin will
   instruct PFE to display the appropriate TeX file at the appropriate
   location (provided of course that the DVI file contains src specials).
   For more info on this, please read the dviwin help file.

5. Editor setup for forward search
   You can also do a forward search (ie., find the location in the DVI file
   that corresponds to a particular location in the TeX file) provided that
   the DVI file contains src specials. Assuming that you use PFE, go to the
   "Configure Windows Tools" dialog from the "Execute" menu, set the "Tool"
   field to "Dviwin" and the "Command Line" field to:
   dde2exe2 'dviwin2 -1 -s\'' PFE32|Editor!LineNumber ' ' PFE32|Editor!FileName '\''
   Once you load a TeX file, you will be able to do a forward search by
   selecting the "Dviwin" tool from the "Launch Windows Tool" dialog in the
   "Execute" menu. If the DVI file contains src specials, dviwin will
   try to position you at the DVI location corresponding to the current
   line number of the current file.

6. External print linkage
   Assuming that you want to use dvips (version 5.49 or later) for printing,
   you can do the following steps:
   a. Write a batch file called rundvips.bat containing the lines:
         dvips -p=%1 -l=%2 %4 %3
         copy %3.ps prn /b
         del %3.ps
   b. Make a PIF file called rundvips.pif for the above batch file
   c. Go to the Print dialog from the File menu, specify the external
      print template as:
         rundvips.pif $1 $2 $b $R-r
      and check the "Enable" box.

===========================================================================
III. Some more steps...
===========================================================================

1. Read or print the documentation files "whats.new", "dviwin.wri"
   and "helpme.wri". There are several changes in this version,
   so please read these files.

2. If you want to inspect or modify the source code of the graphics
   filters, unzip the file "graphio.zip" using the "-d" switch in
   pkunzip and read the "readme" files for each directory.

3. Make sure that you have a statement "FILES=50" (or more) in your
   config.sys file.

The following 3 steps apply only if you are doing an initial installation:

4. The first time that you run "dviwin.exe", go to the "Font Directory"
   entry in the "Options" submenu and specify the base directory for
   your fonts followed by \$r. In the above example, the font directory
   entry should be "c:\tex\pkfonts\$r". If this step is not done, you will
   see NOTHING.

5. You will also need a collection of PK font files in various
   resolutions; many such files can be found in the SIMTEL archives
   or any of its mirrors. In general, you want to get at least printer
   fonts, and optionally screen fonts. as well as for your printer
   Most (but not all) screen fonts are in the files "dvivga2.zip" through
   "dvivga8.zip" in the directory pub/msdos/tex of oak.oakland.edu. When
   you get these files, arrange them as following:

     a. Make a "base" directory (eg., c:\tex\pkfonts)
     b. Make a subdirectory under the base directory for each resolution.
        The name of each subdirectory should simply be the resolution.
        For example, you can make the subdirectories "c:\tex\pkfonts\300",
        "c:\tex\pkfonts\329", "c:\tex\pkfonts\360" for the 300 dpi, 329
        dpi and 360 dpi resolutions respectively.
     c. Put your PK font files in the correct subdirectories according
        to their resolution.

6. Using a resolution between 100 and 145 dpi, open and see the file
   "demo.dvi". This was produced from the file "demo.tex" and it reads
   the graphics file "demo.wmf". As you will see, it is very easy to
   combine text and graphics using this driver. You can also print the
   file by issuing the "Print" command from the "File" submenu.


The following steps apply only if you are upgrading from dviwin 2.0:

7. Go to the Options submenu and add the suffix \$r to your font
   directory. Otherwise, the program will NOT be able to find any
   PK fonts.

8. If you use a font substitution file, change it according to the
   new method (uses dpi instead of TeX magnifications). The new
   file should be called "dviwin.sub" instead of "texfonts.sub";
   there is a sample substitution file in this release.


I hope that the above steps are clear. If there are any installation or
operation problems, please let me know.

Hippocrates Sendoukas
isendo@leon.nrcps.ariadne-t.gr
