[l2h] Re: l2html

Ross Moore ross@ics.mq.edu.au
Fri, 22 Mar 2002 08:06:02 +1100 (EST)


> I am sending you three files.  One is a snippet of my LATEX code for an image rotated by 90 degrees.  The other file is the WARNINGS file and the images.log file the program produced.  The LATEX produced DVI file has no problem with the image and the ps2pdf prgram has no problem with the rotation either?  I also notice that when the program runs it gives me "illegal seek" errors, I don't know what it refers to?

The WARNINGS are a minor issue.
They relate to the ability to create hyperlinks to the figures from
the "List of Figures" page, or similar for "List of Tables".
This happens because there are some non-trivial macro usages within
those figure captions, and LaTeX2HTML cannot match the contents of
the .toc file with the coding that occurs in the main body of the document.
Use of \protect will probably solve this.

 
> If this is obvious to you please advise!

The main problem is much more intriguing:

(from images.log)


! LaTeX Error: Environment tex2html_dn_inpar undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.147 \begin{tex2html_dn_inpar}
                               \vbox{\let\\\newline
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


Somehow your document is calling upon parts of the LaTeX2HTML
coding that was designed for used with special Indic languages.
The  dn  here is for  Devanagari script, and special handling
of environments using macros with names \dn, \dnlarge, \dnsmall, etc.
(\dnrm, \dnit, ...) as font switches.

Do you have any macros with names that may conflict with this ?

If so, the just choose a different name and try again.


I don't see anything wrong with your LaTeX code snippet;
though it's hard to be sure, as I cannot tell what may be
inside the image file  complete_surf_force(176).ps .

Ahah; here's why it causes a problem with LaTeX2HTML.

There is nothing within the {figure} except the rotated image.
OWhen I run a similar file, using -debug there is a message:

  "The image is only background"

THis means that Ghostscript has not been given the correct
viewing window to catch the ink in your image, when it tries
to render the page provided by  dvips -E 

This is due to what dvips looks at, when calculating the 
bounding box (requested by the -E switch).
It seems that with the rotation, dvips cannot correctly locate
the position and size of the embedded image, when it does
this calculation. On a normal LaTeX page, there are headers,
footers, captions, etc. so that the location of the image is not needed.
However, for LaTeX2HTML, the image is all that there is, so
dvips needs to be given some help.


I've found 2 ways to get this to work:

  A.  put the image inside a frame:
        \framebox{\includegraphics[..options...]{image.eps}}
OR

  B.  don't use the rotation for the HTML pages
      --- you probably don't want a rotated image anyway,
          as this looks silly on-screen and is not necessary
          anyway, when you have scroll-bars.

 Use conditional coding, such as:

  %begin{latexonly}
    \includegraphics[scale=1.2,angle=90]{...  file ... }
  %end{latexonly}
  \begin{htmlonly}
    \includegraphics[scale=1.2]{...  file ... }
  \end{htmlonly}


or better yet, in the document preamble define a macro conditionally:

  \providecommand{\imageopts}{}
  %begin{latexonly}
   \renewcommand{\imageopts}{scale=1.2,angle=90}
  %end{latexonly}
  \begin{htmlonly}
    \renewcommand{\imageopts}{scale=1.2}
  \end{htmlonly}


Then in your document source, you can use

    \includegraphics[\imageopts]{...  file ... }

for all images where you need this set of options.
The will come out rotated on a page typeset by LaTeX,
but upright for images in web-pages made by LaTeX2HTML.



There could also be a problem with the use of (..)s in the name,
on some platforms. Presumably this is a non-issue for you ?


> 
> Thanks in advance


Hope this helps,

	Ross Moore


> Shawn
> 
> 
> 
> 
> On Wednesday, March 20, 2002 at 07:45:02 AM, Ross Moore wrote:
> 
> > 
> > You wrote:
> > > I finally got the proram to work by using an older version from 1999.  However, the pro gram does not handle any of my images that are rotated by 90 degrees in the Latex code?
> > 
> > The only way LaTeX2HTML could handle this is to make an image,
> > using LaTeX. Thus it should only be necessary to wrap the code
> > in an environment that captures everything that currently works
> > for you in LaTeX; e.g. a {figure} environment.
> > 
> > However, the question arises as to whether, in the HTML page,
> > you still want the 90 degree rotation.
> > 
> > Please send an example of your coding, so that I can determine
> > what is going wrong, or if there is easier code to achieve
> > what you want to do.
> > 
> > >  Is this a known problem, if so I can not find any listinf in known problems?.  I see mention of "rot" for rotation, but the Latex code is "angle=90".  Do you have any solu tions?
> > 
> > There is no LaTeX code for rotating.
> > There are just options to macros that request other programs
> > to perform the rotation when they do further processing
> > of the output from LaTeX.
> > 
> > Please send an axample; then I can tackle your problem more easily.
> > 
> > Hope this helps,
> > 
> > 	Ross Moore
> > 
> > 
> > 
> 
> Lt-N.SM.Donohue,CFNOS Halifax,CSN 447-8409,0801
> e-mail: mail693p@dnd.ca
> 

> \onecolumn
> \begin{figure}
> \begin{center}
> \includegraphics[scale=1.2,angle=90]{/mnt/DATA/Dummies/PS/TASK2(75-251)/complete_surf_force(176).ps}
> \caption{Here is the user defined current surface platform with all sensors assigned as indicated by the picture with both a primary ACTIVE(SHIP) and PASSIVE(SHIP) sensors.  }
> \label{fig:complete_surf_force}
> \end{center}
> \end{figure}
> 
> \twocolumn
[application/octet-stream is not supported, skipping...]

[application/octet-stream is not supported, skipping...]