# hthtml - an extended interface to LaTeX2HTML

Jens Krinke

j.krinke@tu-bs.de

TU Braunschweig

## Contents

- 1 Introduction
- 2 Features of hthtml
  - 2.1 A frequently requested feature
  - 2.2 A patched description environment
  - 2.3 Some nice features
- 3 Availability

# 1 Introduction

The use of `html.sty` makes the use of some special LATEX-commands possible, which supports the use of HTML-features in LaTeX and give different results in the generated DVI-file and the translated HTML-file. However, more support can be added, which makes it easier to write documents that are looking similar in DVI and HTML format.

# 2 Features of `hthtml`

## 2.1 A frequently requested feature

Every now and the somebody asks how to use ``_`' and ``~`' in the `htmladdnormallink`-commands. This is not supported, one has to use `\_` and `\~{}`.

The following commands are able to process ``_`' and ``~`' directly:

1. `\htlink{`text`}{`url`}`: Sets text with a link to url in HTML and text with a footnote of url in typewriter-style in DVI. This is an example.

   This is made from:

       \htlink{example}{http://foo.bar/~gnus_and_gnats}

2. `\hturl{`url`}`: Sets url as text with a link to url in HTML and url in typewriter-style in DVI. Example: http://foo.bar/~gnus_and_gnats.

   This is made from:

       \hturl{http://foo.bar/~gnus_and_gnats}

3. `\htmailto{`mail-address`}`: Sets a mail address with a mailto-url pointing to it in HTML and just the address in DVI. Example: foo@bar.

   This is made from:

       \htmailto{foo@bar}

`htlink` and `hturl` aren't useable inside commands like `\author` or `\title`, where one has to use the old `\htmladdnormallinkfoot` command. This command is redefined in hthtml to set the footnote in typewriter-style.

## 2.2 A patched description environment

The use of `\htmladdnormallinkfoot` and `htlink` is impossible in the item-elements of a description environment because it is impossible to use footnotes there. The `htdescription` environment is a different implementation of the `description` environment which allows footnote and the other mentioned commands.

foo
  is not described here.
Another example here.
  Look at the footnote!
bar
  is described somewhere else.

This is made from:

    \begin{htdescription}
    \item[foo] is not described here.
    \item[Another \htlink{example}{http://foo.bar/~gnus_and_gnats} here.]
      Look at the footnote!
    \item[bar] is described somewhere else.
    \end{htdescription}

## 2.3 Some nice features

- `\htaddress{`text`}`: Sets text with `<ADDRESS>` in HTML. In DVI, text is set in italics on a line by its own. This looks like most browsers are rendering `<ADDRESS>`. Example:
  (with embedded urls).

  This is made from:

      \htaddress{gnus \& gnats\\
      \hturl{http://foo.bar/~gnus_and_gnats}\\
      \htmailto{foo@bar}}

- `\htsetvar{`variable`}{`value`}`: Sets a variable of latex2html to a different value. Has no other effect and can be used to set configuration variables in the TEX-source.

  Look at this Example, which is part of this document:

      \htsetvar{NO_NAVIGATION}{1}
      \htsetvar{ADDRESS}
      {'<A HREF="http://www.cs.tu-bs.de/~krinke/hthtml/index.html">Original
      site</A><P><HR>' . \$ADDRESS}

  This influences the look of the HTML-Version of this document: There is no navigation panel and the url of the original hthtml site is included in the address.

- `\htmetainfo{`field`}{`value`}`: An entry of the form `` is appended to the information in the head of the HTML-document.

  Look at this Example:

      \htmetainfo{keywords}{latex2html, hthtml}

  sets the following in the head-section of the HTML-document.

      <META NAME="keywords" CONTENT="latex2html, hthtml">

  This command has to be placed in the document's head.

# 3 Availability

The complete hthtml-package is available at the author's homepage where the original hthtml-page is located. It is available as gzip'ed tar-file.