##
Miscellaneous commands for `HTML` effects

Subsections

- - `\htmlrule` and `\htmlrule*`
  - `\strikeout{<text>}`
  - `\tableofchildlinks`
  - `\htmlinfo`
  - `\bodytext{<options>}`
  - `\htmlbody{<options>}`
  - `\htmlbase{<URL>}`
  - `\HTMLset{<which>}{<value>}` and `\HTMLsetenv{<which>}{<value>}`
  - `\latextohtml`

The html package, through the LATEX input file `html.sty`, and its Perl counterpart `html.perl`, implements several new commands that are intended entirely for effects within the produced `HTML` files. In LATEX these commands, their arguments, and any optional arguments are completely ignored.

####
`\htmlrule` and `\htmlrule*`

One such device provided by `html.sty`, is the `\htmlrule` command. This puts a horizontal rule into the `HTML` file only; being ignored in the `.dvi` version. It is useful to provide extra visual separation between paragraphs, without creating a new `HTML` page, such as might warrant extra vertical space within the printed version.

Much variation can be obtained in the horizontal rule that is produced, using extended forms of the `\htmlrule` command:

> `\htmlrule`
> `\htmlrule*`
> `\htmlrule[<attribs>]`
> `\htmlrule*[<attribs>]`

Whereas a ``break'' tag `<BR>` normally precedes the `<HR>` generated by the `\htmlrule` command, this break is omitted when using the `\htmlrule*` variant.

Furthermore, the optional argument `<attribs>` can be used to specify attributes for both the `<HR>` and `<BR>` tags. More specifically, `<attribs>` should be a list of attribute-names and/or key-value pairs ``<key>`=`<value>`` separated by spaces or commas. This list is parsed to extract those attributes applicable to the `<HR>` tag, and those applicable to the `<BR>` (with the unstarred variant).

Using `HTML` 3.2, this allows variations to be specified for:

- the (vertical) thickness of the horizontal line in pixels: `SIZE=`<num>``;
- the (horizontal) width of the line in pixels or points: `WIDTH=`<width>``;
- alignment: `WIDTH="..."` taking `left`, `right` or `center`;
- removal of the shadowed effect `NOSHADE`;
- positioning of the rule with respect to text-flows: `CLEAR="..."` taking `left`, `all`, `right` or `none`.

Some examples of these effects appear on this page.

####
`\strikeout{<text>}`

With this command the `<text>` is processed as normal in the `HTML` version, then placed between `<STRIKE>`...`</STRIKE>` tags. Thus a horizontal line should be drawn through the middle of the `<text>`.
Currently the command and the `<text>` are ignored in the LATEX version.

####
`\tableofchildlinks`

As an extra aid to navigation within a long page, containing several (sub)subsections or deeper levels of sectioning, there is the `\tableofchildlinks` command. This does not generate anything new, for a table of the child links on or from a page is generated automatically by LATEX2`HTML`.

However if this command, or its variant `\tableofchildlinks*`, occurs within the source code to appear on a particular `HTML` page, then the child-links table will be placed at that point where the command occurs. Normally a break tag `<BR>` is inserted to separate the table of child-links from the surrounding text. The `\tableofchildlinks*` omits this extra break when it would result in too much space above the table.

For example throughout this section of the manual, all subsections in which several explicit commands have been discussed have their child-links table placed at the top of the page, using `\tableofchildlinks*`. This helps to quickly find the description of how the commands are used.

####
`\htmlinfo`

Normally an ``About this document...'' page is created at the end of the `HTML` document, containing technical information about how the document was created, by whom, or any other information contained in the `$INFO` variable. This information can be made to appear at any other place within the document by specifying `\htmlinfo` at the desired place in the source. For example, the information may be best suited for the title-page.

The variant `\htmlinfo*` places the information, but leaves out the standard ``About this document...'' header. Instead the `\htmlhead` command can be used to place an alternative heading, prior to the `\htmlinfo*` command. Neither this heading nor the `$INFO` contents appears in the LATEX typeset version.

####
`\bodytext{<options>}`

The text and background colors, and colors for the text of hypertext links can be set on an `HTML` page by giving appropriate attributes with the `<BODY ...>` tag. This is particularly easy to do using the `\bodytext` command, which simply inserts the `<code>` as the desired list of attributes.

Warning: Any previous settings for the `<BODY ...>` tag are discarded. Furthermore no checking is done to verify whether the given `<options>` indeed contains a list of attributes and values valid for the `<BODY ...>` tag.
When using `\bodytext` you are assumed to know precisely what you are doing!

Other packages contain commands which alter the contents of the `<BODY ...>` tag; notably the `color.perl` implementation of LATEX's color package, and the (prototype) frames package, by Martin Wilck and Ross Moore. In both these packages the requested information is checked for validity as an attribute within the `<BODY ...>` tag.

####
`\htmlbody{<options>}`

This is similar to the `\bodytext` command, except that it adds the value of an attribute, or allows an existing value to be changed. Thus it can be used to alter just a single one of the text and background colors, colors for the text of hypertext links or add a background pattern. The `<options>` are given as key-value pairs; some checking is done to ensure the validity of the attributes whose values are being set.

####
`\htmlbase{<URL>}`

This specifies that the given `<URL>` be included in the `<HEAD>` section of each `HTML` page via a tag: `<BASE HREF="`<URL>`"`.
Such a feature is particularly useful...

- when preparing a document whose final location may be different from where it was created; By making all internal references be relative (to the the provided `<URL>`), a whole directory tree containing the document and all its subparts can be moved to elsewhere. A single edit in each `HTML` file produces the complete document intact at the new location.
- by allowing just single page to be copied to another location, but act as if it were part of the original document (provided this is accessible across the Web). Relative URLs within the copied page are relative to the base `<URL>`, rather than relative to the new location.
- Other uses for this feature are likely to become apparent.

####
`\HTMLset{<which>}{<value>}` and `\HTMLsetenv{<which>}{<value>}`

The `\HTMLset` command provides a mechanism whereby an arbitrary Perl variable can be assigned a value dynamically, during the LATEX2`HTML` processing. A variable having name ``$<which>`' is assigned the specified `<value>`, overwriting any value that may exist already. The `\HTMLsetenv` is for the same purpose, but it is expanded in order as if it were an environment, rather than a command.

Warning: This is intended for Perl programmers only. Use this command at your own risk!

####
`\latextohtml`

expands to the name LATEX2`HTML`, of this translator. Commands for parts of names of important LATEX packages are also included with LATEX2`HTML`: e.g. TEX, LATEX, AMS, XY. (This is to make it easy to refer to these products, in a consistent way within the `HTML` pages; you may still need LATEX definitions for the typeset version.)