Prev Up Next
Go backward to 9.1 Making menus
Go up to 9 Designing it yourself
Go forward to 9.3 Adding raw Html

9.2 Rulers and images

The command \htmlrule creates a horizontal rule spanning the full screen width at the current position in the HTML-document. It has an optional argument that you can use to add additional attributes to the HTML tag. The optional argument is not evaluated further, so you should not escape any special characters.

Additional tags are currently only understood by the some browsers, so use the optional argument at your own risk. Here is an example.

   \htmlrule[width=70% align=center]
This will result in the following rule.

The command \htmlimage{URL} makes an inline bitmap with the given URL. It takes an optional argument that can be used to specify additional HTML-attributes understood by some HTML browsers. So \htmlimage[ALIGN=CENTER]{image.xbm} includes the image in image.xbm, vertically centered at the current text position. A more complicated example is:

  \htmlimage[align=left width=50 height=75 hspace=3]{image.gif}
The optional argument is not evaluated further, so you should not escape any special characters. The URL argument, on the other hand, is an evaluated argument, so that you can define macros for common URL's (such as your home page). That means that if you need to use a special character (~ is quite common), you have to escape it (as \~{} for the ~).

This is what I use for figures in the Ipe Manual that appear in both the printed document and the HTML-document:

   \begin{figure}
     \caption{The Ipe window}
     \begin{center}
       \texorhtml{\Ipe{window.ipe}}{\htmlimage{window.gif}}
     \end{center}
   \end{figure}
(\Ipe is the command to include "Ipe" figures.)
Otfried Schwarzkopf, September 2, 1997

Prev Up Next