[l2h] LaTeX2HTML confused when using input from subdir?

Bruno De Fraine Bruno.DeFraine@student.kuleuven.ac.be
Thu, 22 Nov 2001 12:04:20 +0100


Hi Ross,

At 08:29 22/11/2001 +1100, Ross Moore wrote:
> > Hi,
> >
> > SOME INFO:
> >
> > - Windows 2000 Service Pack 2
> > - Perl 5.6.1 from ActiveState
> > - latex2html.pin,v 1.58 2001/11/14 01:34:26
> >
> > ISSUE:
> >
> > When I create a very simple document structure but with input seperated
> > over multiple files (and a subdir), this is enough to confuse latex2html.
> > If I keep everything in the same file, the problem does not occur. LaTeX
> > itself has no problem whatsoever with the seperation over multiple files.
> >
> > EXAMPLE:
> >
> > #########  begin doc.tex
> > \documentclass{report}
> >
> > \begin{document}
> > \part{History of the world}
>
> > \input{part1/beginning}
> > \end{document}
> > #########  end doc.tex
> >
> > #########  begin part1/beginning.tex
> > \chapter{In the beginning...}
> > \section{Hello world}
> > #########  end part1/beginning.tex
> >
> > When I run this trough LaTeX:
>
> > Doing .\part1/beginning.tex
>         ^^^^
>
>This is wrong. It should be either:
>    .\/part1/beginning.tex
>    or  ./part1/beginning.tex
>
>So something has changed with the installation for Win2000.
>
>My guess is that LaTeX2HTML is installing Win2000 in a similar way
>to earlier versions of Win??? --- that is, using the Win32 module.

This is true I guess. Or at least my cfgcache.pm says:
$cfg{'plat'} = q'win32';

>Perhaps Win2000 is actually more like Unix now ?

In what way would Win2000 be different from other Win32-systems? And how 
can I verify this?

If you mean in terms of path name specification, I've never had any problem 
there with forward slashes when using perl of LaTeX. They just work. The 
manpage perlfaq5 states the following about path names: "Either 
single-quote your strings, or (preferably) use forward slashes. Since all 
DOS and Windows versions since something like MS-DOS 2.0 or so have treated 
/ and \ the same in a path, you might as well use the one that doesn't 
clash with Perl"

Of course, the forward slash is still used as the option specifier for 
command line programs (e.g. "dir /a" as equivalent of "ls -a"). This makes 
it impossible to do something like
         dir part1/*.*
since the "*.*" is considered an option.

>(That would be a good thing.)

> > 2/6:part:.
> >
> > *** no brace for \part , before:
> > 1/beginning.tex#
> > *** using "1" as the argument instead; is this correct?  ***
>
>Of course this is quite spurious.
>
>The  texexpand  utility hasn't worked correctly, because it
>hasn't found the file  part1/beginning.tex
>(it was looking for  \part1/beginning.tex ).
>
>
>To verify this, run your job with  -debug :
>
>   latex2html  -debug -verbosity 2  doc.tex
>
>You should then get some tracings from  texexpand

Here's what I get:
D:\test>latex2html  -debug -verbosity 2  doc.tex

  *** initialise *** This is LaTeX2HTML Version 2K.1beta (1.58)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

Revised and extended by:
  Marcus Hennecke, Ross Moore, Herb Swan and others
...producing markup for HTML version 3.2



Loading d:\latex2html\versions\html3_2.pl

  *** processing declarations ***

Loading d:\latex2html\versions\latin1.plStarting at 1006422181 seconds

  *** check modes ***
  ***  file: doc.tex ***
OPENING D:\test\doc.tex

Note: Working directory is D:\test\doc
Note: Images will be generated in C:\Temp\l2h1432

  *** calling  `texexpand' ***Debug (syswait): Running 
"D:\Perl\bin\Perl.exe d:\latex2html\bin\texexpand.bat -debug -auto_exclude 
-save_styles D:\test\doc\TMP\styles -texinputs D:\test -out 
D:\test\doc\TMP\doc D:\test\doc.tex" at d:\latex2html\bin/latex2html.bat 
line 800
texexpand V2K.1beta (Revision 1.11)

texexpand: LaTeX2HTML inputs are in:
texexpand:    .
texexpand:    D:\test
texexpand: %--- Found class: \documentclass{report}

texexpand: %--- Found include at level 1: \input{part1/beginning}
texexpand: %--- checking for part1/beginning
texexpand: %--- looking for .\part1/beginning
texexpand: %--- found .\part1/beginning.tex
  ***  `texexpand' done ***


  ***  database open ***


Loading d:\latex2html\styles\texdefs.perl...
Loading d:\latex2html\styles\report.perl
Reading ...TMP\doc fork at offset 136

Info: bracketings found: 3
++
initial size: 104, resulting size: 102
wrapping raw arg commands
@@
  *** End-of-partition ***

Doing .\part1/beginning.tex

Info: bracketings found: 3

Processing macros ...++
initial size: 174, resulting size: 174
wrapping raw arg commands
  *** End-of-partition ***

appending file: TMP\part_001
total length: 230 characters

appending file: TMP\part_002
total length: 404 characters

total length: 404 characters

Translating ...
0/6:top of doc: for doc.html

  *** translating preamble ***
..
  *** preamble done ***
;;

1/6:part:.."History of the world" for node1.html
;.;

2/6:part:.
  *** Warning:
? brace missing for \part


*** no brace for \part , before:
1/beginning.tex#
*** using "1" as the argument instead; is this correct?  ***

."1" for node2.html
;;

3/6:chapter:.."In the beginning..." for node3.html
;;

4/6:section:..."Hello world" for node4.html
;;

5/6:part:.
  *** Warning:
? brace missing for \part


*** no brace for \part , before:
1/beginning.tex#
*** using "1" as the argument instead; is this correct?  ***

."1" for node5.html
;;

6/6:partstar:.."About this document ..." for node6.html
;;.

  *** making images ***
  *** updating image cache

  *** removing unnecessary images ***

  *** no more images ***

  *** post-process ***
Doing section links ....
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process *** ..
  *** replace markers ***
  *** post-post-process ***
  *** post-processed ***
SAVE_FILE:index: index.pl  EMPTY
SAVE_ARRAY:section_info in FILE: sections.pl
SAVE_ARRAY:toc_section_info in FILE: contents.pl
SAVE_ARRAY:external_labels in FILE: labels.pl
SAVE_ARRAY:external_latex_labels in FILE: labels.pl
SAVE_FILE:cached_env_img: images.pl  EMPTY
  *** Adding document-specific styles ***

*********** WARNINGS ***********

? brace missing for \part

Done.
Timing: 1 seconds


>saying what it includes or rejects, and what it's looking for.

It *is* able to locate the file (as opposed to what you say in the above). 
It claims:

texexpand: %--- found .\part1/beginning.tex

and the contents of beginning.tex is used in the resulting HTML. However it 
also comes up with a non-existant part named "1" (as it saying in its 
output "using '1' as the argument instead; is this correct?") starting with 
the text "/beginning.tex#" and containing everything that the real part 
should have contained.

>Also, you will be able to see the result in   doc/TMP/doc.tex
>and smaller pieces, in   doc/TMP/part001.tex, doc/TMP/part002.tex, ...

I'll just give you the contents of these files, since I don't understand 
how LaTeX2HTML works internally.

This is doc/TMP/doc:

\documentclass{report}

\begin{document}
\part{History of the world}


%%% TEXEXPAND: INCLUDED FILE MARKER .\part1/beginning.tex
\chapter{In the beginning...}
\section{Hello world}%%% TEXEXPAND: END FILE .\part1/beginning.tex
\end{document}


This is doc/TMP/part_001.tex:

\documentclass<<1>>report<<1>>
\begin<<4>>tex2html_deferred<<4>>\par\end<<5>>tex2html_deferred<<5>>
\begin<<2>>document<<2>>
\part<<3>>History of the world<<3>>
\begin<<6>>tex2html_deferred<<6>>\par\end<<7>>tex2html_deferred<<7>>


This is doc/TMP/part_002.tex

<tex2html_file>#.\part1/beginning.tex#
\chapter<<8>>In the beginning...<<8>>
\section<<9>>Hello world<<9>>
<tex2html_endfile>#.\part1/beginning.tex#
\end<<10>>document<<10>>


> >  ."1" for node2.html
> > ;;
> >
> > 3/6:chapter:.."In the beginning..." for node3.html
> > ;;
> >
> > 4/6:section:..."Hello world" for node4.html
> > ;;
> >
> > 5/6:part:.
> >
> > *** no brace for \part , before:
> > 1/beginning.tex#
> > *** using "1" as the argument instead; is this correct?  ***
> >
> >  ."1" for node5.html
>
>
> >
> > REMARK:
> >
> > I've also tried this document on a Debian Linux system using LaTeX2HTML
> > Version 2K.1beta (1.48). The document is translated correctly here.
>
>Yes.
>The problem is because the Win2000 version has not been installed
>correctly. It's  $dd  (directory-delimiter)  variable has not been
>set correctly  --- at least, that's my diagnosis from the evidence
>that you have presented so far.

I hope the extra material I have provided here can help you. The 
cfgcache.pm file contains the following directory-delimiter: $cfg{'dd'} = 
q'\\';

>Since I do not run such an installation, hopefully someone else
>can investigate further and provide a module  L2hos/Win2000.pm
>to be used instead of   L2hos/Win32.pm  when appropriate.
>
>
>
>Thanks for reporting this problem.
>
>Hope this helps.
>
>         Ross Moore


Thanks for helping me out,

Bruno.