[l2h] On graphics in latex2html

hooklee hooklee at hooklee.com
Wed Apr 6 04:19:29 CEST 2005

======= 2005-04-06 06:52:29 You wrote in your e-mail£º=======

>On Wed, 6 Apr 2005, hooklee wrote:
>> ======= 2005-04-05 22:20:56 You wrote in your e-mail£º=======
>> >On Tue, 5 Apr 2005, hooklee wrote:
>> >
>> >> Hi all,
>> >>
>> >> When one runs latex2tml with NO_SUBDIR=0, all graphics embedded with
>> >> \includegraphics cannot be processed.  One has to copy all graphics into
>> >> the directory $DESTDIR\ and then re-run latex2html to get the graphics.
>> >>
>> >> I am puzzled why latex2html cannot be written slightly to make the thing
>> >> easier.  In fact, latex2html can work well if the $DESTDIR\images.tex is
>> >> processed as follows:
>> >> --\graphicspath{{path}} => \graphicspath{{../path}}
>> >> or
>> >> --\includegraphics[...]{file.ext} => \includegraphics[...]{../file.ext}
>> >>   (when \graphicspath doesn't appear in the source file)
>> >>
>> >> I am not familiar with perl programing, so perhaps the above ideas are
>> >> not practical. Could any one consider rewriting latex2html if it is
>> >> possible to add the functions? I think it will be very useful for all
>> >> users of latex2html.
>> >
>> >Isn't it just a question of invoking LaTeX with the appropriate TEXINPUTS
>> >setting?  Then images.tex doesn't need to be modified at all...
>> >	Igor
>> Sorry, I cannot understand what you mean.
>> Could you please give some explanations on how should we do in this
>> case?
>> I have seen some previous discussions on this issue, and it was said
>> that the graphics files have been copied to $DESTDIR$ manually.
>> Or, one has to use -NO_SUBDIR switch to let latex2html work in the
>> current directory.
>> Shujun
>LaTeX looks for the \include'd .tex and .eps files in the path specified
>by the $TEXINPUTS environment variable.  Setting TEXINPUTS in your
>environment to something like ".:..:$DESTDIR:" (this could be done from
>.latex2html-init) should allow the "latex" executable to find your source
>and graphics files.  I say "should" because I haven't really tested this,
>and won't be able to for the next few days...  Please let me know if this
>Try adding the following code before the final "1;" in your
>FWIW, this should probably be fixed in latex2html itself, but the fix
>could be something along the lines of the above...
>	Igor

Thanks for your answer. I have tested this and it does not work for embedded graphics.
It seems that ENV('TEXINPUTS') only influence how latex find .tex source files, not graphics files embedded via \includegraphics command.
In my MiKTeX distribution, I notice that there exists a similar path called "GraphicsPath".
However, after adding ".." into "GraphicsPath", latex still cannot load graphics in the directory ".."
Do you know how to activate this in MiKTeX? This may be a partial solution to the problem of latex2html (though it cannot solve the problem about \graphicspath).


More information about the latex2html mailing list