%%
%% This is file `foilhtml.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% foilhtml.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from foilhtml.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file foilhtml.dtx.
%%
%% This generated file may be distributed as long as the
%% 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}
[1998/02/17 v1.2 Sectioning Commands for FoilTeX]
%% Copyright Boris Veytsman 1997
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\newif\if@pagesintoc
\DeclareOption{pagesintoc}{\@pagesintoctrue}
\DeclareOption{nopagesintoc}{\@pagesintocfalse}
\ExecuteOptions{nopagesintoc}
\setcounter{secnumdepth}{0}
\InputIfFileExists{foilhtml.cfg}{%
\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}%
\def\MyLogo{\@gobble}%
\def\Restriction{\@gobble}%
\def\LogoOff{\relax}%
\def\LogoOn{\relax}%
\def\rightfooter{\@gobble}%
\def\rightheader{\@gobble}%
\def\leftheader{\@gobble}%
\def\newnonfloat{\@gobbletwo}%
\newdimen\foilheadskip
\newdimen\abovefloatskip
\newdimen\captionwidth
\newdimen\titleauthorskip
\newdimen\authorauthorskip
\newdimen\authordateskip
\newdimen\dateabstractskip
\def\zerolistvertdimens{\relax}%
}{%
\newcommand{\portraitfoils}{%
\@ifstar{\@portraitfoilstrue}{%
\@portraitfoilstrue\foilhead[-\foilheadskip]{}}}
\newcommand{\landscapefoils}{%
\@ifstar{\@portraitfoilsfalse}{%
\@portraitfoilsfalse\rotatefoilhead[-\foilheadskip]{}}}
\newcommand*\chaptermark[1]{}
\newcounter {part}
\newcounter {chapter}
\newcounter {section}
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
\renewcommand \thepart {\@Roman\c@part}
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\@arabic\c@section}
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\newcommand\part{%
\@afterindentfalse\clearpage
\secdef\@part\@spart}
\def\@part[#1]#2{%
\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]%
\Huge\bfseries #2}%
\fi
\else
\addcontentsline{toc}{part}{#1}%
\if@portraitfoils
\foilhead{\Huge\bfseries #2}%
\else
\rotatefoilhead{\Huge\bfseries #2}%
\fi
\fi
\markboth{}{}%
\clearpage}
\def\@spart#1{%
\if@portraitfoils
\foilhead{\Huge\bfseries #1}%
\else
\rotatefoilhead{\Huge\bfseries #1}%
\fi
\markboth{}{}%
\clearpage}
\newcommand\chapter{%
\@afterindentfalse\clearpage
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\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
\else
\addcontentsline{toc}{chapter}{#1}%
\if@portraitfoils
\foilhead{\huge\bfseries #2}%
\else
\rotatefoilhead{\huge\bfseries #2}%
\fi
\fi
\markboth{}{}%
\clearpage}
\def\@schapter#1{%
\if@portraitfoils
\foilhead{\huge\bfseries #1}%
\else
\rotatefoilhead{\huge\bfseries #1}%
\fi
\markboth{}{}%
\clearpage}
\newcommand\section{%
\@afterindentfalse\clearpage
\secdef\@section\@ssection}
\newif\if@subnewfoil
\@subnewfoiltrue
\def\@section[#1]#2{%
\ifnum \c@secnumdepth >0\relax
\refstepcounter{section}%
\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
\else
\addcontentsline{toc}{section}{#1}%
\markboth{\MakeUppercase{#2}}{\MakeUppercase{#2}}%
\if@portraitfoils
\foilhead{\Large\bfseries #2}%
\else
\rotatefoilhead{\Large\bfseries #2}%
\fi
\fi
\global\@subnewfoilfalse\everypar{\global\@subnewfoiltrue\everypar{}}}
\def\@ssection#1{%
\if@portraitfoils
\foilhead{\Large\bfseries #1}%
\else
\rotatefoilhead{\Large\bfseries #1}%
\fi
\markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
\global\@subnewfoilfalse\everypar{\global\@subnewfoiltrue\everypar{}}}
\newcommand\subsection{%
\@afterindentfalse\if@subnewfoil\clearpage\fi\global\@subnewfoiltrue
\secdef\@subsection\@ssubsection}
\def\@subsection[#1]#2{%
\ifnum \c@secnumdepth >1\relax
\refstepcounter{subsection}%
\addcontentsline{toc}{subsection}{\thesubsection\hspace{1em}#1}%
\begin{center}\large\bfseries\thesubsection~#2\end{center}%
\else
\addcontentsline{toc}{subsection}{#1}%
\begin{center}\large\bfseries #2\end{center}%
\fi}
\def\@ssubsection#1{%
\begin{center}\large\bfseries #1\end{center}}%
\newcommand\subsubsection{\global\@subnewfoiltrue%
\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\newcommand\paragraph{\global\@subnewfoiltrue%
\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\newcommand\subparagraph{\global\@subnewfoiltrue%
\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{4.5}
\setcounter{tocdepth}{3}
\def\@nopagetocline#1#2#3#4{%
\ifnum #1>\c@tocdepth \else
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{#4}\hfil%
\par}%
\fi}
\newcommand\tableofcontents{%
\section*{\contentsname}%
\@starttoc{toc}%
\clearpage\global\@subnewfoiltrue}%
\newcommand*\l@part[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty\@highpenalty
\addvspace{2.25em \@plus\p@}%
\begingroup
\setlength\@tempdima{3em}%
\parindent \z@
\if@pagesintoc
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\fi
{\leavevmode
\Large \bfseries #1\hfil
\if@pagesintoc\hb@xt@\@pnumwidth{\hss #2}\fi
}\par
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
\newcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@
\if@pagesintoc
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\fi
\leavevmode \large\bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil
\if@pagesintoc\nobreak\hb@xt@\@pnumwidth{\hss #2}\fi\par
\penalty\@highpenalty
\endgroup
\fi}
\newcommand*\l@section[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty\@secpenalty
\addvspace{1.0em \@plus\p@}%
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@
\if@pagesintoc
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\fi
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil
\if@pagesintoc\nobreak\hb@xt@\@pnumwidth{\hss #2}\fi\par
\endgroup
\fi}
\newcommand*\l@subsection[2]{%
\if@pagesintoc
\@dottedtocline{2}{1.5em}{2.3em}{#1}{#2}%
\else
\@nopagetocline{2}{1.5em}{2.3em}{#1}%
\fi}
\newcommand*\l@subsubsection[2]{%
\if@pagesintoc
\@dottedtocline{3}{3.8em}{3.2em}{#1}{#2}%
\else
\@nopagetocline{3}{3.8em}{3.2em}{#1}%
\fi}
\newcommand*\l@paragraph[2]{%
\if@pagesintoc
\@dottedtocline{4}{7.0em}{4.1em}{#1}{#2}%
\else
\@nopagetocline{4}{7.0em}{4.1em}{#1}%
\fi}
\newcommand*\l@subparagraph[2]{%
\if@pagesintoc
\@dottedtocline{5}{10em}{5em}{#1}{#2}%
\else
\@nopagetocline{5}{10em}{5em}{#1}%
\fi}
\renewenvironment{thebibliography}[1]{
\section*{\refname}
\list{\@biblabel{\arabic{enumiv}}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\if@openbib
\advance\leftmargin\bibindent
\itemindent -\bibindent
\listparindent \itemindent
\parsep \z@
\fi
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\arabic{enumiv}}}
\if@openbib
\renewcommand\newblock{\par}
\else
\renewcommand\newblock{\hskip .11em \@plus .33em \@minus -.07em}
\fi
\sloppy\clubpenalty4000\widowpenalty4000%
\sfcode`\.=\@m\relax}%
{\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\newcommand\contentsname{Outline}%
\newcommand\partname{Part}%
\newcommand\chaptername{Chapter}%
}
\endinput
%%
%% End of file `foilhtml.sty'.