% -*- tex -*-
%
% This file contains macros which are used when translating
% to HTML using Hevea. By Luc Maranget and Eric Marsden.

\newif\ifhmode\hmodefalse
\newcommand{\pdfinfo}[1]{\@print{<!--} #1 \@print{-->}}
\let\hbox\mbox
\def\hfil{}
\def\hfill{}
\newcommand{\parbox}[3][]{\mbox{#3}}
\newcommand{\lengthtest}[1]{true}
\newenvironment{minipage}[2][]{}{}
\newcommand{\layout}[5][]
  {\@open{DIV}{align=left}#5%
   [#4] \\
   \begin{tabbing}
   \fcnname{#1}\fcnname{#2} #3 \@print{&nbsp;&nbsp;&nbsp;}
   \end{tabbing}
   \@close{DIV}}
\newcommand{\keys}[1]{\code{\&key}\@print{&nbsp;}\= #1}

\renewcommand{\textgreater}{\@print{&gt;}}
\renewcommand{\textless}{\@print{&lt;}}

% \newcommand{\layout}[4][]
%   {\begin{tabular}
%    {llp{10cm}@{\hspace{10cm}}r}\fcnname{#1} &
%    \fcnname{#2} &
%    \begin{flushleft}#3\end{flushleft} &
%    [#4]
%    \end{tabular}}


\newcommand{\fcntype}[1]{\@styleattr{TT}{class=function-type}#1\@clearstyle}
\newcommand{\argtype}[1]{\@styleattr{TT}{class=argument-type}#1\@clearstyle}
\newcommand{\fcnname}[1]{\@styleattr{TT}{class=function-name}#1\@clearstyle}
\newcommand{\var}[1]{\@styleattr{TT}{class=variable}#1\@clearstyle}
\newcommand{\code}[1]{\@styleattr{TT}{class=code}#1\@clearstyle}
\newcommand{\file}[1]{\@styleattr{TT}{class=filename}#1\@clearstyle}

%% Define a new type
%%
%% \begin{deftp}{typeclass}{typename}{args}
%%    some description
%% \end{deftp}
\newenvironment{deftp}[3]
  {\layout{#2}{\var{#3}}{#1}%
   {\bigskip\index[types]{#2|textbf}}
   \begin{quote}}
  {\end{quote}}

%% Define a function
%%
%% \begin{defun}[suffix]{pkg}{name}{params}
%%   \defunx[pkg]{name}{params}
%%   description of function
%% \end{defun}
\newenvironment{defun}[4][]
  {\layout[#2]{#3}{#4}{Function}%
  {\defunvspace\fnindexbold{#3}\label{FN:#3#1}}
  \begin{quote}}
  {\end{quote}}
\newcommand{\defunx}[3][\mbox{}]{%
  \layout[#1]{#2}{#3}{Function}%
  {\fnindexbold{#2}\label{FN:#2}}}

%% Define a macro
%%
%% \begin{defmac}[suffix]{pkg}{name}{params}
%%   \defmacx[pkg]{name}{params}
%%   description of macro
%% \end{defmac}
\newenvironment{defmac}[4][]{%
  \layout[#2]{#3}{#4}{Macro}%
  {\defunvspace\fnindexbold{#3}\label{FN:#3#1}}
  \begin{quote}}
  {\end{quote}}
\newcommand{\defmacx}[3][\mbox{}]{%
  \layout[#1]{#2}{#3}{Function}%
  {\fnindexbold{#2}\label{FN:#2}}}

%% Define a variable
%%
%% \begin{defvar}{pkg}{name}
%%   \defvarx[pkg]{name}
%%   description of defvar
%% \end{defvar}
\newenvironment{defvar}[2]{%
  \layout[#1]{*#2*}{}{Variable}%
  {\defunvspace\vrindexbold{#2}\label{VR:#2}}
  \begin{quote}}
  {\end{quote}}
\newcommand{\defvarx}[2][\mbox{}]{%
  \layout[#1]{*#2*}{}{Variable}%
  {\vrindexbold{#2}\label{VR:#2}}}

%% Define a constant
%%
%% \begin{defconst}{pkg}{name}
%%   \defconstx[pkg]{name}
%%   description of defconst
%% \end{defconst}
\newenvironment{defconst}[2]{%
  \layout[#1]{#2}{}{Constant}%
  {\defunvspace}
  \begin{quote}}
  {\end{quote}}
\newcommand{\defconstx}[2][\mbox{}]{%
  \layout[#1]{#2}{}{Constant}{}}



% \@hr[NOSHADE]{.8\linewidth}{}
\newenvironment{example}
  {\@open{BLOCKQUOTE}{class=example}\begin{alltt}}
  {\end{alltt}\@close{BLOCKQUOTE}}
\newenvironment{lisp}
  {\@open{BLOCKQUOTE}{CLASS=lisp}\begin{alltt}}
  {\end{alltt}\@close{BLOCKQUOTE}}
\newcommand{\cmucl}{{\scshape cmucl}}


% there are no page numbers in HTML, so we need to override certain
% cross-referencing macros
\newcommand{\pxlref}[1]{see section~\ref{#1}}
\newcommand{\xlref}[1]{See section~\ref{#1}}
\newcommand{\funref}[1]{\findexed{#1}}
\newcommand{\specref}[1]{\findexed{#1}}
\newcommand{\macref}[1]{\findexed{#1}}
\newcommand{\varref}[1]{\vindexed{#1}}
\newcommand{\conref}[1]{\conindexed{#1}}
\newcommand{\ctrl}[1]{\code{Ctrl-#1}}
\newcommand{\result}{==>}
\newcommand{\myequiv}{<==>}
\newcommand{\mopt}[1]{\code{\{#1\}}}
\newcommand{\mstar}[1]{\code{\{#1\}}$^*$}
\newcommand{\mplus}[1]{\code{\{#1\}}$^+$}
\newcommand{\mgroup}[1]{\code{\{#1\}}}


% disable ``this document generated by'' footer
\def\@footer{}

% \htmlhead{\@print{
% <a href="../../">CMUCL</a> -&gt
% <a href="../">Documentation</a> <br>}
% \@hr[NOSHADE]{.8\linewidth}{}\@print{<br>}}
% \htmlfoot{\@hr[NOSHADE]{.99\linewidth}{}
% \copyright{} 1995-2003 CMUCL Project}


\let\orig@meta=\@meta
\renewcommand{\@meta}{%
\orig@meta
\begin{rawhtml}
<link rel="stylesheet" href="cmucl.css" type="text/css">
<meta http-equiv="Content-Language" content="en">
\end{rawhtml}}


% when generating HTML, produce file names based on the chapter name
% instead of machine-generated numbers
\let\orig@input\input
\renewcommand{\input}[1]{\orig@input{#1}\cutname{#1.html}}
\htmlprefix{CMUCL User's Manual: }


% generate HTML with section headers on a blue background

\setcounter{cuttingdepth}{10}

\input{report.hva}
%%\input{fancysection.hva}
\usepackage{color}
\definecolor{chapter}{rgb}{1, 1, 0.74}
\definecolor{part}{rgb}{1, 1, 0.81}
\definecolor{section}{rgb}{1, 1, 0.83}
\definecolor{subsection}{rgb}{1, 1, 0.89}
\definecolor{subsubsection}{rgb}{1, 1, 0.93}
\newstyle{.chapter}{padding:0.5ex;background-color:\@getstylecolor{chapter}}
\newstyle{.section} {padding:.5ex;background-color:\@getstylecolor{section}}%
\newstyle{.subsection} {padding:0.3ex;background-color:\@getstylecolor{subsection}}%
\newstyle{.subsubsection} {padding:0.5ex;background-color:\@getstylecolor{subsubsection}}%
\newstyle{.paragraph} {padding:0.5ex;background-color:\@getstylecolor{paragraph}}%
\renewcommand{\@bodyargs}{}


% EOF
