[l2h] error creating images

Ross Moore ross@ics.mq.edu.au
Wed, 17 Apr 2002 08:07:05 +1000 (EST)

> Hi,
> i cannot create some images, error message is:
> pstoimg: Error: Cannot find file "/tmp/l2h31758/image017.ps": No such file or 
> directory
> The error is in image.tex:
> [...]
> {\newpage\clearpage
> \lthtmlfigureA{figure3694}%
> \begin{figure}\begin{center}
> <tex2html_file>#./fig_structure.pstex_t#
> \begin{picture}(0,0)%
> \epsfig{file=fig_structure.pstex}%
> \end{picture}%%
> [...]

OK; thanks for showing this piece of coding.
There are 2 problems here; both quite easy to solve:


The special file/endfile markers are put there by LaTeX2HTML,
but are not being removed as part of the preparation of LaTeX coding
for the images.tex  source.

Within the  latex2html  script ( e.g. /usr/local/bin/latex2html
 or  latex2html.pin  then re-install) 
there is a subroutine    sub revert_to_raw_tex  .
In that code block (which is quite long) there is a comment
       #    # revert special marks

Following this, amongst the lines that follow, insert an extra line:

    s/^($file_mark|$endfile_mark).*\#\n//gmo;   ## <-----------  INSERT THIS LINE

That will fix your  images.tex  files, in the future.

The repository at  www.latex2html.org  will shortly be updated
with this fix; but it's easy enough to do it yourself.


Since LaTeX2HTML typically works within a subdirectory of your source
directory, and does not contain built-in support for the \eps... macros,
then you may find that image-generation fails because your images
cannot be found.

To overcome this difficulty, simply enter that subdirectory and make
symbolic links to the images, so that LaTeX can find these files when it
needs to. Similarly dvips and/or Ghostscript will be able to find the
images, during their part of the image-generation process.

If you cannot use symbolic links, then copy the images,
or use a macro for the directory path, where the expansion of the macro
can be different for LaTeX when run for images.tex and when run on
the full document. 
The  \begin{imagesonly} .... \end{imagesonly}  construction from  html.sty
allows this to be done.

> Of cource <tex2html_file> leeds to an error.
> The LaTeX source file is:
> [...]
> \begin{figure}\begin{center}
> \input{fig_structure.pstex_t}
> \end{center}\caption{\label{structure}parts}
> \end{figure}
> [...]
> I want to include a graphic generated by xfig.

Hope this helps,

	Ross Moore

> CU
>    Olaf
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html