\makeatletter % Pour hevea \newif\ifouthtml\outhtmlfalse \newcommand{\cutname}[1]{} % Notations pour les metavariables \def\var#1{{\it#1}} \def\nth#1#2{${\it#1}_{#2}$} \def\nmth#1#2#3{${\it#1}_{#2}^{#3}$} \def\optvar#1{\textrm{[}\var{#1}\/\textrm{]}} \def\event{$\bowtie$} \def\fromoneto#1#2{$#1 = 1, \ldots, #2$} % Redefining sections macros to make label mandatory \let\@oldsection=\section \let\@oldsubsection=\subsection \let\@oldsubsubsection=\subsection \newcommand{\ocamldocinputstart}{ \let\section=\@oldsection \let\subsection=\@oldsubsection \let\subsubsection=\@oldsubsubsection } \renewcommand{\section}{\@ifstar{\@lsectionstar}{\@lsection}} \renewcommand{\subsection}{\@ifstar{\@lsubsectionstar}{\@lsubsection}} \renewcommand{\subsubsection}{\@ifstar{\@lsubsubsectionstar}{\@lsubsubsection}} \newcommand{\@lsection}[2]{\@oldsection{\label{#1}#2}} \newcommand{\@lsectionstar}[2]{\@oldsection*{\label{#1}#2}} \newcommand{\@lsubsection}[2]{\@oldsubsection{\label{#1}#2}} \newcommand{\@lsubsectionstar}[2]{\@oldsubsection*{\label{#1}#2}} \newcommand{\@lsubsubsection}[2]{\@oldsubsubsection{\label{#1}#2}} \newcommand{\@lsubsubsectionstar}[2]{\@oldsubsubsection*{\label{#1}#2}} \newcommand{\lparagraph}[2]{\paragraph{\label{#1}#2}} % Numerotation \setcounter{secnumdepth}{2} % Pour numeroter les \subsection \setcounter{tocdepth}{1} % Pour ne pas mettre les \subsection % dans la table des matieres \def\ttstretch{\tt\spaceskip=5.77pt plus 1.83pt minus 1.22pt} % La fonte cmr10 a normalement des espaces de 5.25pt non extensibles. % En 11 pt ca fait 5.77 pt. On lui ajoute la meme flexibilite que % cmr10 agrandie a 11 pt. % Pour la traduction "xxxx" -> {\machine{xxxx}} faite par texquote2 \def\machine#1{\mbox{\ttstretch{#1}}} % Pour la traduction "\begin{verbatim}...\end{verbatim}" % -> "\begin{machineenv}...\end{machineenv}" % faite aussi par texquote2. \newenvironment{machineenv}{\alltt}{\endalltt} % Environnements \newlength{\versionwidth} \setbox0=\hbox{\bf Windows:} \setlength{\versionwidth}{\wd0} \def\versionspecific#1{ \begin{description}\item[#1:]~\\} \def\unix{\versionspecific{Unix}} \def\endunix{\end{description}} \def\windows{\versionspecific{Windows}} \def\endwindows{\end{description}} \def\requirements{\trivlist \item[\hskip\labelsep {\bf Requirements.}]} \def\endrequirements{\endtrivlist} \def\installation{\trivlist \item[\hskip\labelsep {\bf Installation.}]} \def\endinstallation{\endtrivlist} \def\troubleshooting{\trivlist \item[\hskip\labelsep {\bf Troubleshooting.}]} \def\endtroubleshooting{\endtrivlist} \newtheorem{gcrule}{Rule} % Pour les tables de priorites et autres tableaux a deux colonnes, encadres \def\tableau#1#2#3{% \begin{center} \begin{tabular}{#1} \hline #2 & #3 \\ \hline } \def\endtableau{\hline\end{tabular}\end{center}} \def\entree#1#2{#1 & #2 \\} % L'environnement option \def\optionitem[#1]{\if@noparitem \@donoparitem \else \if@inlabel \indent \par \fi \ifhmode \unskip\unskip \par \fi \if@newlist \if@nobreak \@nbitem \else \addpenalty\@beginparpenalty \addvspace\@topsep \addvspace{-\parskip}\fi \else \addpenalty\@itempenalty \addvspace\itemsep \fi \global\@inlabeltrue \fi \everypar{\global\@minipagefalse\global\@newlistfalse \if@inlabel\global\@inlabelfalse \hskip -\parindent \box\@labels \penalty\z@ \fi \everypar{}}\global\@nobreakfalse \if@noitemarg \@noitemargfalse \if@nmbrlist \refstepcounter{\@listctr}\fi \fi \setbox\@tempboxa\hbox{\makelabel{#1}}% \global\setbox\@labels \ifdim \wd\@tempboxa >\labelwidth \hbox{\unhbox\@labels \hskip -\leftmargin \box\@tempboxa}\hfil\break \else \hbox{\unhbox\@labels \hskip -\leftmargin \hbox to\leftmargin {\makelabel{#1}\hfil}} \fi \ignorespaces} \def\optionlabel#1{\bf #1} \def\options{\list{}{\let\makelabel\optionlabel\let\@item\optionitem}} \def\endoptions{\endlist} % L'environnement library (pour composer les descriptions des modules % de bibliotheque). \def\comment{\penalty200\list{}{}\item[]} \def\endcomment{\endlist\penalty-100} \def\library{ \begingroup \raggedright \let\@savedlistI=\@listI% \def\@listI{\leftmargin\leftmargini\parsep 0pt plus 1pt\topsep 0pt plus 2pt}% \itemsep 0pt \topsep 0pt plus 2pt \partopsep 0pt } \def\endlibrary{ \endgroup } \def\restoreindent{\begingroup\let\@listI=\@savedlistI} \def\endrestoreindent{\endgroup} % ^^A...^^A: compose l'interieur en \tt, comme \verb \catcode`\^^A=\active \def{% \begingroup\catcode``=13\@noligs\ttstretch\let\do\@makeother\dospecials% \def\@xobeysp{\leavevmode\penalty100\ }% \@vobeyspaces\frenchspacing\catcode`\^^A=\active\def{\endgroup}} % Pour l'index \let\indexentry=\index \def\index{\indexentry{\jobname}} \def\ikwd{\indexentry{\jobname.kwd}} % Les en-tetes personnalises \pagestyle{myheadings} \def\partmark#1{\markboth{Part \thepart. \ #1}{}} \def\chaptermark#1{\markright{Chapter \thechapter. \ #1}} % nth \def\th{^{\hbox{\scriptsize th}}} % Pour annuler l'espacement vertical qui suit un "verbatim" \def\cancelverbatim{\vspace{-\topsep}\vspace{-\parskip}}% exact. % Pour annuler l'espacement vertical entre deux \item consecutifs dans \options \def\cancelitemspace{\vspace{-8mm}}% determine empiriquement % Pour faire la cesure apres _ dans les identificateurs \def\={\discretionary{}{}{}} \def\cuthere{\discretionary{}{}{}} % Pour la coupure en petits documents \let\mysection=\section %%% Augmenter l'espace entre numero de section % et nom de section dans la table des matieres. \def\l@section{\@dottedtocline{1}{1.5em}{2.8em}} % D'origine: 2.3 % Pour alltt \def\rminalltt#1{{\rm #1}} % redefinition de l'environnement alltt pour que les {} \ et % soient % dans la bonne fonte \let\@oldalltt=\alltt \let\@oldendalltt=\endalltt \renewenvironment{alltt}{% \begingroup% \renewcommand{\{}{\char`\{}% \renewcommand{\}}{\char`\}}% \renewcommand{\\}{\char`\\}% \renewcommand{\%}{\char`\%}% \@oldalltt% }{% \@oldendalltt% \endgroup% } % Index stuff -- cf multind.sty \def\printindex#1#2{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35pt \newpage \phantomsection \twocolumn[{\Large\bf #2 \vskip4ex}] \markright{\uppercase{#2}} \addcontentsline{toc}{chapter}{#2} \@input{#1.ind}} %%% Linking to modules \newcommand{\stdmoduleref}[1]{\hyperref[#1]{\texttt{#1}}[\ref{#1}]} \newenvironment{linklist}{\begingroup\ocamldocinputstart}{\endgroup} \newcommand{\stddocitem}[2]{\input{#1.tex}} \newcommand{\compilerdocitem}[2]{\input{#1.tex}} \newenvironment{maintitle}{\begin{center}}{\end{center}} % Caml-example related command \newenvironment{camlexample}[1]{}{} \newenvironment{caml}{}{} \newcommand{\ocamlkeyword}{\bfseries} \newcommand{\ocamlhighlight}{\bfseries\uline} \newcommand{\ocamlerror}{\bfseries} \newcommand{\ocamlwarning}{\bfseries} \definecolor{gray}{gray}{0.5} \newcommand{\ocamlcomment}{\color{gray}\normalfont\small} \newcommand{\ocamlstring}{\color{gray}\bfseries} \makeatother