# [l2h] figures - in html and in ps

Ross Moore ross at ics.mq.edu.au
Sat Feb 11 03:43:07 CET 2006

Hello Don,

On 11/02/2006, at 12:32 PM, Don wrote:

>
> Hi all - my first post to l2h after lurking a bit.
>
> Can anyone tell me how I can have a set of instructions for my
> figures for the html and a different set for the .ps generation?
> Basically I'm screwing around trying to control the size of my
> images in the figure environment.  I am using something like:
>
> \begin{figure*}
> \htmlimage{notransparent,width=3in,align=left}
> \includegraphics{images/inn1.ps}  \\
> \end{figure*}
>
> But I want the document I am creating to be equally readable in .ps
> and .html, and I usually find that the size for the .ps is too big
> when I have the .html size just right.

This is a common problem, due to the different resolutions
required for onscreen and printed outputs.

There are various things that you can try.

A.
Firstly, there is a variable  \$IMAGE_SCALE_FACTOR
that allows you to specify a scaling for the images
that LaTeX2HTML generates.
The default value is 1.6. You may want to make
it either larger or smaller, according to your
own requirements.

B.
Another nice trick is to only place "thumbnail"
images on the HTML pages. These are hyperlinks
to a full-sized version of the image.
This allows the images to not dominate the web-page,

\htmlimage{thumbnail=.25}  is enough to get thumnails
at 1/4 size of the full-sized image.

C.
Another strategy is to use "conditional" coding,
as follows:

\begin{figure*}
\begin{makeimage}
\end{makeimage}
%begin{latexonly}
\includegraphics{images/inn1.ps}
%end{latexonly}
\caption{....}\label{...}
\end{figure*}

Here inn1.png  is a .png version of your image which
you may have created with an earlier run of LaTeX2HTML,
at exactly the desired size for web-pages.

The empty \begin{makeimage}...\end{makeimage} tells
LaTeX2HTML to *not* create an image for this {figure},
but to still create the correct HTML layout for
the contents, which is just  inn1.png  + captions, etc.

In a normal LaTeX run, both  \htmladdimg  and
the {makeimage} environment are ignored, so you just
get  inn.ps  as expected.

>
> Thanks,
> Don

Hope this helps,

Ross

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------