The foilhtml LaTeX package tries to be clever about landscape mode
and fails miserably.  Essentially, FoilTeX turns the page once, and
foilhtml undos this.

The following patch _should_ solve the problem, though it's not
well-tested, and I may certainly missing some evil side-effects of
my changes.

Except for some obligatory cosmetic nonsense you don't want to use,
this essentially replaces all occurrences of rotatedfoilhead{} in the
various sectioning macros by foilhead{} - foilhead{} as defined in
the standard FoilTeX package already knows about landscape mode and
does the right thing.

--- /usr/lib/texmf/tex/latex/latex2html/foilhtml.sty	Tue Oct 13 18:59:23 1998
+++ newfoilhtml.sty	Fri Feb 18 00:07:12 2000
@@ -20,7 +20,7 @@
 %% original source files, as listed above, are part of the
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
-\ProvidesPackage{foilhtml}
+\ProvidesPackage{newfoilhtml}
 [1998/02/17 v1.2 Sectioning Commands for FoilTeX]
 %% Copyright Boris Veytsman 1997
 %%
@@ -49,10 +49,6 @@
   \typeout{Loading configuration file foilhtml.cfg}}{%
   \typeout{Configuration file foilhtml.cfg is not found. Using default
   options.}}
-\newif\if@portraitfoils
-\@portraitfoilstrue
-\DeclareOption{landscape}{\@portraitfoilsfalse}
 \ProcessOptions
 \@ifundefined{foilhead}{%
  \def\portraitfoils{\relax}%
  \def\lanscapefoils{\relax}%
@@ -101,30 +97,17 @@
      \ifnum \c@secnumdepth >-2\relax
        \refstepcounter{part}%
        \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
-       \if@portraitfoils
-          \foilhead{\huge\bfseries\partname~\thepart\\[1ex]%
-          \Huge\bfseries #2}%
-       \else
-          \rotatefoilhead{\huge\bfseries\partname~\thepart\\[1ex]%
+       \foilhead{\huge\bfseries\partname~\thepart\\[1ex]%
           \Huge\bfseries #2}%
-       \fi
      \else
        \addcontentsline{toc}{part}{#1}%
-       \if@portraitfoils
-          \foilhead{\Huge\bfseries #2}%
-       \else
-          \rotatefoilhead{\Huge\bfseries #2}%
-       \fi
+       \foilhead{\Huge\bfseries #2}%
      \fi
     \markboth{}{}%
     \clearpage}
  \def\@spart#1{%
-    \if@portraitfoils
-       \foilhead{\Huge\bfseries #1}%
-    \else
-       \rotatefoilhead{\Huge\bfseries #1}%
-    \fi
-    \markboth{}{}%
+   \foilhead{\Huge\bfseries #1}%
+   \markboth{}{}%
     \clearpage}
 \newcommand\chapter{%
    \@afterindentfalse\clearpage
@@ -133,29 +116,15 @@
      \ifnum \c@secnumdepth >-1\relax
        \refstepcounter{chapter}%
        \addcontentsline{toc}{chapter}{\thechapter\hspace{1em}#1}%
-       \if@portraitfoils
-          \foilhead{\LARGE\bfseries\chaptername~\thechapter\\[1ex]%
-          \huge\bfseries #2}%
-       \else
-          \rotatefoilhead{\LARGE\bfseries\chaptername~\thechapter\\[1ex]%
-          \huge\bfseries #2}%
-       \fi
+       \foilhead{\LARGE\bfseries\chaptername~\thechapter\\[1ex]%
+	 \huge\bfseries #2}%
      \else
        \addcontentsline{toc}{chapter}{#1}%
-       \if@portraitfoils
-          \foilhead{\huge\bfseries #2}%
-       \else
-          \rotatefoilhead{\huge\bfseries #2}%
-       \fi
-     \fi
-    \markboth{}{}%
+       \foilhead{\huge\bfseries #2}%
+       \markboth{}{}%
     \clearpage}
  \def\@schapter#1{%
-    \if@portraitfoils
-       \foilhead{\huge\bfseries #1}%
-    \else
-       \rotatefoilhead{\huge\bfseries #1}%
-    \fi
+    \foilhead{\huge\bfseries #1}%
     \markboth{}{}%
     \clearpage}
 \newcommand\section{%
@@ -169,27 +138,15 @@
        \addcontentsline{toc}{section}{\thesection\hspace{1em}#1}%
        \markboth{\MakeUppercase{\thesection~#2}}{%
           \MakeUppercase{\thesection~#2}}%
-       \if@portraitfoils
-          \foilhead{\Large\bfseries\thesection~#2}%
-       \else
-          \rotatefoilhead{\Large\bfseries\thesection~#2}%
-       \fi
+       \foilhead{\Large\bfseries\thesection~#2}%
      \else
        \addcontentsline{toc}{section}{#1}%
        \markboth{\MakeUppercase{#2}}{\MakeUppercase{#2}}%
-       \if@portraitfoils
-          \foilhead{\Large\bfseries #2}%
-       \else
-          \rotatefoilhead{\Large\bfseries #2}%
-       \fi
+       \foilhead{\Large\bfseries #2}%
      \fi
     \global\@subnewfoilfalse\everypar{\global\@subnewfoiltrue\everypar{}}}
  \def\@ssection#1{%
-    \if@portraitfoils
-       \foilhead{\Large\bfseries #1}%
-    \else
-       \rotatefoilhead{\Large\bfseries #1}%
-    \fi
+   \foilhead{\Large\bfseries #1}%
     \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
     \global\@subnewfoilfalse\everypar{\global\@subnewfoiltrue\everypar{}}}
 \newcommand\subsection{%
