##
Including Arbitrary HTML Mark-up and Comments

Subsections

- - `\begin{rawhtml}`
  - `\beginrawhtml`...`\endrawhtml`
  - `\begin{comment}`
  - `\comment...\endcomment`

LATEX2`HTML` provides the ability to include raw `HTML` tags and text within the `HTML` version of a document, without requiring corresponding material for the LATEX typeset version. This ability can be used to

- include `HTML` markup for effects that have no corresponding concept within a LATEX typeset document (see the following example)
- take advantage of new `HTML` facilities as soon as they become available, and there are browsers capable of displaying them.
- include arbitrary `SGML`-like markup, for use with special browsers that know how to sensibly handle the resulting files.

####
`\begin{rawhtml}`

The simplest way to include raw `HTML` tags and/or text is by using the rawhtml environment. (An alternative way is to use the `\HTML` command, which allows macros to be expanded to give the required tags, attributes and contents.)

Note the warning concerning how the environment delimiters should be used in the LATEX source code.

A particularly good use of the rawhtml environment is in the creation of interactive electronic forms from within a LATEX document. When producing the paper (`.dvi`) version of a document the rawhtml environment is ignored.

Here is an example:

    \begin{rawhtml}
    <HR>
    <FORM ACTION="http://cbl.leeds.ac.uk/nikos/doc/error.html">
    <OL>
    <LI> <INPUT TYPE="checkbox" NAME="wp" VALUE="word"> Word for
    Windows.
    <LI> <INPUT TYPE="checkbox" NAME="wp" VALUE="wp"> Word Perfect.

    <LI> <INPUT TYPE="checkbox" NAME="wp" VALUE="latex"> LaTeX.
    <LI> Plain Text Editors (Please Specify): <INPUT TYPE="text" NAME="other_ed">
    </OL>
    So, what do think (comments please): <BR>
    <INPUT TYPE="text" SIZE=45 NAME="other_wp">

    <INPUT TYPE="submit" VALUE="submit this form but don't expect much!">
    </FORM>
    <HR>
    \end{rawhtml}

The result is shown below.

Figure 5: An electronic form. In the online version the form would be active.

1. Word for Windows.
2. Word Perfect.
3. LaTeX.
4. Plain Text Editors (Please Specify):

So, what do think (comments please):

####
`\beginrawhtml`...`\endrawhtml`

This is an alternative way to specify a chunk of raw `HTML` code, using the old AMS-style of delimiting environments. Use of this style is discouraged; the rawhtml environment is preferred.

####
`\begin{comment}`

This environment is simple for the convenience of “commenting-out” large sections of source code. The contents of this environment is completely ignored, both in the LATEX and `HTML` versions. Such an environment is already used in AMS-LATEX, and perhaps with other packages. It is defined here for its general utility.

To insert `SGML`-style comments into the `HTML` files, use the rawhtml environment as follows.

    \begin{rawhtml}
    <!--  this text is treated as a comment
          perhaps extending over several lines
    -->
    \end{rawhtml}

Note the warning concerning how the environment delimiters should be used in the LATEX source code.

####
`\comment...\endcomment`

This is an alternative way to specify a chunk of material intended to be ignored in both the LATEX and `HTML` versions, using the old AMS-style of delimiting environments. Use of this style (though convenient for typing) is discouraged, since it is not as reliable as using the comment environment.