TeX4HT under MiKTeX

Philip A. Viton

February 22, 2003

Contents

I  Overview

1  Introduction
2  Updates

II  Installation

3  Get the Software
     3.1  MiKTeX
     3.2  TeX4ht
     3.3  ImageMagick
     3.4  GhostScript
4  Set Up GhostScript
     4.1  Install the distribution
5  Set up ImageMagick
     5.1  Install the distribution
     5.2  Configure the distribution
6  Set up TeX4ht
     6.1  Install the distributions
     6.2  Configure the distribution
     6.3  Speeding up image generation
     6.4  Other utilities

III  Testing and Troubleshooting

7  Testing the Installation
8  Troubleshooting
     8.1  Unable to find .tfm files
     8.2  LaTeX crash under Win95/98/ME
     8.3  Other problems
9  Getting Help

IV  Upgrading

10  Upgrading GhostScript
11  Upgrading ImageMagick
12  Upgrading TeX4ht

V  The Supplemental Utilities

13  Supplemental Utilities for TeX4ht+MiKTeX
     13.1  Replacement batch files
     13.2  htrun.exe

VI  Appendices

A  The Environment
     A.1  Setting environment variables
     A.2  Increasing the environment size
B  More on htrun
     B.1  htrun and other hypertext translations
     B.2  SWP support in htrun
     B.3  Advanced configuration of htrun

Part I
Overview

1 Introduction

This paper explains how to set upTeX4ht, Eitan Gurari’s TeX/LaTeX-to-hypertext translation system, when the underlying TeX system is MiKTeX for Win32 platforms. Thanks to Eitan for answering lots of TeX4ht questions and to Steve Mayer for extensive tests and valuable suggestions regarding htrun.

2 Updates

This section lists changes and updates to the instructions, for easy reference.

Part II
Installation

3 Get the Software

3.1 MiKTeX

These instructions assume that you have already installed MiKTeX 2.1 to its default location, c:\texmf. In addition, the instructions here assume that you told the MiKTeX install routine to add MiKTeX’s bin directory to your path.

Starting with version 2.0, the procedure for updating MiKTeX’s database is slightly different. You can do it by:

3.1.1 MiKTeX 2.0 – the directory problem

MiKTeX 2.0 was something of an anomaly because it installed by default to c:\Program Files\miktex, and because this directory name contains a space, installation of TeX4ht was more complicated. As noted above, version 2.1 reverts to the standard c:\texmf location of earlier versions; but you can, if you want, still install to a directory whose name contains a space. In this case, however, when you set up TeX4ht, you will need to use the “short form” of these directories, as explained below.

3.2 TeX4ht

These instructions support the TeX4ht version released February 18, 2001 (or later). If you have an earlier version, you should upgrade.