2002-03-27 08:20:32 -08:00
|
|
|
%% Support macros for LaTeX documentation generated by ocamldoc.
|
|
|
|
%% This file is in the public domain; do what you want with it.
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
\ProvidesPackage{ocamldoc}
|
|
|
|
[2001/12/04 v1.0 ocamldoc support]
|
|
|
|
|
|
|
|
\newenvironment{ocamldoccode}{%
|
|
|
|
\bgroup
|
|
|
|
\leftskip\@totalleftmargin
|
|
|
|
\rightskip\z@skip
|
|
|
|
\parindent\z@
|
|
|
|
\parfillskip\@flushglue
|
|
|
|
\parskip\z@skip
|
|
|
|
\noindent\@@par
|
|
|
|
\@tempswafalse
|
|
|
|
\def\par{%
|
|
|
|
\if@tempswa
|
|
|
|
\leavevmode\null\@@par\penalty\interlinepenalty
|
|
|
|
\else
|
|
|
|
\@tempswatrue
|
|
|
|
\ifhmode\@@par\penalty\interlinepenalty\fi
|
|
|
|
\fi}
|
|
|
|
\obeylines
|
|
|
|
\verbatim@font
|
|
|
|
\let\org@prime~%
|
|
|
|
\@noligs
|
|
|
|
\let\org@dospecials\dospecials
|
|
|
|
\g@remfrom@specials{\\}
|
|
|
|
\g@remfrom@specials{\{}
|
|
|
|
\g@remfrom@specials{\}}
|
|
|
|
\let\do\@makeother
|
|
|
|
\dospecials
|
|
|
|
\let\dospecials\org@dospecials
|
|
|
|
\frenchspacing\@vobeyspaces
|
|
|
|
\everypar \expandafter{\the\everypar \unpenalty}}
|
|
|
|
{\egroup\par}
|
|
|
|
|
|
|
|
\def\g@remfrom@specials#1{%
|
|
|
|
\def\@new@specials{}
|
|
|
|
\def\@remove##1{%
|
|
|
|
\ifx##1#1\else
|
|
|
|
\g@addto@macro\@new@specials{\do ##1}\fi}
|
|
|
|
\let\do\@remove\dospecials
|
|
|
|
\let\dospecials\@new@specials
|
|
|
|
}
|
|
|
|
|
2002-08-08 06:10:07 -07:00
|
|
|
\newenvironment {ocamldoclist}[1]
|
|
|
|
{\list{}{#1}\global \advance \@listdepth -\m@ne\raggedright\item[]\relax}
|
|
|
|
{\global \advance \@listdepth -\@ne
|
|
|
|
\ifvmode \edef \@tmp {\the\everypar}\ifx \@tmp \@empty
|
|
|
|
\else \leavevmode \global \@newlistfalse \fi \fi
|
|
|
|
\endlist}
|
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
\newenvironment{ocamldocdescription}
|
2002-08-08 06:10:07 -07:00
|
|
|
{\ocamldoclist{\parsep 0pt\rightmargin 0pt \topsep 0\topsep}}
|
|
|
|
{\medskip \endocamldoclist}
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
\newenvironment{ocamldoccomment}
|
2002-08-08 06:10:07 -07:00
|
|
|
{\ocamldoclist{\parsep 0pt\rightmargin 0pt \topsep 0\topsep}}
|
|
|
|
{\medskip \endocamldoclist}
|
2002-03-27 08:20:32 -08:00
|
|
|
\endinput
|
|
|
|
|