htmladdimg
command to replace figures
We have already mentioned that Star2HTML uses LATEX2HTML
to do the conversion to
hypertext. LATEX2HTML
usually makes a good attempt at this conversion. However, it can
produce disappointing results, particularly for complex sections, such as the cover page and
subroutine/application descriptions in Starlink documents.
Some LATEX structures cannot be translated into HTML. Normally, LATEX2HTML
handles these by
either ignoring them, or by passing them back to LATEX for processing and then converting the
result to in-line images (complex maths symbols, for example). The result occasionally requires
tweaking by hand. Sometimes the result is so poor that you need to re-write parts of your document in
order to generate a more acceptable result.
LATEX2HTML
is designed to deal with LATEX commands of the form \command{arg1}{arg2}... and
cannot, in general, deal satisfactorily with raw TEX commands. If this problem occurs, you’ll notice
“=” signs in inappropriate places, or missing parts in your hypertext version. The only thing to do is
to use LATEX equivalents of the TEX commands.
For example use:
instead of:
or
instead of:
These are always translated into GIFs and often have an incorrect size. Try to avoid them if possible. If you can’t, you might have to fix things by hand.
Don’t use the tabbing environment – the converter makes a mess of it and the only solution is to edit the HTML files. Use the tabular environment instead.
Consider the source text:
You’d expect the generated text to look like:
in the paper version, and
in the hypertext version. However, the hypertext version comes out like:
because the \latex line is replaced by a blank line and consequently ends up as a paragraph break. To get around this you must include some text on the \latex line, as in:
Or you could get the same effect using the \latexhtml command:
To get a tilda into a URL, use:
instead of:
which just throws away the tilda.
htmladdimg
command to replace figuresThe \htmladdimg command is used to display an image stored in an external file. Its form is:
where the URL
is the hypertext address of the image (probably just the name of an image.gif
file in the
default directory).
It is tempting to use this command to replace existing figures with better colour graphics. However,
you cannot use this command inside a figure
environment. Instead, you should use something
like:
body of figure
However, you will not get a figure number in the caption.
The following list of recommendations was compiled by the Starlink Software Librarian, Martin Bly, who has issued many Starlink documents submitted for release and has noted the things that have caused him trouble:
You can ensure the correct layout by including a \cleardoublepage immediately before your “page 1”. The latest templates include this automatically but you should check existing documents for this problem.