[l2h] Re: [latex2html: manual sectioning]

Jens Lippmann Jens Lippmann <jens-lippmann@usa.net>
13 Dec 99 20:25:18 MET


Matthias Georg Imhof <mgi@granite.geol.vt.edu> wrote:
> I have been looking all over: is there a way to do the sectioning manually? 

> I have a document which contains a few very short sections. Instead of
having  
> them on separate html pages, I would rather have them all on the same html 

> page. At the moment I help myself by defining some of them as subsections  
> which works nicely for html but breaks the latex output.
> 
> Basically, what I am looking for is for \pagebreak to split the output to  
> the next file.

You can alternate LaTeX and HTML output by
%begin{latexonly}
\section{..}
%end{latexonly}
\begin{htmlonly}
\subsection{...}
\end{htmlonly}
and experiment with -split depth.

\begin{htmlonly}
\subsection
\end{htmlonly}
%begin{latexonly}
\section
%end{latexonly}
  {caption...}

could save you the doubled caption line.

The disadvantage of this trick is that the table of
contents and some of the minicontents are screwed up.

Another solution could be this:
\newcommand{\htmlbreaknextpage}{}

sub do_cmd_htmlbreaknextpage {
    $EXPLICITBREAK = 1;
    $_[0];
}
  (add this to latex2html or l2hconf.pm)

if ($current_depth<$MAX_SPLIT_DEPTH || $EXPLICITBREAK) {
    $EXPLICITBREAK = 0;
  (replace this with line 2237 in latex2html, below the
   while loop head in sub translate)

However, this solution might screw up some of the
navigation panels because the "Next" buttons might not
be computed correctly.
Perhaps you can spend the time to make this solution
bug-proof, and we can integrate this patch into the next
release, then.

Kind regards,
Jens.



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1