exit trouble shooting

Trouble Shooting

Bitmaps

Bad Quality of Pictures

Increase the density (number of dots per inch) when converting the pictures, and then sub-sample the picture. Specifically, replace in `tex4ht.env' the switch

-density 110x100

with the switch

-density 220x220 -geometry 50%

or with another switch of the form

-density ...x... -geometry ...%

The -density switch increases the number of pixels per inch, and the -geometry option reduces that number. The process smoothes (anti-aliases) the edges. Typically screens display about 72 to 100 dots per inch.

The type of fonts in use may also affect the quality of the output. In particular, Type 1 fonts (scalable outlines) offer better outcome than Type 3 (bitmapped) fonts.

Truncated and empty gifs for Xfig pictures

Some Xfig files are made up of overlapping picture environments, with TeX4ht viewing the components as defining independent figures. The problem can be solved by importing the Xfig files into pictorial environments of TeX4ht.

   \newenvironment{mypic}{\Picture*{}}{\EndPicture} 
   \begin{mypic} \input{xfig-file}   \end{mypic} 

LaTeX

Lost horizontal spaces

May be caused by horizontal horizontal dimensions (e.g., \hoffset, \textwidth).

Fonts

Can't find/open file foo.tfm

Locate in what directory LaTeX/TeX finds font foo.tfm, and add to tex4ht.env a `t' record pointing to that directory (e.g., `tc:\localtexmf\fonts\tfm!').

Note also that LaTeX/TeX may create fonts on the fly and put them in a temporary directory (e.g., `/var/tmp/texfonts/tfm/').

Linux, Netscape, and the SYMBOL font

To display the SYMBOL fonts in Netscape on Linux add

Netscape*documentFonts.charset*adobe-fontspecific: iso-8859-1

to the ~/.Xdefaults file

C programs

tex4ht.c doesn't compile ... ERROR:3396: `DIR' undeclared (first use this function)...

Consider adding the switch `-DHAVE_DIRENT_H' to the command line. For instance,

cc -o tex4ht tex4ht.c -DENVFILE='"path/tex4ht.dir/tex4ht.env"' -DHTFDIR='"path/tex4ht.dir"' -DHAVE_DIRENT_H

Scripts

Bad end-of-line characters in htlatex.bat/httex.bat/htexi.bat/ht.bat

Remove undesirable trailing characters in the lines of the scripts, introduced by the utilities which download the files.

DOS/WINDOW platforms use an endline pair of characters: a carriage return and a line feed (0Dx,0Ax hexadecimal; 13,10 decimal). MAC platforms use only a single carriage feed character (0Dx; 13dec). UNIX platforms use only a single line feed character (0Ax; 10 dec).

Can't find/open file `xxx.dvi' or `xxx.lg'

In some platforms, the operating systems pass on the quotes of the parameters of htlatex, httex, and httexi to the utilities tex4ht and t4ht. In such cases, the utilities issue complaints of the above nature for file names `xxx' other than those being compiled. The problem can be resolved by installing a filter named `htcmd', and submitting the tex4ht and t4ht commands to the filter. Backslash characters `\' might need replacements with double backslash characters `\\' or forward slash characters `/'.

For instance, if htlatex.bat contains a command line of the form `C:\tex4ht\t4ht %1 %4', then after introducing the filter the modified command line will take the form `C:\\tex4ht\\htcmd C:\\tex4ht\\t4ht %1 %4'.

Environment File

Can't find/open file `tex4ht.env'

Either recompile t4ht.c and tex4ht.c with the ENVFILE switch (see entries `t4ht.c, Compiling' and `tex4ht.c, Compiling' in Index) or add the switch `-e...address-of-tex4ht.env...' to the commands t4ht and tex4ht in the htlatex, httex, and ht (or htlatex.bat, httex.bat, httexi.bat, and ht.bat) scripts.

No permission for system call: ...

Make sure that the `S' records in tex4ht.env don't end with invisible spaces, and that the file ends with the record `% end of file'.

Problems with argument -d... of t4ht

The specified directory must be augmented by a slash character /.

Problems with the convert utility

tex4ht.sty / *.4ht

Foreign content in <title>...</title> elements

Use the \Contribute{TITLE}{...} command to redefine for the these elements the harmful macros that appear in headers of logical units like \title and \chapter. For instance, the definition \Contribute{TITLE}{\def\LaTeX{LaTeX}} for the source \title{with \LaTeX}.

DVI Code

XDVI/DVIWINDO/YAP... hang on \special command

The dvi code produced by tex4ht is not valid for use with other utilities. Recompile the source file without the presence of tex4ht, to provide a proper code to your dvi viewer.