%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HTMLforTeX by Anthony Phan.
% file: html4tex.tex (TeX-processor for html4.x)
% last modification: January 7, 2004.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\immediate\write16{This is HTLM4TeX, Version  0.3.
	(html4tex + htmlgraf + htmlinux) (December 9, 2003)}%
\immediate\write16{Warning: It's an unstable version
	only able to digest fairly simple HTML's code.}%
\input htmlgraf.tex
\catcode`\@=11
%
% NOT TO DO:
%
% o  enhance font mechanism [use LaTeX processor]
%
% TO DO:
%
% o  enhance table mechanism and options [what a mess]
% o  write a complete paragraph processor [almost OK]
% o  rewrite then image and other objects inclusion.
%
% remark: \z@=0pt
%
% LAST MAIN CHANGES:
%
% o  within a tag, characters <space>, <underscore>, <ampersand>
%    ^^M have an inactive behavior
%
% o  tag processing is more stable (see \debug@tag)
%
% o  path protocol for \@URL;
%    whenever it seems accurate, change source path ../.. 
%    to ``file:../..'', etc;; leave unchanged ``http:../..''
%    or ``mailto:../..'',etc. ; it is done with \encode@URL{<arg>};
%    to be properly used, \@URL shall be decoded with
%    \decode@URL to give \decoded@URL.
%    IN FACT IT IS THE MESS PARTLY BECAUSE \HTMLbase is not used.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MESSAGES
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\ifx\HTMLproofmode\undefined\def\HTMLinfo#1{}\else
	\def\HTMLinfo#1{\message{#1,}}\fi
\def\HTMLerror#1{\immediate\write16{ERROR: #1!!!}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HTML4TEX COMMANDS AND PARAMETERS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newdimen\imagepixel
\newdimen\rulepixel
\newdimen\HTMLindent% equal to previous \parindent
\imagepixel=0.6pt% system dependent, interact with images' script
\rulepixel=0.4pt% style parameter
%
\newcount\quot@count
\newcount\current@size% for fonts: 1, 2, 3, 4, 5, 6 and 7.
\newcount\tag@count% depth of tags' groups
\newcount\list@level% depth of imbricated lists
\newcount\item@count% numbered list items
%
\def\HTMLbreak#1{\par@break{#1}}%
\def\HTMLnobreak#1{\par@nobreak{#1}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Switching between TeX and HTML modes.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\fromHTMLtoTeX{\ifx\HTMLmode\undefined
	\HTMLerror{I am already in TeX-mode}\else
	\let\HTMLmode=\undefined
	\parindent=\HTMLindent
	\catcode`\\=0   \catcode`\{=1   \catcode`\}=2
	\catcode`\$=3   \catcode`\&=4   \catcode`\^^M=5
	\catcode`\#=6   \catcode`\^=7   \catcode`\_=8
	\catcode`\~=13  \catcode`\%=14  \catcode`\<=12
	\catcode`\|=12
	\fi}%
%
\def\fromTeXtoHTML{\ifx\HTMLmode\undefined
	\let\HTMLmode=!%
	\isolatin
	\HTMLindent=\parindent
	\parindent=\z@
	\catcode`\\=12  \catcode`\{=13  \catcode`\}=13
	\catcode`\$=12  \catcode`\&=13  \catcode`\^^M=10
	\catcode`\#=12  \catcode`\^=12  \catcode`\_=13
	\catcode`\~=12  \catcode`\%=12  \catcode`\<=13
	\catcode`\|=13
	\else\HTMLerror{I am already in HTML-mode}\fi}%
%
\def\includeHTML#1{\tag@count=-1
	\begin@tag{HTML4TeX}%
	\fromTeXtoHTML\quot@count=0
	\output=\expandafter{\the\output
		\everypar={\choose@color\current@color\global\everypar={}}}%
% not structured (push-pop)
	\current@size=3\HTMLfontsize3\HTMLface\HTMLroman
	\@attrs{core.align,core.lang,color.text,color.link,%
		color.vlink,color.alink}{align="justify" lang="fr"}%
	\par@vhide{\HTMLspecial{a name="#1"}\HTMLspecial{/a}}%
	%
	% check base directory, then input
	%
	\def\@tmp##1##2/##3\end@tmp{%
		\ifx##1/\def\HTML@base{/}%
			\@tmp##2/##3\end@tmp
		\else
			\ifx\undefined##3%
				\def\@URL{##1##2}%
			\else
				\edef\HTML@base{\HTML@base##1##2/}%
				\@tmp##3\end@tmp
			\fi
		\fi}%
	\@tmp#1/\undefined\end@tmp
	\encode@URL{\@URL}\decode@URL
	\let\end@HTML=\endinput
	\with@URL@do\input
	\forced@end@tag{HTML4TeX}}%
%
\def\beginHTML{\tag@count=-1
	\begin@tag{HTML4TeX}%
	\fromTeXtoHTML\quot@count=0
	\current@size=3
	\HTMLfontsize3
	\HTMLface\HTMLroman
	\def\end@HTML{\forced@end@tag{HTML4TeX}}}%
\let\HTML=\beginHTML
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEX/LATEX MAIN SETUP.
%
% Look at the differences!
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\ifx\LaTeX\undefined
%
% BEGINNING OF plain\TeX' SECTION
%
\newskip\ttglue
\def\HTMLextratextfont{\expandafter\ifx\current@face\HTMLroman
	\HTMLtimesroman\else\expandafter\ifx\current@face\HTMLitalic
	\HTMLtimesitalic\else\expandafter\ifx\current@face\HTMLbold
	\HTMLtimesbold\else\HTMLtimesroman\fi\fi\fi}%
%
\def\HTMLfont#1#2#3#4#5{\ifx#2*%
	\expandafter\def\csname HTML#1\endcsname{\font\current@font=#3
		\current@font}%
	\else
	\expandafter\font\csname HTML#1@t\endcsname=#3
	\expandafter\font\csname HTML#1@s\endcsname=#4
	\expandafter\font\csname HTML#1@ss\endcsname=#5
	\textfont#2=\csname HTML#1@t\endcsname
	\scriptfont#2=\csname HTML#1@s\endcsname
	\scriptscriptfont#2=\csname HTML#1@ss\endcsname
	\expandafter\def\csname HTML#1\endcsname{\font\current@font=#3
		\fam#2\current@font}%
	\fi}%
%
\def\HTMLfonts{%
	[1]={%
		\HTMLfont{roman}{0}{cmr7}{cmr5}{cmr5}%
		\HTMLfont{italic}{*}{cmti7}{*}{*}%
		\HTMLfont{sserif}{*}{cmss8 at 7pt}{*}{*}%
		\HTMLfont{bold}{4}{cmbx7}{cmbx5}{cmbx5}%
		\HTMLfont{monospace}{*}{cmtt8 at 7pt}{*}{*}%
		\HTMLfont{mit}{1}{cmmi7}{cmmi5}{cmmi5}%
		\HTMLfont{msy}{2}{cmsy7}{cmsy5}{cmsy5}%
		\HTMLfont{mex}{3}{cmex10 at 7pt}{cmex10 at 7pt}{cmex10 at 7pt}%
		\HTMLfont{timesroman}{*}{ptmr at 7pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 7pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 7pt}{*}{*}%
		\HTMLmonospace \ttglue=0.5em plus 0.25em minus .15em
		\normalbaselineskip=8.4pt
		\abovedisplayskip 6pt plus 2pt minus 4pt
		\abovedisplayshortskip \z@ plus 1pt
		\belowdisplayshortskip 3pt plus 1pt minus 2pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height5.95pt depth2.45pt width\z@}%
		\normalbaselines\current@face}
	[2]={%
		\HTMLfont{roman}{0}{cmr8}{cmr6}{cmr5}%
		\HTMLfont{sserif}{*}{cmss8}{*}{*}%
		\HTMLfont{italic}{*}{cmti8}{*}{*}%
		\HTMLfont{bold}{4}{cmbx8}{cmbx6}{cmbx5}%
		\HTMLfont{monospace}{*}{cmtt8}{*}{*}%
		\HTMLfont{mit}{1}{cmmi8}{cmmi6}{cmmi5}%
		\HTMLfont{msy}{2}{cmsy8}{cmsy6}{cmsy5}%
		\HTMLfont{mex}{3}{cmex10 at 8pt}{cmex10 at 8pt}{cmex10 at 8pt}%
		\HTMLfont{timesroman}{*}{ptmr at 8pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 8pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 8pt}{*}{*}%
		\HTMLmonospace \ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=9.6pt
		\abovedisplayskip 6pt plus 2pt minus 4pt
		\abovedisplayshortskip \z@ plus 1pt
		\belowdisplayshortskip 3pt plus 1pt minus 2pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height6.8pt depth2.8pt width\z@}%
		\normalbaselines\current@face}
	[3]={%
		\HTMLfont{roman}{0}{cmr10}{cmr7}{cmr5}%
		\HTMLfont{italic}{*}{cmti10}{*}{*}%
		\HTMLfont{sserif}{*}{cmss10}{*}{*}%
		\HTMLfont{bold}{4}{cmbx10}{cmbx7}{cmbx5}%
		\HTMLfont{monospace}{*}{cmtt10}{*}{*}%
		\HTMLfont{mit}{1}{cmmi10}{cmmi7}{cmmi5}%
		\HTMLfont{msy}{2}{cmsy10}{cmsy7}{cmsy5}%
		\HTMLfont{mex}{3}{cmex10}{cmex10}{cmex10}%
		\HTMLfont{timesroman}{*}{ptmr at 10pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 10pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 10pt}{*}{*}%
		\HTMLmonospace \ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=12pt
		\abovedisplayskip 10pt plus 2pt minus 5pt
		\abovedisplayshortskip \z@ plus 3pt
		\belowdisplayshortskip 6pt plus 3pt minus 3pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height8.5pt depth3.5pt width\z@}%
		\normalbaselines\current@face}
	[4]={%
		\HTMLfont{roman}{0}{cmr12}{cmr8}{cmr6}%
		\HTMLfont{italic}{*}{cmti12}{*}{*}%
		\HTMLfont{sserif}{*}{cmss12}{*}{*}%
		\HTMLfont{bold}{4}{cmbx10 at 12pt}{cmbx8}{cmbx6}%
		\HTMLfont{monospace}{*}{cmtt12}{*}{*}%
		\HTMLfont{mit}{1}{cmmi10 at 12pt}{cmmi8}{cmmi6}%
		\HTMLfont{msy}{2}{cmsy10 at 12pt}{cmsy8}{cmsy6}%
		\HTMLfont{mex}{3}%
		{cmex10 at 12pt}{cmex10 at 12pt}{cmex10 at 12pt}%
		\HTMLfont{timesroman}{*}{ptmr at 12pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 12pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 12pt}{*}{*}%
		\HTMLmonospace\ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=14.4pt
		\abovedisplayskip 10pt plus 2pt minus 5pt
		\abovedisplayshortskip \z@ plus 3pt
		\belowdisplayshortskip 6pt plus 3pt minus 3pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height9.7pt depth4.2pt width\z@}%
		\normalbaselines\current@face}
	[5]={%
		\HTMLfont{roman}{0}{cmr12 at 14.4pt}{cmr10}{cmr7}%
		\HTMLfont{italic}{*}{cmti12 at 14.4pt}{*}{*}%
		\HTMLfont{sserif}{*}{cmss12 at 14.4pt}{*}{*}%
		\HTMLfont{bold}{4}{cmbx10 at 14.4pt}{cmbx10}{cmbx7}%
		\HTMLfont{monospace}{*}{cmtt12 at 14.4pt}{*}{*}%
		\HTMLfont{mit}{1}{cmmi10 at 14.4pt}{cmmi10}{cmmi7}%
		\HTMLfont{msy}{2}{cmsy10 at 14.4pt}{cmsy10}{cmsy7}%
		\HTMLfont{mex}{3}%
		{cmex10 at 14.4pt}{cmex10 at 14.4pt}{cmex10 at 14.4pt}%
		\HTMLfont{timesroman}{*}{ptmr at 14.4pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 14.4pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 14.4pt}{*}{*}%
		\HTMLmonospace\ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=17.28pt
		\abovedisplayskip 10pt plus 2pt minus 5pt
		\abovedisplayshortskip \z@ plus 3pt
		\belowdisplayshortskip 6pt plus 3pt minus 3pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height12.24pt depth5.04pt width\z@}%
		\normalbaselines\current@face}
	[6]={%
		\HTMLfont{roman}{0}{cmr17}{cmr12}{cmr10}%
		\HTMLfont{italic}{*}{cmti12 at 17pt}{*}{*}%
		\HTMLfont{sserif}{*}{cmss17}{*}{*}%
		\HTMLfont{bold}{4}{cmbx12 at 17pt}{cmbx12}{cmbx10}%
		\HTMLfont{monospace}{*}{cmtt12 at 17pt}{*}{*}%
		\HTMLfont{mit}{1}%
		{cmmi10 at 17pt}{cmmi10 at 12pt}{cmmi10}%
		\HTMLfont{msy}{2}%
		{cmsy10 at 17pt}{cmsy10 at 12pt}{cmsy10}%
		\HTMLfont{mex}{3}%
		{cmex10 at 17pt}{cmex10 at 17pt}{cmex10 at 17pt}%
		\HTMLfont{timesroman}{*}{ptmr at 17pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 17pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 17pt}{*}{*}%
		\HTMLmonospace\ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=20.4pt
		\abovedisplayskip 10pt plus 2pt minus 5pt
		\abovedisplayshortskip \z@ plus 3pt
		\belowdisplayshortskip 6pt plus 3pt minus 3pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height14.45pt depth5.95pt width\z@}%
		\normalbaselines\current@face}
	[7]={%
		\HTMLfont{roman}{0}{cmr17 at 20pt}{cmr17}{cmr12}%
		\HTMLfont{italic}{*}{cmti12 at 20pt}{*}{*}%
		\HTMLfont{sserif}{*}{cmss17 at 20pt}{*}{*}%
		\HTMLfont{bold}{4}{cmbx12 at 20pt}{cmbx12 at 17pt}{cmbx12}%
		\HTMLfont{monospace}{*}{cmtt12 at 25pt}{*}{*}%
		\HTMLfont{mit}{1}%
		{cmmi10 at 20pt}{cmmi10 at 17pt}{cmmi10 at 12pt}%
		\HTMLfont{msy}{2}%
		{cmsy10 at 20pt}{cmsy10 at 17pt}{cmsy10 at 12pt}%
		\HTMLfont{mex}{3}%
		{cmex10 at 20pt}{cmex10 at 20pt}{cmex10 at 20pt}%
		\HTMLfont{timesroman}{*}{ptmr at 20pt}{*}{*}%
		\HTMLfont{timesitalic}{*}{ptmri at 20pt}{*}{*}%
		\HTMLfont{timesbold}{*}{ptmb at 20pt}{*}{*}%
		\HTMLmonospace\ttglue=0.5em plus  0.25em minus .15em
		\normalbaselineskip=24pt
		\abovedisplayskip 10pt plus 2pt minus 5pt
		\abovedisplayshortskip \z@ plus 3pt
		\belowdisplayshortskip 6pt plus 3pt minus 3pt
		\belowdisplayskip \abovedisplayskip
		\setbox\strutbox=\hbox{\vrule
			height17pt depth7pt width\z@}%
		\normalbaselines\current@face}
	}%
%
\def\alph#1{\ifcase#1 \or a\or b\or c\or d%
\or e\or f\or g\or h\or i\or j\or k\or l\or m\or n%
\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x%
\or y\or z\else xx\fi}%
%
\def\Alph#1{\ifcase#1 \or A\or B\or C\or D%
\or E\or F\or G\or H\or I\or J\or K\or L\or M\or N%
\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X%
\or Y\or Z\else XX\fi}%
%
% END OF plain\TeX' SECTION
%
\else
%
% BEGINNING OF \LaTeX' SECTION
%
\immediate\write16{Warning:
There may be conflicts with LaTeX' packages.}%
%
\DeclareFontFamily{OT1}{ptm}{}%
\DeclareFontShape{OT1}{ptm}{m}{n}{<-> ptmr}{}%
\DeclareFontShape{OT1}{ptm}{m}{it}{<-> ptmri}{}%
\DeclareFontShape{OT1}{ptm}{bx}{n}{<-> ptmb}{}%
\def\HTMLextratextfont{\def\rmdefault{ptm}\current@face}%
%
\let\HTMLroman=\rmfamily
\let\HTMLitalic=\itshape
\let\HTMLsserif=\sffamily
\let\HTMLbold=\bfseries
\let\HTMLmonospace=\ttfamily
%
\def\HTMLfonts{%
	[1]=\tiny
	[2]=\scriptsize
	[3]=\normalsize
	[4]=\large
	[5]=\Large
	[6]=\LARGE
	[7]=\huge
	}%
%
% END OF \LaTeX' SECTION
%
\fi
%
% EXTRA (?) CHARACTERS (?)
%
\def\guillemotleft{{\HTMLextratextfont\char"AB}}%
\def\guillemotright{{\HTMLextratextfont\char"BB}}%
%\def\guillemotleft{\leavevmode\raise.3ex\hbox{%
%	\@@math{\scriptscriptstyle\langle\!\langle}}}%
%\def\guillemotright{\leavevmode\raise.3ex\hbox{%
%	\@@math{\scriptscriptstyle\rangle\!\rangle}}}%
%
\def\HTMLcheckbox{\@@math{\setbox0=\hbox{$\bigcirc$}\dimen0=\ht0
	\advance\dimen0 by \dp0 \advance\dimen0 by -0.8pt
	\vcenter{\hbox to \wd0{\hss\vbox{%
		\hrule height 0.4pt\hbox{%
			\vrule width 0.4pt
			\vbox to \dimen0{\hbox to \dimen0{\hss}\vss}%
			\vrule width 0.4pt}%
		\hrule height 0.4pt}\hss}}}}%
\def\HTMLradio{\@@math\bigcirc}%
%
% possible conflicts
%
\let\@lt=<%
\let\@gt=>%
\let\@subscript=_%
\let\@supscript=^%
%
% few personnal control sequences
%
\def\@@math#1{\relax\ifmmode#1\else\m@th$#1$\fi}%
\def\text@frac#1#2{\@@math{%
	\vphantom{.}\@supscript{\current@face#1}%
	\mskip-2\thinmuskip
	{\current@face/}%
	\mskip-1.5\thinmuskip
	\vphantom{.}\@subscript{\current@face#2}}}%
%
% LANGUAGE DEPENDENT (see [core.lang] below)
%
\def\fr@lquot{\global\advance\quot@count by 1
	\ifnum\quot@count>1``\else\guillemotleft~\fi\ignorespaces}%
\def\fr@rquot{\unskip\ifnum\quot@count>1''\else~\guillemotright\fi
	\global\advance\quot@count by -1\relax}%
%
\def\en@lquot{\ifnum\quot@count>1`\else``\fi
	\global\advance\quot@count by 1\ignorespaces}%
\def\en@rquot{\unskip\ifnum\quot@count>1'\else''\fi
	\global\advance\quot@count by -1\relax}%
%
\def\de@lquot{\kern 0.04em
	\ifnum\quot@count>1\hbox{,}\else
	{\setbox0=\hbox{''}\hbox to \wd0{,\hss,}}\fi
	\kern -0.04em
	\global\advance\quot@count by 1\ignorespaces}%
\def\de@rquot{\unskip\ifnum\quot@count>1'\else''\fi
	\global\advance\quot@count by -1\relax}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% KERNEL (FUNDAMENTAL)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% temporary and local control squences:
%
% \@value is the current value of HTML attributes,
% its processing must be immediate.
%
% \@result is mostly defined, once the value of
% some HTML attribute has been determined, as the
% right hand side of `[value]'=`result token'.
% Its processing nust also be immediate. \@result
% is also the temporary control sequence used in
% the `\@replace{something}\by{something else}'
% to be the string where replacement take place.
%
% \@default is a very practical control sequence 
% for syntactic programming.
%
% \@suffix, \@URL and \@loop deal with multimedia
% elements, their meaning are evident, their use
% must be immediate.
%
% \@content may contain `cite' or `alt' value, but
% leads to no special processing.
%
% \current@color, \current@font (plain only) and
% \current@face are local control sequences that
% contain local information in order to restore it
% if it must.
%
% \@tmp is any temporary non-local control sequence,
% its use is reserved to programming facility and do
% not transmit any information to some other control
% sequence.
%
% On the other side, some temporary control sequences
% may transmit information:
%
% \out@tmp is any temporary control sequence appearing
% outside of a group.
%
% \ins@tmp is any temporary control sequence appearing
% inside a group.
%
\let\@value=\relax
\let\@result=\relax
\def\@default{\@default}%
%
% looks for #1 in #2 then defines \@result.
%
\def\@find#1\in#2{%
	\def\@@find##1[#1]##2=##3##4\end@@find{\def\@result{##3}}%
	\expandafter\@@find#2[#1]=\@default\end@@find}%
%
% in #1, look for the first argument which is listed in #2
% then defines \@result.
%
\def\@find@one#1\in#2{\@@find@one#1,\undefined\in#2\end@@find@one}%
\def\@@find@one#1#2,#3\in#4\end@@find@one{%
	\ifx#1\space\@find#2\in{#4}\else\@find#1#2\in{#4}\fi
	\ifx\@result\@default\ifx\undefined#3\else
	\@@find@one#3\in#4\end@@find@one\fi\fi}%
%
% determines the suffix (if any) of #1, stores it in \@suffix,
% then looks for it in the expansion of the token following `\in'.
%
\def\@find@suffix#1\in{\def\@@suffix##1.##2\end@@suffix{%
		\ifx\undefined##2\def\@suffix{##1}%
		\else\@@suffix##2\end@@suffix\fi}%
	\@@suffix#1.\undefined\end@@suffix\expandafter\@find\@suffix\in}%
%
% replaces #1 by #2 in the control sequence \@result.
% (doesn't work if \@result has arguments...)
%
\long\def\@replace#1\by#2{%
	\long\def\@@replace##1#1##2\@done##3\end@@replace{%
		\ifx\undefined##2\def\@result{##3##1}\else
		\@@replace##2\@done##3##1#2\end@@replace\fi}%
	\expandafter\@@replace\@result#1\undefined\@done\end@@replace}%
%
% adds to control sequence #1, #2 and #3
% (doesn't work if #1 has arguments...)
%
\long\def\@addto#1#2#3{\def\@tmp{\expandafter\def\noexpand#1}%
	\expandafter\expandafter\expandafter\@tmp
	\expandafter\@@addto#1\@also{#2}{#3}}%
\long\def\@@addto#1\@also#2#3{{#2#1#3}}%
%
% for syntax only
%
\def\@find@value{\expandafter\@find\@value\in}%
\def\@find@values{\expandafter\@find@one\@value\in}%
\def\@apply{\ifx\@result\@default\else\@result\fi}%
\def\if@default@value{\expandafter
	\ifx\csname @\@value\endcsname\@default}%
%
% DEFINING HTML ELEMENTS
%
% Some conventions:
% \tag@xxx refers to <xxx ...>%
% \HTMLxxx refers to user's control sequences (?!?)
% \HTML@xxx refers to very private control sequences
%
\def\HTMLdef<#1>{\expandafter\def\csname tag@#1\endcsname##1>}%
%
\def\HTMLzdef<#1 {\expandafter\def\csname tag@#1\endcsname}% fragile
%
\def\HTMLlet<#1>#2<#3>{% makes start and end tags equals
	\def\@tmp{\expandafter\let\csname tag@#1\endcsname=}%
	\expandafter\@tmp\csname tag@#3\endcsname
	\def\@tmp{\expandafter\let\csname tag@/#1\endcsname=}%
	\expandafter\@tmp\csname tag@/#3\endcsname}%
%
% PROCESSING HTML ELEMENTS
%
% there is a nasty tricky thing below. With preformatted text,
% space is active so that tag-processing would be impossible
% if $<$ doesn't restore, at least until the next matching $>$,
% its category code to the space character.
%
\def\HTMLelement{%
	\bgroup\catcode`\ =10\catcode`\_=12
	\catcode`\&=12\catcode`\^^M=10
%	\noisolatin% very slow
	\HTMLtag}%
%
\def\HTMLtag#1>{%
	\def\@tmp##1 ##2\end@tmp{\ifx\undefined##2%
		\def\@tmp{\HTML@tag#1 >}\else
		\def\@tmp{\HTML@tag#1>}\fi\@tmp}%
	\@tmp#1 \undefined\end@tmp}%
%
\def\HTML@tag#1 #2>{%
	\def\@tmp{\global\let\@tag=}%
	\expandafter\@tmp\csname tag@#1\endcsname
	\ifx\@tag\relax
		\HTMLerror{<#1> is undefined}%
		\debug@tag#1\relax\relax\relax\relax\relax
	\fi
	\egroup\@tag#2>}%
%
% To be enhanced
%
\def\debug@tag#1#2#3\relax{%
	\ifx#1!%
		\ifx#2-\gdef\@tag{\@@tag#3}\gdef\@@tag##1->{}%
		\else\gdef\@tag##1>{}\fi
	\else\gdef\@tag##1>{}%{{\HTMLmonospace<#1>}}
	\fi}%
%
% PROCESSING HTML ATTRIBUTES
%
\def\@attrs#1#2{%
	\expandafter\@@attrs#1,\undefined.\undefined\in#2\end@@attrs}%
%
\def\@@attrs#1.#2,#3.#4\in#5\end@@attrs{%
	%%  some spaces are fundamental
	\def\@@value##1 #2="##2"##3\end@@value{\def\@value{##2}}%
	\@@value( #5 #2="default" )\end@@value
	%%  first find \@value of attribute #2
	\@find#1.#2\in\HTMLattributes
	%%  then find \@result related to attribute #1.#2
	\ifx\@result\@default
	\HTMLerror{unknown attribute #2}%
	%%  debugging
	\else\@result\fi
	%%  note: \@result may take \@value into account
	\ifx\undefined#3\else\@@attrs#3.#4\in#5\end@@attrs\fi}%
	%%  proceed further
%
% FACILITIES FOR PROCESSING PSEUDO-NUMERICAL ATTRIBUTES' VALUES
%
% \HTMLdimen\your_dimen=\something\unit_dimen\reference_dimen
% where the token \something is a number or a percentage.
%
\catcode`\%=12
\def\HTMLdimen#1=#2#3#4{\expandafter\HTML@dimen#2 %\undefined
	\@dimen#1#3#4\end@dimen}\relax
\def\HTML@dimen#1%#2#3\@dimen#4#5#6\end@dimen{\ifx#2\undefined
	#4=#1#5\else#4=#6\divide#4 by 100\multiply#4 by #1\fi}\catcode`\%=14
%
% \HTMLcount\my_count={?}, where `?' may be an absolute positive
% integer or an incremental argument (..., -2, -1, +1, +2,...).
%
\def\HTMLcount#1=#2{\expandafter\HTML@count#2\@count#1\end@count}%
\def\HTML@count#1#2\@count#3\end@count{%
	\ifx#1+\advance#3 by #2
	\else\ifx#1-\advance#3 by -#2
	\else#3=#1#2\relax\fi\fi}%
%
% sets the stretch part of a skip
%
\def\HTMLstretch#1to{\dimen@=#1\relax#1=\dimen@\relax\advance#1 by }%
%
% HANDLING FONT SIZE AND FACE
%
\def\HTMLface#1{\def\current@face{#1}#1}%
\def\current@face{\HTMLroman}%
%
\def\HTMLfontsize#1{\HTMLcount\current@size={#1}%
	\ifnum\current@size<1\relax\current@size=1\fi
	\ifnum\current@size>7\relax\current@size=7\fi
	\expandafter\@find\the\current@size\in\HTMLfonts
	\ifx\@result\@default
	\HTMLerror{font size not available}% Security only?
	\else\@result\fi}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PATH MANAGING SYSTEM
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\HTMLbase#1{\def\HTML@base{#1}}%
%
\catcode`\#=12
\catcode`\*=6
\def\encode@URL*1{\edef\@URL{*1}%
	\def\@tmp**1**2\end@tmp{\let\@tmp=**1}%
	\expandafter\@tmp*1\end@tmp
	\if#\@tmp% don't change source specification that begins with a #.
	\else
		\def\@tmp**1:**2\end@tmp{%
		\@find**1\in{
		[ftp][gopher][http][mailto][news][telnet][wais]
			={\edef\@URL{*1}}
		[file]
			={\let\@URL=\undefined}
				}%
			\ifx\undefined**2% (argument should be
				% an absolute or relative path)
				\edef\@URL{*1}\let\@result=\@default\fi
			\@apply}%
		\expandafter\@tmp*1:\undefined\end@tmp
		% if *1=file:...
		\ifx\@URL\undefined
			\def\@tmp**1:**2\end@tmp{\edef\@URL{**2}}%
			\expandafter\@tmp*1\end@tmp\let\@result=\@default
		\fi
		% if it is a file path, make it an absolute one:
		\ifx\@result\@default
			\def\@tmp**1**2\end@tmp{\if/**1%
				\edef\@URL{file:**1**2}%
				\else
				\edef\@URL{file:\HTML@base**1**2}\fi}%
			\expandafter\@tmp\@URL\end@tmp
		\fi
	\fi}%
\catcode`\#=6
\catcode`\*=12
%
\def\with@local@URL@do#1{#1 \@URL}%
%
\def\decode@URL{\def\@tmp##1:##2\end@tmp{\@find##1\in{
	[file]={\edef\@URL{##2}%
		\let\with@URL@do=\with@local@URL@do}
	% (get rid of ``file:'')
	[ftp][http]={%
		\let\with@URL@do=\with@distant@URL@do}
	% use an external program
	}\@apply}\expandafter\@tmp\@URL\end@tmp}%
%
\HTMLbase{}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% COLORS AND MULTIMEDIA (does almost nothing; use system
% specific input file to get colors [htmlinux.tex]).
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Next control sequences must be defined.
% They appear explicitely in the sequel.
%
\def\noHTMLcolors{%
	\let\bg@leaders=\relax
	\let\bg@backbox=\relax
	\def\choose@color##1{}%
	\def\background@color##1{}%
	\def\restore@color{}%
	\def\define@color##1##2{}}%
\def\default@color{}%
\def\highlight@color{}%
\def\noHTMLmultimedia{%
	\def\with@distant@URL@do##1{##1 \@URL}%
	\def\HTMLspecial##1{}%
	\let\HTMLmedia=\relax}%
\let\HTMLcolors=\noHTMLcolors
\let\HTMLmultimedia=\noHTMLmultimedia
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MOST TAGS MUST MATCH
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\begin@tag#1{\bgroup\def\opening@tag{#1}%
	\advance\tag@count by 1
	\HTMLinfo{<#1> (\the\tag@count)}}%
%
\def\end@tag#1{\def\closing@tag{#1}%
	\ifx\opening@tag\closing@tag
	\else\HTMLerror{mixing environments
	\opening@tag\space and \closing@tag}\fi
	\HTMLinfo{</\closing@tag> (\the\tag@count)}%
	\ifnum\tag@count<0
	\HTMLerror{I won't close so many tags}\else\egroup\fi}%
%
\def\forced@end@tag#1{\gdef\closing@tag{#1}%
	\gdef\@tmp{\ifx\opening@tag\closing@tag
	\global\let\@tmp=\relax\else
	\HTMLerror{unclosed \opening@tag}\egroup
	\fi\@tmp}\@tmp
	\end@tag{#1}}%
%
\def\soft@tag#1{\HTMLinfo{<#1> (soft)}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PERSONNAL TAGS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<inactive>{\begin@tag{inactive}}%
\HTMLdef</inactive>{\end@tag{inactive}}%
\HTMLdef<in@ctive>{\soft@tag{inactive}}%
\HTMLdef</in@ctive>{\soft@tag{/inactive}}%
\HTMLdef<unsupported>{\begin@tag{unsupported}}%
\HTMLdef</unsupported>{\end@tag{unsupported}}%
\HTMLdef<unsupp@rted>{\soft@tag{unsupported}}%
\HTMLdef</unsupp@rted>{\soft@tag{/unsupported}}%
%
% THE <tex>'s TAG !!!
%
% <tex 'whatever'>'tex material'</tex>%
%
% Use anywhere
%
% Beware: </ must not appear within any kind of script.
%
\def\@script@TeX{\long\def\@script##1</{##1\HTMLelement/}%
	\fromHTMLtoTeX\@script}%
%
\HTMLdef<tex>{\begin@tag{TeX}\@script@TeX}%
\HTMLdef</tex>{\end@tag{TeX}}%
%
\HTMLlet<TeX>=<tex>%
\HTMLlet<TEX>=<tex>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SKELETAL TAGS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<body>{\begin@tag{body}\@attrs{core.lang,%
	color.text,color.link,color.vlink,color.alink,%
	color.bgcolor,color.background}{#1}%
	\choose@color\current@color\HTMLbreak0}%
%
\HTMLdef</body>{\restore@color\end@tag{body}\HTMLbreak0}%
%
\HTMLzdef<comment #1/comment>{%
	\HTMLinfo{Skipping some comments}}% fragile and obsolete
\HTMLzdef<COMMENT #1/COMMENT>{%
	\HTMLinfo{Skipping some comments}}% fragile and obsolete
%
\HTMLlet<frameset>=<unsupported>%
%
\HTMLlet<frame>=<unsupp@rted>%
%
\HTMLdef<noframes>{\soft@tag{noframes}}%
\HTMLdef</noframes>{\soft@tag{/noframes}}%
%%
\HTMLdef<head>{\begin@tag{head}}%
\HTMLdef</head>{\end@tag{head}}%
%
\HTMLdef<html>{\begin@tag{html}}%
\HTMLdef</html>{\end@tag{html}\end@HTML}%
%
\HTMLlet<BODY>=<body>%
\HTMLlet<FRAMESET>=<frameset>%
\HTMLlet<FRAME>=<frame>%
\HTMLlet<NOFRAMES>=<noframes>%
\HTMLlet<HEAD>=<head>%
\HTMLlet<HTML>=<html>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HEADER TAGS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLlet<base>=<unsupp@rted>%
\HTMLlet<basefont>=<unsupp@rted>%
\HTMLlet<isindex>=<unsupp@rted>%
\HTMLlet<link>=<unsupp@rted>%
\HTMLlet<meta>=<in@ctive>%
\HTMLlet<nextid>=<in@ctive>%
\HTMLlet<style>=<unsupported>%
%
\HTMLzdef<title #1/title>{\HTMLinfo{Skipping title}}% fragile
\HTMLzdef<TITLE #1/TITLE>{\HTMLinfo{Skipping title}}% fragile
%
\HTMLlet<BASE>=<base>%
\HTMLlet<BASEFONT>=<basefont>%
\HTMLlet<ISINDEX>=<isindex>%
\HTMLlet<LINK>=<link>%
\HTMLlet<META>=<meta>%
\HTMLlet<NEXTID>=<nextid>%
\HTMLlet<STYLE>=<style>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HYPERLINKS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<a>{\begin@tag{a}\let\ins@tmp=\relax
	\@attrs{a.name,a.href}{#1}}% id, target
\HTMLdef</a>{\ins@tmp\end@tag{a}}%
%
\HTMLlet<A>=<a>%
\HTMLlet<xa>=<a>\HTMLlet<XA>=<a>% Obsolete
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TEXT MARKUP TAGS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PHYSICAL TAGS
%
\HTMLdef<b>{\begin@tag{b}\HTMLface\HTMLbold}%
\HTMLdef</b>{\end@tag{b}}%
%
\HTMLdef<big>{\begin@tag{big}\HTMLfontsize{+1}}%
\HTMLdef</big>{\end@tag{big}}%
%
\HTMLlet<blink>=<unsupported>%
%
\HTMLdef<i>{\begin@tag{i}\HTMLface\HTMLitalic}%
\HTMLdef</i>{\end@tag{i}\ifhmode\/\fi}%
%
\HTMLdef<s>{\setbox0=\hbox\begin@tag{strike}\ignorespaces}%
\HTMLdef</s>{\unskip\end@tag{strike}%
	\leavevmode\hbox{\dimen0=0.5ex\advance\dimen0 by 0.2pt
		\dimen1=-0.5ex\advance\dimen1 by 0.2pt
		\vrule width\wd0 height\dimen0 depth\dimen1\llap{\box0}}}%
%
\HTMLdef<small>{\begin@tag{small}\HTMLfontsize{-1}}%
\HTMLdef</small>{\end@tag{small}}%
%
\HTMLlet<strike>=<s>%
%
\HTMLdef<sub>{\relax\ifmmode\let\out@tmp=\relax
	\else\let\out@tmp=$$\fi
	\@subscript\begin@tag{sub}\hbox\bgroup
	\HTMLfontsize{-1}\ignorespaces}%
\HTMLdef</sub>{\unskip\egroup\end@tag{sub}\out@tmp}%
%
\HTMLdef<sup>{\relax\ifmmode\let\out@tmp=\relax
	\else\let\out@tmp=$$\fi
	\@supscript\begin@tag{sup}\hbox\bgroup
	\HTMLfontsize{-1}\ignorespaces}%
\HTMLdef</sup>{\unskip\egroup\end@tag{sup}\out@tmp}%
%
\HTMLdef<tt>{\begin@tag{tt}\HTMLface\HTMLmonospace}%
\HTMLdef</tt>{\end@tag{tt}}%
%
\HTMLdef<u>{\setbox0=\hbox\begin@tag{u}\ignorespaces}%
\HTMLdef</u>{\unskip\end@tag{u}%
	\@@math{\underline{\smash{\box0}}}}%
%
\HTMLlet<B>=<b>%
\HTMLlet<BIG>=<big>%
\HTMLlet<BLINK>=<blink>%
\HTMLlet<I>=<i>%
\HTMLlet<S>=<s>%
\HTMLlet<SMALL>=<small>%
\HTMLlet<STRIKE>=<strike>%
\HTMLlet<SUB>=<sub>%
\HTMLlet<SUP>=<sup>%
\HTMLlet<TT>=<tt>%
\HTMLlet<U>=<u>%
%
% CONTENT-BASED TAGS
%
\HTMLlet<abbr>=<inactive>%
\HTMLlet<acronym>=<inactive>%
\HTMLlet<cite>=<i>%
\HTMLlet<code>=<tt>%
\HTMLzdef<del #1/del>{}% fragile, cite=URL datetime=date
\HTMLzdef<DEL #1/DEL>{}% fragile
\HTMLlet<dfn>=<inactive>%
\HTMLlet<em>=<i>%
\HTMLlet<ins>=<inactive>% cite=URL datetime=date
\HTMLlet<kbd>=<tt>%
\HTMLlet<samp>=<tt>%
\HTMLlet<strong>=<b>%
\HTMLlet<var>=<i>%
%
\HTMLlet<ABBR>=<abbr>%
\HTMLlet<ACRONYM>=<acronym>%
\HTMLlet<CITE>=<cite>%
\HTMLlet<CODE>=<code>%
\HTMLlet<DFN>=<dfn>%
\HTMLlet<EM>=<em>%
\HTMLlet<INS>=<ins>%
\HTMLlet<KBD>=<kbd>%
\HTMLlet<SAMP>=<samp>%
\HTMLlet<STRONG>=<strong>%
\HTMLlet<VAR>=<var>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FORMATTED LISTS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<li>{\HTMLbreak1
	\advance\item@count by 1
	\@attrs{list.type,list.value}{#1}%
	\leavevmode\llap{\item@mark\enspace}%
	\soft@tag{li}\ignorespaces}%
%
\HTMLdef</li>{\soft@tag{/li}}%
%
\HTMLdef<ul>{\HTMLbreak0\begin@tag{ul}%
	\advance\list@level by 1
	\advance\leftskip by\HTMLindent
	\ifcase\list@level\or
	\@attrs{list.type}{type="disc"}\or
	\@attrs{list.type}{type="circle"}\else
	\@attrs{list.type}{type="square"}\fi
	\item@count=0\@attrs{list.type,list.value}{#1}}%
\HTMLdef</ul>{\HTMLbreak1\end@tag{ul}}%
%
\HTMLdef<lh>{\HTMLbreak1
	\leavevmode\hskip-\HTMLindent\begin@tag{lh}}%
\HTMLdef</lh>{\HTMLnobreak1\end@tag{lh}}%
%
\HTMLdef<ol>{\HTMLbreak0\begin@tag{ol}%
	\advance\list@level by 1
	\advance\leftskip by\HTMLindent
	\ifcase\list@level\or
	\@attrs{list.type}{type="1"}\or
	\@attrs{list.type}{type="i"}\else
	\@attrs{list.type}{type="a"}\fi
	\item@count=0\@attrs{list.type,list.value}{#1}}%
\HTMLdef</ol>{\HTMLbreak1\end@tag{ol}}%
%
\let\end@dt=\relax
%
\HTMLdef<dt>{\HTMLbreak1
	\setbox0=\hbox\begin@tag{dt}%
	\def\end@dt{\unskip\enspace\end@tag{dt}%
		\ifdim\HTMLindent>\wd0\wd0=\HTMLindent\fi
		\leavevmode\hskip-\HTMLindent\box0}%
	\ignorespaces}%
\HTMLdef</dt>{\end@dt}%
%
\HTMLdef<dd>{\end@dt\soft@tag{dd}}%
\HTMLdef</dd>{\soft@tag{/dd}}%
%
\HTMLdef<dl>{\HTMLbreak0\begin@tag{dl}%
	\advance\list@level by 1
	\advance\leftskip by\HTMLindent}%
\HTMLdef</dl>{\HTMLbreak1\end@tag{dl}}%
%
\HTMLlet<dir>=<ul>%
\HTMLlet<menu>=<ul>%
%
\HTMLlet<DD>=<dd>%
\HTMLlet<DIR>=<dir>%
\HTMLlet<DL>=<dl>%
\HTMLlet<DT>=<dt>%
\HTMLlet<LH>=<lh>%
\HTMLlet<LI>=<li>%
\HTMLlet<MENU>=<menu>%
\HTMLlet<OL>=<ol>%
\HTMLlet<UL>=<ul>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FORMS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<form>{\begin@tag{form}\@attrs{core.lang}{#1}}%
%	\@attrs{form.action,form.enctype,form.method}{#1}}%
\HTMLdef</form>{\end@tag{form}}%
%
\HTMLlet<button>=<unsupported>%
%
\HTMLlet<fieldset>=<unsupported>%
%
\HTMLdef<input>{\soft@tag{input}%
	\@attrs{form.size,form.type}{#1}}%
\HTMLdef</input>{\soft@tag{/input}}%
%
\HTMLlet<keygen>=<in@ctive>% challenge=string
%
\HTMLlet<label>=<inactive>%
%
\HTMLlet<legend>=<inactive>%
%
\HTMLdef<select>{\begin@tag{select}%
%	\@attrs{form.name,form.size,form.multiple}{#1}%
	\def\@option@sep{%
		\def\@option@sep{\unskip\discretionary{--}{--}{---}}}%
	\ignorespaces}%
\HTMLdef</select>{\unskip\end@tag{select}}%
%
\def\@option@sep{\HTMLerror{attempting to use <option>%
	outside a <select>...</select> element}}%
%
\HTMLdef<option>{\soft@tag{option}%
%	\@attrs{form.selected}{#1}%
	\@option@sep}%
\HTMLdef</option>{\soft@tag{/option}}%
%
\HTMLdef<optgroup>{\begin@tag{optgroup}%
	\@attrs{form.label}{#1}%
	[\ifx\@label\undefined
	\else(\@label)\ \fi\ignorespaces}%
\HTMLdef</optgroup>{\unskip]\end@tag{optgroup}}%
%
\HTMLdef<textarea>{\begin@tag{textarea}%
	\par@insert{{\@attrs{form.cols,form.rows}{#1}}}%
	\setbox0=\hbox\bgroup\ignorespaces}%
\HTMLdef</textarea>{\unskip\egroup\ifdim\wd0>\z@
%	\HTMLinfo{\unhbox0} ??????????????
	\fi\end@tag{textarea}}%
%
\HTMLlet<FORM>=<form>%
\HTMLlet<BUTTON>=<button>%
\HTMLlet<FIELDSET>=<fieldset>%
\HTMLlet<INPUT>=<input>%
\HTMLlet<KEYGEN>=<keygen>%
\HTMLlet<LABEL>=<label>%
\HTMLlet<LEGEND>=<legend>%
\HTMLlet<SELECT>=<select>%
\HTMLlet<OPTION>=<option>%
\HTMLlet<OPTGROUP>=<optgroup>%
\HTMLlet<TEXTAREA>=<textarea>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% RULES
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLdef<hr>{\HTMLbreak1\nointerlineskip\soft@tag{hr}%
	{\par@line@status
	\dimen@i=\par@linewidth
	\advance\dimen@i by -\leftskip
	\advance\dimen@i by -\rightskip
	\vbox{\hbox to \hsize{\kern\par@leftskip\hskip\leftskip
		\@attrs{hr.noshade,hr.size,hr.width,hr.align}{#1}%
		\global\advance\par@remainder by \dimen@ii
		\hskip\rightskip}}}%
	\nointerlineskip
	\HTMLbreak1}%
\HTMLdef</hr>{\soft@tag{/hr}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% IMAGES AND MULTIMEDIA
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\let\insert@anchor=\relax
\let\end@insert@anchor=\relax
%
\def\HTMLmediaframe{%
	\insert@anchor\@hrule\hbox{\@vrule
	\vbox to \dimen@ii{\vss\HTMLmedia}%
	\kern\dimen@i\@vrule\end@insert@anchor}\@hrule}%
%
\HTMLdef<bgsound>{\soft@tag{bgsound}%
	{\@attrs{bgsound.src,bgsound.loop}{#1}\HTMLmedia}}%
\HTMLdef</bgsound>{\soft@tag{/bgsound}}%
%
\HTMLdef<img>{\soft@tag{img}{%
	\@attrs{parinsert.align,parinsert.valign,%
		parinsert.hspace,parinsert.vspace}{#1}%
	\par@insert{%
		\@attrs{img.src,img.loop,img.alt,img.width,%
			img.height,img.border}{#1}%
			\HTMLmediaframe}}}%
%
\HTMLdef</img>{\soft@tag{/img}}%
%
\HTMLlet<map>=<inactive>%
\HTMLlet<area>=<inactive>%
\HTMLlet<marquee>=<unsupported>%
\HTMLlet<object>=<in@ctive>%
\HTMLlet<param>=<in@ctive>%
\HTMLlet<embed>=<in@ctive>%
\HTMLlet<noembed>=<in@ctive>%
%
\HTMLlet<BGSOUND>=<bgsound>%
\HTMLlet<HR>=<hr>%
\HTMLlet<IMG>=<img>%
\HTMLlet<MAP>=<map>%
\HTMLlet<AREA>=<area>%
\HTMLlet<MARQUEE>=<marquee>%
\HTMLlet<PARAM>=<param>%
\HTMLlet<EMBED>=<embed>%
\HTMLlet<NOEMBED>=<noembed>%
\HTMLlet<OBJECT>=<object>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TABLE TAGS (to be enhanced)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% <tr></tr> is not local, there is no supplementary groups
% (there are too many groups already), so messages are given
% for information only.
%
% !!!!! CAPTION DOESN'T WORK AT ALL
\newbox\@caption
\HTMLdef<caption>{\cr\begin@tag{caption}\strut\td@lfil}%
\HTMLdef</caption>{\unskip\td@rfil\end@tag{caption}\td@multispan{11}%
	\cr\noalign{\@hrule}}%
%
\HTMLdef<tr>{\soft@tag{tr}%
	\@attrs{table.align}{#1 align="left"}%
	\global\let\td@lfil=\td@lfil
	\global\let\td@rfil=\td@rfil
	\ignorespaces}%
\HTMLdef</tr>{\unskip&\soft@tag{/tr}\cr\noalign{\@hrule}}%
%
% Not excellent...
%
\def\bg@solid@leaders#1{\choose@color\bg@color
	\leaders\vrule height\ht0 depth\dp0#1\restore@color}%
\def\bg@solid@backbox{\rlap{\choose@color\bg@color
	\vrule width\wd0 height\ht0 depth\dp0\restore@color}}%
%
% borrowed from plain as usual...
%
\def\td@multispan#1{\count@#1\relax
  \loop\ifnum\count@>\@ne \td@span\repeat}
\def\td@span{\span\omit\advance\count@\m@ne}
%
\HTMLdef<td>{&&%
	\@attrs{td.width,table.colspan,%
	table.align,table.bgcolor}{#1}%
	\td@box\begin@tag{td}\td@padding\td@lfil\ignorespaces}%
\HTMLdef</td>{\unskip\td@rfil\td@padding\strut
	\end@tag{td}\setbox0=\lastbox
	\setbox0=\vbox{\td@padding\vfil\box0\vfil\td@padding}%
	\td@leaders\td@lfil\td@backbox\copy0\td@leaders\td@rfil\null
	\td@colspan\ignorespaces}%
% wait for vertical spacing...
%	\@vrule\td@bg\td@lfil\td@@bg\copy0\td@bg\td@rfil\td@colspan\@vrule}%
%
\HTMLdef<th>{&&%
	\@attrs{td.width,table.colspan,%
	table.align,table.bgcolor}{#1}%
	\td@box\begin@tag{th}\HTMLface\HTMLbold
	\td@padding\td@lfil\ignorespaces}%
\HTMLdef</th>{\unskip\td@rfil\td@padding\strut
	\end@tag{th}\setbox0=\lastbox
	\setbox0=\vbox{\td@padding\vfil\box0\vfil\td@padding}%
	\td@leaders\td@lfil\td@backbox\copy0\td@leaders\td@rfil\null
	\td@colspan\ignorespaces}%
%
\newdimen\table@width
%
\HTMLdef<table>{%
	\@attrs{parinsert.align,parinsert.valign,%
		parinsert.hspace,parinsert.vspace}{#1}%
	\setbox0=\vbox\begin@tag{table}%
		\def\HTMLbreak##1{\unskip\ [br]\ \ignorespaces}%
		\def\HTMLnobreak##1{\unskip\ [br]\ \ignorespaces}%
		\nointerlineskip\tabskip=\z@
		\par@line@status
		\@attrs{table.width,table.cellspacing,%
			table.cellpadding,table.border}{#1}%
		\table@halign\bgroup
			##&&##\@vrule&##\cr
% wait for vertical spacing...
%			##&&\td@spacing\@vrule##\@vrule&##\cr
			\noalign{\@hrule}}%
\HTMLdef</table>{\cr\egroup\end@tag{table}%
	\par@insert{\unvbox0}}%
%
\HTMLlet<colgroup>=<inactive>%
\HTMLlet<tbody>=<inactive>%
\HTMLlet<tfoot>=<inactive>%
\HTMLlet<thead>=<inactive>%
%
\HTMLlet<TABLE>=<table>%
\HTMLlet<CAPTION>=<caption>%
\HTMLlet<COLGROUP>=<colgroup>%
\HTMLlet<COL>=<col>%
\HTMLlet<TBODY>=<tbody>%
\HTMLlet<TFOOT>=<tfoot>%
\HTMLlet<THEAD>=<thead>%
\HTMLlet<TR>=<tr>%
\HTMLlet<TD>=<td>%
\HTMLlet<TH>=<th>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% EXECUTABLE CONTENT
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLlet<applet>=<in@ctive>%
\HTMLlet<noscript>=<in@ctive>%
\HTMLlet<server>=<unsupported>%
%
% usage: <script language="tex">...</???>%
% where ??? had better to be equal to script.
% (see, for instance, \@script@TeX' definition)
% I've isolated most things in this control
% sequence which is quite dangerous...
%
\HTMLdef<script>{\begin@tag{script}% fragile
	\def\@@value##1 language="##2"##3\end@@value{\def\@value{##2}}%
	\@@value( #1 language="default" )\end@@value
	\HTMLinfo{language="\@value"}%
	\@find@value{
		[tex][TeX][TEX]=\@script@TeX
		}%
	\@apply}%
\HTMLdef</script>{\end@tag{script}}%
%
\HTMLlet<APPLET>=<applet>%
\HTMLlet<SCRIPT>=<script>%
\HTMLlet<NOSCRIPT>=<noscript>%
\HTMLlet<SERVER>=<server>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CONTENT PRESENTATION AND FLOW
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLlet<address>=<i>%
%
\HTMLlet<bdo>=<unsupported>% I'd love to implement this tag...
%
\HTMLdef<blockquote>{\HTMLbreak1
	\begin@tag{blockquote}%
	\advance\leftskip by\HTMLindent
	\advance\rightskip by\HTMLindent}%
%
\HTMLdef</blockquote>{\HTMLbreak1\end@tag{blockquote}}%
%
\HTMLdef<br>{\HTMLbreak0\@attrs{core.clear}{#1}}% ????????
\HTMLdef</br>{}%
%
\HTMLdef<center>{\HTMLbreak1\begin@tag{center}%
	\@attrs{core.align,core.id,core.lang}{align="center" #1}}%
\HTMLdef</center>{\HTMLbreak1\end@tag{center}}%
%
\HTMLdef<div>{\HTMLbreak0\begin@tag{div}%
	\@attrs{core.align,core.id,core.lang}{#1}}%
\HTMLdef</div>{\HTMLbreak0\end@tag{div}}%
%
\HTMLdef<font>{\begin@tag{font}%
	\@attrs{font.color,font.face,font.size}{#1}%
	\choose@color\current@color}%
\HTMLdef</font>{\restore@color\end@tag{font}}%
%
\HTMLdef<h1>{\HTMLbreak5\begin@tag{h1}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize6\HTMLface\HTMLbold}%
\HTMLdef</h1>{\HTMLnobreak5\end@tag{h1}}%
%
\HTMLdef<h2>{\HTMLbreak4\begin@tag{h2}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize5\HTMLface\HTMLbold}%
\HTMLdef</h2>{\HTMLnobreak4\end@tag{h2}}%
%
\HTMLdef<h3>{\HTMLbreak3\begin@tag{h3}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize4\HTMLface\HTMLbold}%
\HTMLdef</h3>{\HTMLnobreak3\end@tag{h3}}%
%
\HTMLdef<h4>{\HTMLbreak2\begin@tag{h4}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize3\HTMLface\HTMLbold}%
\HTMLdef</h4>{\HTMLnobreak2\end@tag{h4}}%
%
\HTMLdef<h5>{\HTMLbreak1\begin@tag{h5}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize3\HTMLface\HTMLitalic}%
\HTMLdef</h5>{\HTMLnobreak1\end@tag{h5}}%
%
\HTMLdef<h6>{\HTMLbreak1\begin@tag{h6}%
	\@attrs{core.align,core.id,core.lang}{#1}%
	\HTMLfontsize3\HTMLface\HTMLitalic}%
\HTMLdef</h6>{\HTMLnobreak0\end@tag{h6}}%
%
\HTMLlet<iframe>=<unsupported>%
\HTMLlet<ilayer>=<unsupported>%
\HTMLlet<layer>=<unsupported>%
\HTMLlet<listing>=<unsupported>%
\HTMLlet<multicol>=<unsupported>%
%
\HTMLdef<nobr>{\hbox\begin@tag{nobr}}%
\HTMLdef</nobr>{\end@tag{nobr}}%
%
\HTMLdef<p>{\HTMLbreak2\soft@tag{p}%
	\@attrs{core.align,core.id,core.lang}{#1}}%
\HTMLdef</p>{\HTMLbreak2\soft@tag{/p}%
	\@attrs{core.align}{align="justify"}}%
%
\HTMLlet<plaintext>=<unsupp@rted>%
%
{\obeyspaces\def\@space{\leavevmode\space}\global\let =\@space
\catcode`\^^I=\active\gdef^^I{\hskip\HTMLindent}}%
%
\HTMLdef<pre>{\HTMLbreak1\begin@tag{pre}%
	\rightskip=0pt minus 1000pt
	\def\par{\ifvmode\endgraf\ifdim\lastskip<\medskipamount
	\removelastskip\penalty-100\medskip\fi\else\endgraf\fi}%
	\obeylines\obeyspaces\catcode`\^^I=\active\HTMLface\HTMLmonospace}%
\HTMLdef</pre>{\HTMLbreak1\end@tag{pre}}%
%
\HTMLdef<q>{\begin@tag{q}\@attrs{core.cite,core.lang}{#1}\@lquot}%
\HTMLdef</q>{\@rquot\end@tag{q}}%
%
\HTMLlet<spacer>=<unsupp@rted>%
%
\HTMLlet<span>=<inactive>%
%
\HTMLdef<wbr>{\-}\HTMLdef</wbr>{}%
%
\HTMLlet<xmp>=<unsupp@rted>%
%
\HTMLlet<ADDRESS>=<address>%
\HTMLlet<BLOCKQUOTE>=<blockquote>%
\HTMLlet<BDO>=<bdo>%
\HTMLlet<BR>=<br>%
\HTMLlet<CENTER>=<center>%
\HTMLlet<DIV>=<div>%
\HTMLlet<FONT>=<font>%
\HTMLlet<H1>=<h1>%
\HTMLlet<H2>=<h2>%
\HTMLlet<H3>=<h3>%
\HTMLlet<H4>=<h4>%
\HTMLlet<H5>=<h5>%
\HTMLlet<H6>=<h6>%
\HTMLlet<H7>=<h7>%
\HTMLlet<IFRAME>=<iframe>%
\HTMLlet<ILAYER>=<ilayer>%
\HTMLlet<LAYER>=<layer>%
\HTMLlet<LISTING>=<listing>%
\HTMLlet<MULTICOL>=<multicol>%
\HTMLlet<NOBR>=<nobr>%
\HTMLlet<P>=<p>%
\HTMLlet<PLAINTEXT>=<plaintext>%
\HTMLlet<PRE>=<pre>%
\HTMLlet<Q>=<q>%
\HTMLlet<SPACER>=<spacer>%
\HTMLlet<SPAN>=<span>%
\HTMLlet<WBR>=<wbr>%
\HTMLlet<XMP>=<xmp>%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% UNLISTED
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLlet<person>=<inactive>%
\HTMLlet<PERSON>=<inactive>%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SGML FLAVOR
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\HTMLzdef<!-- #1-->{\HTMLinfo{Skipping some comments}}% fragile
%
% parameter entities are not supported, but tags with attributes
% within entities definitions are supported. Example:
%
%<!ENTITY author "<p align=&quot;center&quot;>
%	<b>Anthony Phan</b><br>
%	D&eacute;partement de Math&eacute;matiques<br>
%	T&eacute;l&eacute;port 2 -- BP 30179<br>
%	Boulevard Pierre et Marie Curie<br>
%	F-86962 Futuroscope Chasseneuil cedex</p>" >
%
\catcode`\&=13
\HTMLzdef<!ENTITY #1 #2"#3"#4>{% fragile
	\HTMLinfo{New ENTITY: \noexpand&#1; }%
	\def\@result{#3}\@replace&amp;\by&\@replace&quot;\by"%
	\def\@tmp{\expandafter\@entity\HTMLentities\@name#1\@def}%
	\expandafter\@tmp\@result\end@entity}%
\catcode`\&=4
%
\def\@entity#1\@name#2\@def#3\end@entity{%
		\gdef\HTMLentities{[#2]={#3} #1}}%
%
\HTMLzdef<!ELEMENT #1 #2 #3 #4>{%
	\HTMLinfo{New ELEMENT: <#1>}%
	\expandafter\def\csname attrs@#1\endcsname{%
		core.align,core.id,core.lang}%
	\ifx-#2\ifx-#3%
		\expandafter\@element\csname attrs@#1\endcsname
		<#1>[\begin@tag{#1}|\end@tag{#1}]\else
		\expandafter\@element\csname attrs@#1\endcsname
		<#1>[\soft@tag{#1}|\soft@tag{/#1}]\fi\else
		\expandafter\@element\csname attrs@#1\endcsname
		<#1>[\soft@tag{#1}|\soft@tag{/#1}]\fi}% fragile
%
\def\@element#1<#2>[#3|#4]{\HTMLdef<#2>{#3\@attrs#1{##1}}%
	\HTMLdef</#2>{#4}}%
%
\HTMLzdef<!ATTLIST #1 #2>{%
	\HTMLinfo{New ATTLIST: <#1>}%
	\expandafter\ifx\csname tag@#1\endcsname\relax
		\HTMLerror{attempting to define attributes' list
			for undefined element <#1>}%
	\else
	\@attlist<#1>#2 * * * *\end@attlist
	\fi}%
%
\def\@attlist<#1>#2 #3 #4 #5\end@attlist{\ifx*#2\else
	\expandafter\@addto\csname attrs@#1\endcsname{}{,#1.#2}%
	\@addto\HTMLattributes{[#1.#2]={\HTMLinfo{#2="\@value"}}}{}%
	\@attlist<#1>#5\end@attlist\fi}
%
\HTMLdef<!DOCTYPE>{\HTMLinfo{DOCTYPE: #1}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HTML'S ATTRIBUTES (all in one control sequence)
%
% SEE: \@attrs{attr1,attr2,...}{#1}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\core@attributes{align,class,dir,id,lang,style,title}%
%
\def\HTMLattributes{%
%
% core
%
	[core.align][core.clear]={%
		\ifvmode\@find@value{
		[justify]={\spaceskip=\z@skip\xspaceskip=\z@skip
			\HTMLstretch\leftskip to \z@
			\HTMLstretch\rightskip to \z@
			\parfillskip=\z@ plus 1fil}
		[left]={\spaceskip=.3333em \xspaceskip=.5em
			\HTMLstretch\leftskip to \z@
			\HTMLstretch\rightskip to \z@ plus 1 fil
			\parfillskip=\z@ plus 1fil}
		[center]={\spaceskip=\z@skip\xspaceskip=\z@skip
			\HTMLstretch\leftskip to \z@ plus 1fil
			\HTMLstretch\rightskip to \z@ plus 1fil
			\parfillskip=\z@}
		[right]={\spaceskip=.3333em \xspaceskip=.5em
			\HTMLstretch\leftskip to \z@ plus 1 fil
			\HTMLstretch\rightskip to \z@
			\parfillskip=\z@}}%
		\@apply\relax\fi}
	[core.cite]={%
		\if@default@value
		%\HTMLinfo{cite is undefined}%
		\edef\@content{cite: undefined}%
		\else\HTMLinfo{cite="\@value"}%
		\edef\@content{cite: \@value}\fi}
	[core.class]={%
		\if@default@value\else
		\HTMLinfo{target="\@value"}\fi}
	[core.dir]={%
		\if@default@value\else
		\HTMLinfo{target="\@value"}\fi}
	[core.id]={%
		\if@default@value\else
		\HTMLinfo{id="\@value"}%
		\par@vhide{\HTMLspecial{a name="\@value"}%
			\HTMLspecial{/a}}\fi}
	[core.lang]={%
		\@find@value{
		[en][en-US]={\let\@lquot=\en@lquot\let\@rquot=\en@rquot
			\def\@lang{en}\language=0\frenchspacing}
		[de]={\let\@lquot=\de@lquot\let\@rquot=\de@rquot
			\def\@lang{de}\language=2\frenchspacing}
		[fr]={\let\@lquot=\fr@lquot\let\@rquot=\fr@rquot
			\def\@lang{fr}\language=1\frenchspacing}}%
		\@apply}
	[core.style]={%
		\if@default@value\else
		\HTMLinfo{target="\@value"}\fi}
	[core.title]={%
		\if@default@value\else
		\HTMLinfo{target="\@value"}\fi}
%
% anchor attributes
%
 	[a.href]={%
		\if@default@value\else
		\encode@URL{\@value}%
		\HTMLinfo{href="\@URL"}%
		\edef\insert@anchor{\noexpand\HTMLspecial{a href="\@URL"}}%
		\def\end@insert@anchor{\HTMLspecial{/a}}%
		\par@vhide{\HTMLspecial{a href="\@URL"}%
			\choose@color\link@color}\nobreak
		\def\ins@tmp{\par@vhide{\restore@color\HTMLspecial{/a}}}\fi}
	[a.name]={%
		\if@default@value\else
		\HTMLinfo{name="\@value"}%
		\par@vhide{\HTMLspecial{a name="\@value"}\HTMLspecial{/a}}%
		\fi}
	[a.target]={%
		\if@default@value\else
		\HTMLinfo{target="\@value"}\fi}
%
% list attributes
%
	[list.type]={%
		\@find@value{
		[disc]={\def\item@mark{\@@math\bullet}}
		[circle]={\def\item@mark{\@@math\circ}}
		[square]={\def\item@mark{\@@math\diamond}}
		[1]={\def\item@mark{\number\item@count.}}
		[i]={\def\item@mark{(\romannumeral\item@count)}}
		[I]={\def\item@mark{\uppercase\expandafter
			{\romannumeral\item@count}.}}
		[a]={\def\item@mark{{\HTMLface\HTMLitalic
			\alph{\item@count}\/})}}
		[A]={\def\item@mark{\Alph{\item@count}.}}}%
		\@apply}
	[list.value]={%
		\if@default@value\else\item@count=\@value\fi}
%
% table attributes
%
	[table.cellpadding]={%
		\if@default@value
		\def\td@padding{\kern4pt}%
		\else
		\edef\td@padding{\noexpand\kern\@value\imagepixel}%
		\fi}
	[table.cellspacing]={}{%
		\if@default@value
		\let\td@spacing=\relax
		\else
		\edef\td@spacing{\noexpand\hskip\@value\imagepixel plus 1em}%
		\fi}
	[table.border][img.border]={%
		\if@default@value
		\let\@hrule=\relax\let\@vrule=\relax
		\else\HTMLinfo{border="\@value"}%
		\edef\@hrule{\noexpand\hrule
			height \@value\rulepixel}%
		\edef\@vrule{\noexpand\vrule
			width \@value\rulepixel}%
		\fi}
	[table.width]={%
		\if@default@value\let\table@halign=\halign
		\table@width=\par@linewidth\else
		\HTMLdimen\table@width=\@value\imagepixel\par@linewidth
		\edef\table@halign{\noexpand\halign to\table@width}\fi}
	[td.width]={%
		\if@default@value\let\td@box=\hbox\else
		\HTMLdimen\dimen@i=\@value\imagepixel\table@width
		\edef\td@box{\noexpand\hbox to\dimen@i}\fi}
	[table.colspan]={%
		\if@default@value
		\let\td@colspan=\relax
		\else
		\count@=\@value
		\multiply\count@ by 2
		\advance\count@ by -1
		\edef\td@colspan{%
			\noexpand\td@multispan{\the\count@}}\fi}
	[table.align]={%
		\@find@value{
		[left]={\let\td@lfil=\hfilneg\let\td@rfil=\hfill}
		[center]={\let\td@lfil=\hfil\let\td@rfil=\hfil}
		[right]={\let\td@lfil=\hfill\let\td@rfil=\hfilneg}}%
		\@apply}
	[table.bgcolor]={%
		\if@default@value
			\let\td@leaders=\relax\let\td@backbox=\relax
		\else
			\HTMLinfo{bgcolor="\@value"}%
			\define@color\bg@color\@value
			\let\td@leaders=\bg@leaders
			\let\td@backbox=\bg@backbox
		\fi}
%
% hrule attributes
%
	[hr.size]={%
		\if@default@value
		\dimen@ii=\rulepixel
		\else\HTMLinfo{height="\@value"}%
		\dimen@ii=\@value\rulepixel
		\fi}
	[hr.width]={%
		\if@default@value
		\else\HTMLinfo{width="\@value"}%
		\HTMLdimen\dimen@i=\@value\imagepixel\dimen@i
		\fi}
	 [hr.align]={%
		\@find@value{
		[left][default]={\vrule height\dimen@ii
			width\dimen@i depth \z@\hss}
		[center]={\hss\vrule height\dimen@ii
			width\dimen@i depth  \z@\hss}
		[right]={\hss\vrule height\dimen@ii
			width\dimen@i depth \z@}}%
		\@apply\relax}
	[hr.noshade]={}% basically there's no shade anyway
%
% font attributes
%
	[font.face]={%
		\@find@values{
		[arial][Arial][helvetica][Helvetica]={%
			\HTMLface\HTMLsserif}
		}\@apply}
	[font.size]={%
		\if@default@value\else
		\HTMLfontsize\@value\ifhmode\strut\fi\fi}
	[font.color]={%
		\if@default@value
		\else\HTMLinfo{color="\@value"}%
		\define@color\current@color\@value\fi}
%
% img attributes
%
	[parinsert.align]={\let\par@align=\@value}
	[parinsert.valign]={\let\par@valign=\@value}
	[parinsert.hspace]={% default value defined in htmlgraf.tex
		\if@default@value\else\par@hspace=\@value\imagepixel\fi}
	[parinsert.vspace]={% default value defined in htmlgraf.tex
		\if@default@value\else\par@vspace=\@value\imagepixel\fi}
	[img.src][img.dynsrc][bgsound.src]={%
		\if@default@value
		\let\@URL\undefined
		\else
		\encode@URL{\@value}%
		\HTMLinfo{src="\@URL"}\fi}
	[img.loop][bgsound.loop]={%
		\if@default@value\def\@loop{1}\else
		\let\@loop=\@value\fi}% 1,2,...,infinite
	[img.alt]={%
		\if@default@value
		\HTMLinfo{alt is undefined}%
		\edef\@content{undefined}%
		\else\edef\@content{\@value}\fi}
	[img.width]={%
		\if@default@value
		\dimen@i=1\imagepixel
		\else\HTMLinfo{width="\@value"}%
		\dimen@i=\@value\imagepixel\fi}
	[img.height]={%
		\if@default@value
		\dimen@ii=1\imagepixel
		\else\HTMLinfo{height="\@value"}%
		\dimen@ii=\@value\imagepixel
		\fi}
%
% color attributes
%
	[color.text]={%
		\if@default@value
		\let\current@color=\default@color
		\else\HTMLinfo{text="\@value"}%
		\define@color\current@color\@value\fi}
	[color.link]={%
		\if@default@value
		\let\link@color=\highlight@color
		\else\HTMLinfo{link="\@value"}%
		\define@color\link@color\@value\fi}
	[color.vlink]={%
		\if@default@value
		\let\vlink@color=\highlight@color
		\else\HTMLinfo{vlink="\@value"}%
		\define@color\vlink@color\@value\fi}
	[color.alink]={%
		\if@default@value
		\let\alink@color=\highlight@color
		\else\HTMLinfo{alink="\@value"}%
		\define@color\alink@color\@value\fi}
	[color.background]={%
		\if@default@value\else
		\HTMLinfo{background="\@value"}\fi}
	[color.bgcolor]={%
		{\if@default@value
		\else\HTMLinfo{bgcolor="\@value"}%
		\define@color\bg@color\@value\fi
		\background@color\bg@color}}
%
% related to forms
%
	[form.action]={}
	[form.enctype]={%
		\@find@value{
		[multipart]={}
		[form-data]={}}%
		\@apply}
	[form.label]={%
		\if@default@value\let\@label=\undefined
		\else\let\@label=\@value\fi}
	[form.method]={%
		\@find@value{
		[get]={}
		[post]={}}%
		\@apply}
	[form.name]={}
	[form.value]={}
	[form.checked]={%
		\@find@value{
		[checked]={}}%
		\@apply}
	[form.size]={%
		\if@default@value
		\dimen@i=\z@\else\setbox0=\hbox{\HTMLmonospace O}%
		\dimen@i=\@value\wd0\fi}
	[form.type]={%
		\@find@value{
		[text]={\hbox to \dimen@i{\strut\dotfill}}
		[radio]=\HTMLradio
		[checkbox]=\HTMLcheckbox
		[image]={\HTMLinfo{type="image" is unsupported
			using type="checkbox" instead}\HTMLcheckbox}
		[submit]={[\expandafter\@find\@lang\in{
			[en][en-US]={Submit Query}
			[de]={Den Fragebogen vorlegen}
			[fr]={Soumettre le questionnaire}}%
			\@apply]}
		[reset][hidden]={}}%
		\@apply}
	[form.maxlength]={}
	[form.multiple]={%
		\@find@value{
		[multiple]={}}\@apply}
	[form.selected]={%
		\@find@value{
		[selected]={}}\@apply}
	[form.cols]={%
		\setbox0=\hbox{\HTMLmonospace O}%
		\if@default@value\dimen@i=10\wd0
		\else\dimen@i=\wd0
		\HTMLdimen\dimen@i=\@value\dimen@i\hsize\fi}
	[form.rows]={%
		\if@default@value\def\@value{1}\fi
		\setbox0=\hbox to \dimen@i{\strut\dotfill}%
		\count@=0\loop\ifnum\count@<\@value
			\copy0\advance\count@ by 1
			\repeat}
	[form.name]={}
	[form.wrap]={%
		\@find@value{
		[off]={}
		[virtual]={}
		[physical]={}}%
		\@apply}
	}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% HTML ENTITIES (special characters)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\catcode`\#=12
\catcode`\*=6
%
% First diacritics are tested, then special entities,
% and at last, entities defined by their decimal code number.
% If all trials fail, then the argument is sent
% unchanged to the output.
%
\def\HTMLentity*1*2;{%
	\@find*2\in\HTMLdiacritics
	\ifx\@result\@default
	\@find*1*2\in\HTMLentities
		\ifx\@result\@default
			\ifx*1#%
			\def\@result{\char*2\relax}%
			\else
			\def\@result{{\HTMLmonospace\&*1*2;}}%
			\fi
		\fi
	\else
		\let\@@result=\@result
		\ifx*1i%
		\def\@result{\@@result\i}%
		\else
		\def\@result{\@@result*1}%
		\fi
	\fi
	\@result}%
%
\def\HTMLdiacritics{
	[acute]=\'
	[grave]=\`
	[circ]=\^
	[uml][die]=\"
	[cedil]=\c
	[macr]=\=
	[tilde]=\~
	}%
%
% Extendable list via <!ENTITY name "replacement text">
% The new entity comes after diacritics but before every
% other entity.
%
\def\HTMLentities{%
%
% extended latin
%
	[AElig]=\AE
	[OElig]=\OE
	[Oslash]=\O
	[aelig]=\ae
	[szlig]=\ss
	[oelig]=\oe
	[oslash]=\o
%	[eth]={\@@math{\partial}}%!!!!!!!!
%	[thorn]={\leavevmode\rlap{l}p}%!!!!!!!!
%
% isolated diacritics
%
	[acute]={\'{}}
	[grave]={\`{}}
	[circ]={\^{}}
	[uml][die]={\"{}}
	[cedil]={\c{}}
	[macr]={\={}}
	[tilde]={\~{}}
%
% extended punctuation
%
	[quot]="
	[nbsp]=\HTMLnbsp
	[thinsp]=\thinspace
	[ensp]=\enspace
	[emsp]=\emspace
	[iexclam]={!`}
	[iquest]={?`}
	[laquo]=\guillemotleft
	[raquo]=\guillemotright
	[lsquo]=`
	[rsquo]='
	[shy]={\-}
	[endash]={--}
	[emdash]={---}
	[hellip]=\dots
	[sect]=\S
	[para]=\P
	[dagger]={\@@math\dagger}
	[Dagger]={\@@math\ddagger}
	[brvbar]={\@@math{|}}
	[amp]=\&
	[cent]={\leavevmode\setbox0=\hbox{c}%
		\hbox to \wd0{\rlap{c}\hss\@@math{|}\hss}}%!!!!!!!!!!
	[curren]={\leavevmode{% Poor but complex Euro symbol
		\setbox0=\hbox{$\vcenter{\null}$}\dimen@=-\ht0
		\setbox0=\hbox{C}\advance\dimen@ by 0.5\ht0
		\rlap{\raise\dimen@\hbox{=}}%
		% taking slant into account
		\dimen@i=1pt\divide\dimen@ by \dimen@i
		\dimen@i=\fontdimen1\the\font
		\multiply\dimen@ by -\dimen@i
		\advance\dimen@ by 0.16em 
		\kern\dimen@ C}}
	[pound]={{\HTMLface\HTMLitalic\$}}
	[yen]={\leavevmode{% Poor but complex Yen symbol
		% notice that ``='' is a bit wider than ``Y''...
		\setbox0=\hbox{$\vcenter{\null}$}\dimen@=-\ht0
		\setbox0=\hbox{Y}\advance\dimen@ by 0.5\ht0
		\dimen@i=\wd0\setbox0=\hbox{=}%
		\advance\dimen@i by -\wd0\divide\dimen@i by -2
		\kern-\dimen@i\rlap{\raise\dimen@\hbox{=}}\kern\dimen@i
		% taking slant into account
		\dimen@i=1pt\divide\dimen@ by \dimen@i
		\dimen@i=\fontdimen1\the\font
		\multiply\dimen@ by -\dimen@i
		\kern\dimen@ Y}}
	[copy]={\copyright}
	[reg]={\@@math{\@supscript{\current@face TM}}}
	[ordm]={\@@math{\@supscript{\underline{\current@face o}}}}
	[ordf]={\@@math{\@supscript{\underline{\current@face a}}}}
%
% math like
%
	[lt]={\expandafter\ifx\current@face\HTMLmonospace
		<\else\@@math\@lt\fi}
	[gt]={\expandafter\ifx\current@face\HTMLmonospace
		>\else\@@math\@gt\fi}
	[le]={\@@math\leq}
	[ge]={\@@math\geq}
	[plusmn]={\@@math\pm}
	[times]={\@@math\times}
	[middot]={\@@math\cdot}
	[divide]={\@@math\div}
	[not]={\@@math\negation}
	[deg]={\@@math{^\circ}}
	[micro]={\@@math\mu}
	[sup1]={\@@math{^1}}
	[sup2]={\@@math{^2}}
	[sup3]={\@@math{^3}}
	[frac14]={\text@frac14}
	[frac12]={\text@frac12}
	[frac34]={\text@frac34}
	[nabla]={\@@math\nabla}
	[part]={\@@math\partial}
%
% greek
%
	[alpha]={\@@math\alpha}
	[beta]={\@@math\beta}
	[gamma]={\@@math\gamma}
	[delta]={\@@math\delta}
	[epsilon]={\@@math\varepsilon}
	[zeta]={\@@math\zeta}
	[eta]={\@@math\eta}
	[theta]={\@@math\theta}
	[iota]={\@@math\iota}
	[kappa]={\@@math\kappa}
	[lambda]={\@@math\lambda}
	[mu]={\@@math\mu}
	[nu]={\@@math\nu}
	[xi]={\@@math\xi}
	[omicron]={\@@math o}
	[pi]={\@@math\pi}
	[rho]={\@@math\varrho}
	[sigma]={\@@math\sigma}
	[tau]={\@@math\tau}
	[upsilon]={\@@math\upsilon}
	[phi]={\@@math\phi}
	[chi]={\@@math\chi}
	[psi]={\@@math\psi}
	[omega]={\@@math\omega}
	[Alpha]={\@@math A}
	[Beta]={\@@math B}
	[Gamma]={\@@math\Gamma}
	[Delta]={\@@math\Delta}
	[Epsilon]={\@@math E}
	[Zeta]={\@@math Z}
	[Eta]={\@@math H}
	[Theta]={\@@math\Theta}
	[Iota]={\@@math I}
	[Kappa]={\@@math K}
	[Lambda]={\@@math\Lambda}
	[Mu]={\@@math M}
	[Nu]={\@@math N}
	[Xi]={\@@math\Xi}
	[Omicron]={\@@math O}
	[Pi]={\@@math\Pi}
	[Rho]={\@@math P}
	[Sigma]={\@@math\Sigma}
	[Tau]={\@@math T}
	[Upsilon]={\@@math\Upsilon}
	[Phi]={\@@math\Phi}
	[Chi]={\@@math X}
	[Psi]={\@@math\Psi}
	[Omega]={\@@math\Omega}
	}%
%
\def\HTMLnbsp*1{\penalty10000
	\ifx*1;\thinspace\else\ifx*1!\thinspace
	\else\ifx*1?\thinspace\else\leavevmode
	\ 
%	\kern\fontdimen2\the\font
	\fi\fi\fi*1}%
\catcode`\*=12
\catcode`\#=6
\def\isolatin{%
	\def\@tmp##1{\ifx##1\undefined\let\@next=\relax
		\else\catcode`##1=\active\fi\@next}%
	\let\@next=\@tmp
	\@tmp�����������������������
	�����������������ܾ����|\undefined}%
\def\noisolatin{%
	\def\@tmp##1{\ifx##1\undefined\let\@next=\relax
		\else\catcode`##1=12\fi\@next}%
	\let\@next=\@tmp
	\@tmp�����������������������
	�����������������ܾ����|\undefined}%
{\isolatin
	\gdef�{``}\gdef�{''}%
	\gdef�{\'a}\gdef�{\`a}\gdef�{\^a}\gdef�{\"a}%
	\gdef�{\c c}%
	\gdef�{\'e}\gdef�{\`e}\gdef�{\^e}\gdef�{\"e}%
	\gdef�{\`\i}\gdef�{\^\i}\gdef�{\"\i}%
	\gdef�{\~n}%
	\gdef�{\'o}\gdef�{\`o}\gdef�{\^o}\gdef�{\"o}%
	\gdef�{\`u}\gdef�{\^u}\gdef�{\"u}%
	\gdef�{\"y}%
	\gdef�{\`A}\gdef�{\^A}\gdef�{\"A}%
	\gdef�{\c C}%
	\gdef�{\'E}\gdef�{\`E}\gdef�{\^E}\gdef�{\"E}%
	\gdef�{\`I}\gdef�{\^I}\gdef�{\"I}%
	\gdef�{\~N}%
	\gdef�{\`O}\gdef�{\^O}\gdef�{\"O}%
	\gdef�{\`U}\gdef�{\^U}\gdef�{\"U}%
	\gdef�{\"Y}\gdef�{\ifmmode^\circ\else$^\circ$\fi}%
	\gdef�{\smash{\hbox to 0.5em{\hss\vrule height\ht\strutbox
	depth\dp\strutbox width 0.4pt\hss}}}%
	\gdef�{\hbox{\dimen@=-0.5ex\advance\dimen@ by 0.4pt
	\vrule width0.5em height0.5ex depth\dimen@}}%
	\gdef�{\smash{\rlap{�}�}}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% THAT'S ALL FOLKS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\catcode`\<=13
\catcode`\&=13
\catcode`\_=13
\catcode`\|=13
\let<=\HTMLelement
\let&=\HTMLentity
\def_{\leavevmode\expandafter\ifx\current@face\HTMLmonospace\char95
	\else\kern.06em \vbox{\hrule width.3em}\fi}%
\def|{\ifx\current@face\HTMLmonospace\char124
	\else\@@math\vert\fi}%
\def\@lbrace{\ifx\current@face\HTMLmonospace\char123
	\else\@@math\lbrace\fi}%
\def\@rbrace{\ifx\current@face\HTMLmonospace\char125
	\else\@@math\rbrace\fi}%
\catcode`\{=13
\catcode`\}=13
\let{=\@lbrace
\let}=\@rbrace
\HTMLindent=\parindent
\let\HTMLmode=!%
\fromHTMLtoTeX
\noHTMLcolors
\noHTMLmultimedia
\catcode`\@=12
\endinput
