%%
%% This is file `typehtml.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% typehtml.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 typehtml.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file typehtml.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.)
%%
%% Source File `typehtml.dtx'.
%% Copyright (C) 1996 1997 David Carlisle
%% This file may be distributed under the terms of the LPPL.
%% See 00readme.txt for details.
%%
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{typehtml}
[1997/11/19 v0.12 HTML printer (DPC)]
\DeclareOption{html2}{\let\HTML@two@stop\endinput}
\DeclareOption{netscape}
{\def\HTML@not#1{\SGML@w{<#1> is not valid HTML}}}
\DeclareOption{html3}{\let\HTML@two@stop\relax}
\DeclareOption{nohyperref}{%
\let\HTML@doname\@secondoftwo
\def\HTML@dosrc#1#2{\emph{#2}}}
\DeclareOption{ftnhyperref}{%
\let\HTML@doname\@secondoftwo
\def\HTML@dosrc#1#2{\emph{#2}\footnote{HREF: \texttt{#1}}}}
\DeclareOption{hyperref}{%
\AtBeginDocument{%
\providecommand\href[2]{\special{html:}%
#2\special{html:}}%
\providecommand\hypertarget[2]{\special{html:}%
#2\special{html:}}%
\let\HTML@doname\hypertarget
\let\HTML@dosrc\href}}
\DeclareOption{dviwindo}{%
\def\HTML@dosrc#1#2{{%
\leavevmode\sbox\z@{#2}\count@\ht\z@\@tempcnta\wd\z@
\if\string##\@car#1\@nil
\special{button: \the\@tempcnta\space\the\count@\space
"\@gobble#1"}%
\else
\special{button: \the\@tempcnta\space\the\count@\space
launch: typehtml "#1"}
\fi
\special{color push}\special{color rgb 0 1 0}%
\unhbox\z@
\special{color pop}}}%
\def\HTML@doname#1#2{\leavevmode\special{mark: "#1"}#2}}%
\DeclareOption{imgalt}{}
\DeclareOption{imggif}{\SGML@w{img gif support not done yet}}
\DeclareOption{imgps}{\SGML@w{img ps support not done yet}}
\DeclareOption{smartquotedbl}{%
\def\SGMLquotedbla{%
\textquotedblleft\global\let\SGMLquotedbl\SGMLquotedblb}
\def\SGMLquotedblb{%
\textquotedblright\global\let\SGMLquotedbl\SGMLquotedbla}
\let\SGMLquotedbl\SGMLquotedbla
\let\SGML@savedeverypar\everypar
\newtoks\everypar
\SGML@savedeverypar{%
\global\let\SGMLquotedbl\SGMLquotedbla\the\everypar}}
\DeclareOption{straightquotedbl}{%
\DeclareTextCommandDefault{\textquotedbl}{{\ttfamily\char`\"}}%
\let\SGMLquotedbl\textquotedbl}
\DeclareOption{chapter}{%
\def\HTML@headings{%
\chapter\section\subsection%
\subsubsection\paragraph\subparagraph}}
\DeclareOption{chapter*}{%
\def\HTML@headings{%
{\chapter*}{\section*}{\subsection*}%
{\subsubsection*}{\paragraph*}{\subparagraph*}}}
\DeclareOption{section}{%
\def\HTML@headings{%
\section\subsection%
\subsubsection\paragraph\subparagraph\endgraf}}
\DeclareOption{section*}{%
\def\HTML@headings{%
{\section*}{\subsection*}%
{\subsubsection*}{\paragraph*}{\subparagraph*}\endgraf}}
\DeclareOption{subsection}{%
\def\HTML@headings{%
\subsection%
\subsubsection\paragraph\subparagraph\endgraf\endgraf}}
\DeclareOption{subsection*}{%
\def\HTML@headings{%
{\subsection*}%
{\subsubsection*}{\paragraph*}{\subparagraph*}\endgraf\endgraf}}
\DeclareOption{bigint}{%
\let\HTML@int\int
\AtEndOfPackage{\RequirePackage{exscale}}}
\ExecuteOptions{section*,imgalt,html2,nohyperref,straightquotedbl}
\ProcessOptions
\begingroup
\catcode`\<=\active
\catcode`\>=\active
\catcode`\&=\active
\catcode`\$=\active
\catcode`\"=\active
\catcode`\^=\active
\catcode`\_=\active
\catcode`\;=\active
\catcode`\A=\active
\catcode`\B=\active
\catcode`\C=\active
\catcode`\D=\active
\uccode`\A=`\{%
\uccode`\B=`\}%
\uccode`\C=`\|%
\uccode`\D=`\\%
\uppercase{\endgroup
\def\SGMLent@@#1;{\csname SGML@E@#1\endcsname}
\def\SGML@def@active#1>{%
\expandafter\def\csname SGML@#1\endcsname}
\def\dohtml{%
\begingroup
\ifx;\@undefined\expandafter\let\expandafter;\string;\fi
\ifx>\@undefined\expandafter\let\expandafter>\string>\fi
\catcode`\<=\active
\catcode`\>=\active
\catcode`\&=\active
\catcode`\{=\active
\catcode`\}=\active
\catcode`\$=\active
\catcode`\"=\active
\catcode`\^=\active
\catcode`\_=\active
\catcode`\\=\active
\catcode`\|=\active
\catcode\endlinechar=10
\catcode`\%=12
\catcode`\#=12
\catcode`\;=\active
\def\verbatim@nolig@list{\do\`\do\,\do\'\do\-}
\def<{\SGMLopen}%
\def&{\SGMLent}%
\let^\textasciicircum
\let~\textasciitilde
\def_{\_}%
\let$\$%
\def"{\SGMLquotedbl}%
\def A{\{}%
\def B{\}}%
\def C{\texttt{|}}%
\def D{\texttt{\char`\\}}%
\def\addcontentsline##1##2##3{%
{\def<{\string<}\def&{\string&}%
\addtocontents{##1}{\protect\dotochtml}%
\addtocontents{##1}{\protect\contentsline{##2}{##3}{\thepage}}%
\addtocontents{##1}{\protect}}}}
\def\dotochtml{%
\dohtml
\catcode`\\\z@
\catcode`\{\@ne
\catcode`\}\tw@}
\def\SGMLshortend{/}
\def\SGMLgrab@#1<#2>{%
\edef\@tempd{\lowercase{\def\noexpand\@tempd{\gobblespc#2 \relax}}}%
\@tempd
\ifx\@tempd\SGMLshortend\let\@tempd\@tempc\fi
\ifx\@tempb\@tempd
\advance\@tempcnta\@ne
\else
\ifx\@tempc\@tempd
\advance\@tempcnta\m@ne
\fi
\fi
\ifnum\@tempcnta=\z@
\expandafter\@tempa\expandafter{\the\@temptokena#1}%
\else
\addto@hook\@temptokena{#1<#2>}%
\expandafter\SGMLgrab@
\fi}
\def\SGMLopen#1>{%
\SGMLopen@#1 \@nil}
}
\def\htmlinput#1{\dohtml\let\@endhtml\relax\input{#1}\endgroup}
\def\gobblespc#1 #2\relax{#1}
\def\SGMLgrabber#1#2{%
\def\@tempa{#2}%
\@tempcnta\@ne
\@temptokena{}%
\lowercase{\def\@tempb{#1}\def\@tempc{/#1}}%
\SGMLgrab@}
\begingroup
\catcode`\"=\active
\uppercase{\endgroup
\def\SGMLopen@#1 #2\@nil{%
\toks@{}%
\edef\@tempa{\lowercase{\def\noexpand\SGMLelement{#1}}}\@tempa
\if!\@car#1\relax\@nil
\toks@{#1 #2}%
\SGML@w{Declaration ignored\MessageBreak<\the\toks@>\MessageBreak}%
\else
\if$#2$\else
\replacequotes#2"\@nil"%
\SGMLafterfi
\expandafter\toks@\expandafter{\expandafter}%
\expandafter\SGMLgetattrib\the\toks@ \@nil
\fi
\expandafter\ifx\csname SGML@\SGMLelement
\expandafter\endcsname\relax
\SGML@w{<\SGMLelement> undefined}%
\else
\csname SGML@\SGMLelement
\expandafter\expandafter\expandafter\endcsname
\fi
\fi}
\def\replacequotes#1"#2"{%
\def\@tempb{#2}%
\ifx\@tempb\@nnil
\addto@hook\toks@{#1}%
\else
\addto@hook\toks@{#1{#2}}%
\expandafter\replacequotes
\fi}}
\def\SGMLafterfi#1\fi{\fi#1}
\def\SGMLgobbletofi#1\fi{\fi}
\def\SGMLgetattrib#1 #2{%
\ifx\box#1\box\else
\SGMLgetval#1=$=\@nil
\def\@tempa{#2}%
\ifx\@tempa\@nnil
\expandafter\SGMLgobbletofi
\else
\expandafter\SGMLafterfi
\fi
\SGMLgetattrib#2%
\fi}
\def\SGMLgetval#1=#2=#3\@nil{%
\ifcat$#2%
\lowercase{\SGML@addattrib\doimplied{#1}}%
\else
\lowercase{\SGML@addattrib{\do{#1}}}{#2}%
\fi}
\def\SGML@addattrib#1#2{\addto@hook\toks@{#1{#2}}}
\def\SGML@w{\PackageWarning{typehtml}}
\def\SGMLdef#1{%
\ifcat\noexpand#1\noexpand~%
\expandafter\SGML@def@active
\else
\expandafter\SGML@def
\fi}
\edef\@tempa{\def\noexpand\SGML@def##1\string>}\@tempa{%
\expandafter\def\csname SGML@#1\endcsname}
\expandafter\def\expandafter\SGMLent\expandafter{%
\expandafter\protect\csname& \endcsname}
\expandafter\def\csname& \endcsname{%
\futurelet\@let@token\SGMLent@}
\def\SGMLent@{%
\ifx\@let@token\@sptoken
\&%
\else
\expandafter\SGMLent@@
\fi}
\def\SGMLentity#1{%
\expandafter\def\csname SGML@E@#1\endcsname}
\SGMLdef{}
\SGMLdef{\@endhtml}
\let\@endhtml\endgroup
\SGMLdef
{\typeout{***TITLE***}\SGMLgrabber{title}\typeout}
\long\def\@tempa#1#2#3#4#5#6{%
\SGMLdef{\SGMLgrabber{h1}{\HTMLsection{#1}}}%
\SGMLdef{\SGMLgrabber{h2}{\HTMLsection{#2}}}%
\SGMLdef{\SGMLgrabber{h3}{\HTMLsection{#3}}}%
\SGMLdef{\SGMLgrabber{h4}{\HTMLsection{#4}}}%
\SGMLdef{\SGMLgrabber{h5}{\HTMLsection{#5}}}%
\SGMLdef{\SGMLgrabber{h6}{\HTMLsection{#6}}}}
\expandafter\@tempa\HTML@headings
\def\HTMLsection#1#2{#1{\ignorespaces#2\unskip}}
\SGMLdef{}
\SGMLdef{}
\SGMLdef{}
\SGMLdef{}
\SGMLdef{}
\SGMLdef{}
\SGMLdef
{\par}
\SGMLdef
{\par}
\SGMLdef{\begin{quote}}
\SGMLdef
{\end{quote}}
\SGMLdef{\begin{quote}}
\SGMLdef{\end{quote}}
\SGMLdef{\begin{itemize}}
\SGMLdef
{\end{itemize}}
\SGMLdef{\begin{enumerate}}
\SGMLdef
{\end{enumerate}}
\SGMLdef{\item}
\SGMLdef{}
\SGMLdef{%
\let\do\dldo
\let\doimplied\dlimplied
\begin{description}\the\toks@}
\SGMLdef
{\end{description}}
\def\dldo#1#2{%
\def\@tempa{compact}\def\@tempb{#1}%
\ifx\@tempa\@tempb
\itemsep\z@
\advance\@totalleftmargin-\leftmargin
\advance\linewidth\leftmargin
\itemindent-\labelsep
\leftmargin\z@
\parshape \@ne \@totalleftmargin \linewidth
\fi}
\def\dlimplied#1{\dldo{#1}\relax}
\def\itx#1{\item[#1]}
\SGMLdef{\begin{lrbox}\z@\bfseries\let\maybeenddt\enddt}
\SGMLdef{\maybeenddt}
\SGMLdef{\maybeenddt}
\SGMLdef{}
\def\enddt{\end{lrbox}\item[\unhbox\z@]}
\let\maybeenddt\relax
\SGMLdef{\SGMLgrabber{a}\HTML@anchor}
\def\HTML@anchor#1{{%
\let\@tempa\@gobble
\def\_{\string_}%
\let\do\ado
\the\toks@
\@tempa{#1}}}
\def\ado#1#2{%
\def\@tempb{name}\def\@tempc{#1}%
\ifx\@tempb\@tempc
\let\@tempa\@firstofone
\def\@tempa{\HTML@doname{#2}}%
\else
\def\@tempa{\HTML@dosrc{#2}}%
\fi}
\SGMLdef{%
\par
\begingroup
\parindent\z@
\obeylines\verbatim@font\@noligs
\frenchspacing\@vobeyspaces}
\SGMLdef
{\endgroup}
\SGMLdef{\SGMLgrabber{tt}\texttt}
\SGMLdef{\SGMLgrabber{b}\textbf}
\SGMLdef{\SGMLgrabber{i}\textit}
\SGMLdef{\SGMLgrabber{em}\emph}
\SGMLdef{\SGMLgrabber{strong}\textbf}
\SGMLdef{\SGMLgrabber{code}\texttt}
\SGMLdef{\SGMLgrabber{samp}\textsf}
\SGMLdef{\SGMLgrabber{kbd}\texttt}
\SGMLdef{\SGMLgrabber{var}\textit}
\SGMLdef{\SGMLgrabber{cite}\textit}
\SGMLdef{\par\medskip}
\SGMLdef{\\\hline\end{tabular}}
\SGMLdef{}
\def\optiondo#1#2{%
\def\@tempa{selected}\def\@tempb{#1}%
\ifx\@tempa\@tempb\gdef\optionbul{$\bullet$}\fi}
\def\optionimplied#1{%
\def\@tempa{selected}\def\@tempb{#1}%
\ifx\@tempa\@tempb\gdef\optionbul{$\bullet$}\fi}
\SGMLdef{}
\SGMLdef{{%
\let\do\imgdo
\def\@tempa{\doimage}%
\the\toks@
\@tempa}}
\def\doimage{\textsf{[image]}}
\def\imgdo#1{\csname img=#1\endcsname}
\expandafter\def\csname img=align\endcsname#1{%
\SGML@w{align=#1 ignored}}
\expandafter\def\csname img=src\endcsname#1{%
\SGML@w{src=#1 ignored}}
\expandafter\def\csname img=height\endcsname#1{%
\SGML@w{height=#1 ignored}}
\expandafter\def\csname img=alt\endcsname#1{%
\def\doimage{#1}}
\SGMLdef
{\par\smallskip\hrule\smallskip}
\SGMLdef
{\leavevmode\\}
\SGMLdef{%
\SGML@pre
\def\@tempb{/xmp}%
\let\SGMLopen\HTML@xmptest}
\SGMLdef{%
\SGML@xmp
\def\@tempb{/listing}}
\SGMLdef{%
\SGML@xmp
\def\@tempb{/plaintext}}%
\def\HTML@xmptest#1>{%
\lowercase{\def\@tempa{#1}}%
\ifx\@tempa\@tempb
\endgroup
\else
\SGMLafterfi
<#1>%
\fi}
\SGMLentity{amp}{\&}
\SGMLentity{lt}{\ensuremath{<}}
\SGMLentity{gt}{\ensuremath{>}}
\SGMLentity{aacute}{\'a}
\SGMLentity{Aacute}\'A{}
\SGMLentity{acirc}{\^a}
\SGMLentity{Acirc}{\^A}
\SGMLentity{agrave}{\`a}
\SGMLentity{Agrave}{\`A}
\SGMLentity{aring}{\r a}
\SGMLentity{Aring}{\r A}
\SGMLentity{atilde}{\~a}
\SGMLentity{Atilde}{\~A}
\SGMLentity{auml}{\"a}
\SGMLentity{Auml}{\"A}
\SGMLentity{aelig}{\ae}
\SGMLentity{AElig}{\AE}
\SGMLentity{ccedil}{\c c}
\SGMLentity{Ccedil}{\c C}
\SGMLentity{eth}{\dh}
\SGMLentity{ETH}{\DH}
\SGMLentity{eacute}{\'e}
\SGMLentity{Eacute}{\`E}
\SGMLentity{ecirc}{\^e}
\SGMLentity{Ecirc}{\^E}
\SGMLentity{egrave}{\`e}
\SGMLentity{Egrave}{\`E}
\SGMLentity{euml}{\"e}
\SGMLentity{Euml}{\"E}
\SGMLentity{iacute}{\'\i}
\SGMLentity{Iacute}{\'I}
\SGMLentity{icirc}{\^\i}
\SGMLentity{Icirc}{\^I}
\SGMLentity{igrave}{\`\i}
\SGMLentity{Igrave}{\`I}
\SGMLentity{iuml}{\"\i}
\SGMLentity{Iuml}{\"I}
\SGMLentity{ntilde}{\~n}
\SGMLentity{Ntilde}{\~N}
\SGMLentity{oacute}{\'o}
\SGMLentity{Oacute}{\'O}
\SGMLentity{ocirc}{\^o}
\SGMLentity{Ocirc}{\^O}
\SGMLentity{ograve}{\`o}
\SGMLentity{Ograve}{\`O}
\SGMLentity{oslash}{\oe}
\SGMLentity{Oslash}{\OE}
\SGMLentity{otilde}{\~o}
\SGMLentity{Otilde}{\~O}
\SGMLentity{ouml}{\"o}
\SGMLentity{Ouml}{\"O}
\SGMLentity{szlig}{\ss}
\SGMLentity{thorn}{\th}
\SGMLentity{THORN}{\TH}
\SGMLentity{uacute}{\'u}
\SGMLentity{Uacute}{\'U}
\SGMLentity{ucirc}{\^u}
\SGMLentity{Ucirc}{\^U}
\SGMLentity{ugrave}{\`u}
\SGMLentity{Ugrave}{\`U}
\SGMLentity{uuml}{\"u}
\SGMLentity{Uuml}{\"U}
\SGMLentity{yacute}{\'y}
\SGMLentity{Yacute}{\'Y}
\SGMLentity{yuml}{\"y}
\ifx\HTML@not\@undefined\else
\SGMLdef{\HTML@not{center}\begin{center}}
\SGMLdef{\end{center}}
\SGMLdef