[l2h] Cannot convert images in test sample file

Ross Moore ross@ics.mq.edu.au
Thu, 29 Nov 2001 08:28:46 +1100 (EST)


> 
> Till, I am also on NT and have had this very same problem, only
> intermittently.  I haven't quite put my finger on the cause of the problem,
> but as I'm sure you have already discovered it is looking for files in a
> directory (in this case l2h173) under your temp folder but that directly
> simply is not there (which begs the question, why does it "think" its there
> (Ross?))

LaTeX2HTML uses 2 temporary locations to write files while working.
Both are deleted at the end of the run, *unless* the -debug  switch is used.

For a job (named myjob.tex say) the main temp location is called:

    myjob/TMP

(subdirectory of the source directory, where  myjob/  is the place
where the HTML files finally reside.
This myjob/TMP  directory is used for various database files that
are written during the main processing. It is *not* used during
the image-generation process.

During image generation, there is another temp directory used when
creating the .ps files and temporary .pnm bitmaps during the cropping
part of the image generation.

This is normally in a subdirectory of whatever is specified in the $TMP
variable. Names such as  l2h173  are constructed from the 'l2h' prefix
and the $$ process ID of the LaTeX2HTML job. (The is an effective way
to get a unique filename.)

The default for $TMP is established during installation by testing
environment variables:

l2hconf.pin:$TMP = $ENV{TMP} || $ENV{TEMP} || '.';
l2hconf.pin:$TMP = '@TMPSPACE@';

Hence on my Unix system we get a configuration setting of:

l2hconf.pm:$TMP = '/tmp';


However, there are various ways to change the location of where the
 l2h<num>  directory is located.

Within a LaTeX2HTML job, a variable  $TMPDIR  is set, based upon
the setting of a Perl variable $TMP (set in .latex2html-init , say)
or the value of the  -tmp <directory>   command-line switch.

It is  $TMPDIR that is used with the  pstoimg  script for generating
images. But setting  $TMPDIR to ''  may be no good, as then pstoimg
will look at *environment* variables $TMP and $TEMP for a location.


Using  -tmp .  is meant to result in a temporary location of:
    
   myjob/l2h<num>

Though the interpretation of `.' on the command-line may be dependent
upon the shell. Try it and see.

  
> Although I have not been able to consistently reproduce the problem, I have
> noticed if you by chance have another process that has recently done
> something (i.e. an explorer window or dos box open on your destination
> directory or the temp folder) and have recently deleted something in that
> process, then this can cause problems somewhere in the process of running
> latex2html subsequently.  In my experience, I sometimes even get "access
> denined" when trying to delete stuff from the destination folder after this
> problem happens (and I am admin, so not a permission issue.)
> 
> I am able to get around this by either 1)terminating the offending process,
> i.e. closing the dos box or explorer window, 2)tinkering with the ldump
> setting and/or the reuse setting, or 3) at worst, sending the output to a
> completely different location than used on previous runs.  Your mileage may
> vary.  What I am certain of is it is looking for something that simply isn't
> there (for some reason) which is why I would be suspect of anything in
> latex2html or supporting programs that in any way "cache" file locations.
> Somehow you need to force it to "forget" the images were ever there in the
> first place so they can create a new home for themselves on the next run.
> Weird problem, I know.  I guess I'm fortunate it only happens to me
> intermittently.


According to this, it may be that the NT operating system, or a process
initiated by browser software, is deleting the contents of the temporary
directory *before* LaTeX2HTML has finished using those files.

If this is indeed the case, then having  l2h<num>  created in a different
location may well be appropriate on the NT platform.
Ways to do this are outlined above. Please test this and report success
or failure.

Remember to use -debug  at first, so that you can check where the temporary
directory is in fact located. 

Is this just a  Windows 2000 effect ?
(Others have been using NT for quite a long time without this problem.)
 

Thanks for the observations.

I hope you can figure what is causing the problem and find
a simple fix for it.


All the best,

	Ross Moore


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