\Preamble{xhtml}

% Don't indent paragraphs in HTML
\Configure{HtmlPar}{
  \HCode{<p class="noindent">}
}{
  \HCode{<p class="noindent">}
}{}{}

% No pictures for math
%
\Configure{[]}{$$}{$$}
\Configure{$$}{\begin{quote}\(}{\)\end{quote}}{}
\Configure{()}{$}{$}

% Formatting details of signatures descriptions
%
\ConfigureList{codedesc}{%
  \HCode{<dl>}
}{%
  \HCode{</dl>}
}{%
  \HCode{<dt class="codedesc">}
}{%
  \HCode{<dd class="codedesc">}
}

%\ConfigureEnv{grammar}{\HCode{<div class="quote">}}{\HCode{</div>}}{}{}

% The original definition of \gnterm is too hard for tex4ht to follow; hence, 
% it misses the subscripting.
%
\renewcommand{\gnterm}[2][!*NEVER USED ARGUMENT*!]{%
  \bgroup
  \gntermfont#2%
  \ifthenelse{\equal{#1}{!*NEVER USED ARGUMENT*!}}\relax{%
    \HCode{<sub class="gnterm">}\({#1}\)\HCode{</sub>}%
    }%
  \egroup
  }

\begin{document}

% Style sheet additions
%
\Css{
  % We like a smaller sans font.
  body { 
    font-family: Bitstream Vera Sans, Arial, Helvetica, sans-serif;
    font-size  : 14px; 
  }
  %
  % Environment for library signature descriptions.
  % - Signatures in dark red
  dt.codedesc {
    color: darkred;
  }
  % - Avoid too much space between items.
  dd.codedesc {
    padding-bottom: .2em;
  }
  % - Verbatim displays in item descriptions should not have too wide margins.
  dd.codedesc table {
    margin-bottom: -.8em;
  }
  % - Paragraph start margin should be smaller in items.
  % - Shrink paragraph end margins to avoid gap to next item.
  dd.codedesc p {
    margin-top: .5em;
    margin-bottom: 0;
  }
  % Otherwise, the font size get's reduced twice.
  sub { 
    font-size: 100\%; 
  }
  % Here we need to reduce, as tex4ht doesn't grok the subscript.
  sub.gnterm { 
    font-size: 70\%;
  }
  % We don't want tabular's centered;
  table.tabular {
    margin-left: 1em; 
  }
}

\EndPreamble
