1 (***********************************************************************)
4 (* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
6 (* Copyright 2001 Institut National de Recherche en Informatique et *)
7 (* en Automatique. All rights reserved. This file is distributed *)
8 (* under the terms of the Q Public License version 1.0. *)
10 (***********************************************************************)
12 (** The content of the LaTeX style to generate when generating LaTeX code. *)
17 %% Support macros for LaTeX documentation generated by ocamldoc.
18 %% This file is in the public domain; do what you want with it.
20 \\NeedsTeXFormat{LaTeX2e}
21 \\ProvidesPackage{ocamldoc}
22 [2001/12/04 v1.0 ocamldoc support]
24 \\newenvironment{ocamldoccode}{%
26 \\leftskip\\@totalleftmargin
29 \\parfillskip\\@flushglue
36 \\leavevmode\\null\\@@par\\penalty\\interlinepenalty
39 \\ifhmode\\@@par\\penalty\\interlinepenalty\\fi
45 \\let\\org@dospecials\\dospecials
46 \\g@remfrom@specials{\\\\}
47 \\g@remfrom@specials{\\{}
48 \\g@remfrom@specials{\\}}
51 \\let\\dospecials\\org@dospecials
52 \\frenchspacing\\@vobeyspaces
53 \\everypar \\expandafter{\\the\\everypar \\unpenalty}}
56 \\def\\g@remfrom@specials#1{%
57 \\def\\@new@specials{}
60 \\g@addto@macro\\@new@specials{\\do ##1}\\fi}
61 \\let\\do\\@remove\\dospecials
62 \\let\\dospecials\\@new@specials
65 \\newenvironment{ocamldocdescription}
66 {\\list{}{\\rightmargin0pt \\topsep0pt}\\raggedright\\item\\noindent\\relax\\ignorespaces}
69 \\newenvironment{ocamldoccomment}
70 {\\list{}{\\leftmargin 2\\leftmargini \\rightmargin0pt \\topsep0pt}\\raggedright\\item\\noindent\\relax}
73 \\let \\ocamldocparagraph \\paragraph
74 \\def \\paragraph #1{\\ocamldocparagraph {#1}\\noindent}
75 \\let \\ocamldocsubparagraph \\subparagraph
76 \\def \\subparagraph #1{\\ocamldocsubparagraph {#1}\\noindent}
78 \\let\\ocamldocvspace\\vspace
80 \\newenvironment{ocamldocindent}{\\list{}{}\\item\\relax}{\\endlist}
81 \\newenvironment{ocamldocsigend}
82 {\\noindent\\quad\\texttt{sig}\\ocamldocindent}
83 {\\endocamldocindent\\vskip -\\lastskip
84 \\noindent\\quad\\texttt{end}\\medskip}
85 \\newenvironment{ocamldocobjectend}
86 {\\noindent\\quad\\texttt{object}\\ocamldocindent}
87 {\\endocamldocindent\\vskip -\\lastskip
88 \\noindent\\quad\\texttt{end}\\medskip}