[l2h] On graphics in latex2html

Igor Pechtchanski pechtcha at cs.nyu.edu
Wed Apr 6 00:52:29 CEST 2005


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
works.

Try adding the following code before the final "1;" in your
.latex2html-init:

$ENV{'TEXINPUTS'}=".:..:$DESTDIR:$ENV{TEXINPUTS}:";

FWIW, this should probably be fixed in latex2html itself, but the fix
could be something along the lines of the above...
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


More information about the latex2html mailing list