On 5/9/2012 10:04 PM, Bob van der Poel wrote:
This is not a solution ... but since you seem to have identified the
location of the problem have you considered inserting some print
statements right before/after the dbmopen{} calls. See that the value
of TMP, etc. is.
BTW, I don't do Perl ... and every time I see Perl code it reminds me
of the reason :)
Yes, I did all of that actually earlier. I put the
log files here
http://12000.org/my_notes/l2hwin/vwin/vwin/vwin.htm
I compared it to when the file is on Linux disk vs. when
the file is on windows disl, and did a diff, no difference in
both log files other than the path to the .tex file ofcourse.
But there is something I did not understand, I assumed
it is Perl thing. Here it is.
I edited latex2html.perl and added this print (I know
how to make print in perl only :)
------------------------------------------------
dbmopen(%verb, "$TMP_${dd}verb",0755);
print "TMP=$TMP all=$TMP_${dd}verb\n ";
------------------------------------------------
When now I run it like this
latex2html -tmp /home/me/TMP t.tex
now I see on the terminal this:
---------------------------------------------
Note: Images will be generated in /home/me/TMP/l2h21964
texexpand V2008 (Revision 1.12)
TMP=/home/me/TMP all=TMP/verb
Loading /usr/share/latex2html/styles/texdefs.perl...
Package: loading /usr/share/latex2html/styles/article.perl
Package: loading /usr/share/latex2html/styles/html.perl
Reading ...
TMP=/home/me/TMP all=TMP/verb
++
@@@
TMP=/home/me/TMP all=TMP/verb
Translating ...
0/1:top of t: for t.htm
*** translating preamble ***
...
*** preamble done ***
-----------------------------------------
NOTICE: that "$TMP_${dd}verb" prints as TMP/verb
(this is what I called 'all' above). I think ${dd} is
the slash "/". I do not know what _${dd} is supposed
to be.
But $TMP on its own, is the same as I told it to use. So
this part is OK.
I assumed I am just not printing it ok, may be _$ has
special meaning in perl and that why it comes out like
this.
I looked at the folder on widnows disk afterwords to see
if I see a TMP folder there, and I see nothing. But I think it
is deleted quickly after being used by dbm?
So, I do not know what to make of this now. I need to
study perl more to know why 'all' above prints TMP/verb
and not what I expected which is /home/me/TMP/verb.
thanks,
--Nasser
Hope this helps.
On Wed, May 9, 2012 at 7:32 PM, Nasser M. Abbasi<n...@12000.org> wrote:
An update on what I tried:
I think the problem is related to dbm(). looking
at /usr/bin/latex2html.perl I tried to understand
how it handles the db opening and closing and why
that fails when the .tex file is on the mounted
shared disk vs. when it is not on the mounted disk.
I could not, since I do not know enough perl to
understand what it is doing. But my theory i now
is this:
It seems to create files for the db itself, under
TMP to store the verb data as Ross explained before.
-------latex2html.perl ---------------------------
sub open_dbm_database {
# These are DBM (unix DataBase Management) arrays which are actually
# stored in external files. They are used for communication between
# the main process and forked child processes;
print STDOUT "\n"; # this mysteriously prevents a core dump !
dbmopen(%verb, "$TMP_${dd}verb",0755);
# dbmopen(%verbatim, "$TMP_${dd}verbatim",0755);
dbmopen(%verb_delim, "$TMP_${dd}verb_delim",0755);
dbmopen(%expanded,"$TMP_${dd}expanded",0755);
------------------------------------------
I think it is creating these using file naming
which does not work on the NTFS file system or
using permissions that are not supported on windows
file system.
Even though I made sure the TMP is on Linux by using
latex2html -tmp /home/me/TMP foo.tex
I also did export TMP=/home/me/TMP in addition
to the above just to be sure.
So, TMP/ is supposed to be on Linux disk, not windows,
and I see it is.
But it seems that somewhere in the db processing
this chnages? and TMP for that part only goes back
to NTFS disk (current folder where my .tex file on
windows disk), and it then tries to make the dbm files
there, and could not create them, either due to strange
permission it uses (0755) or something like this.
(I do not know if it checks for errors from dbm
anywhere).
Since the only difference is the file system,
I think it is related to the dbm files used, since
that is where the \verb info is stored. I noticed
that \verbatim perl code is commented out there
in the dbm() related functions also as you can
see above.
What I now do, is copy the folder I want to run
l2h on to linux, run the makefile there to build
the html, then copy the folder back to my windows
disk.
thanks,
--Nasser
_______________________________________________
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html
_______________________________________________
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html