Add copyright notices and new function String.chomp
[ocaml.git] / ocamldoc / odoc_latex_style.ml
blob5c0ed9bbee8d101d835366254eab39d218c8cd42
1 (***********************************************************************)
2 (* OCamldoc *)
3 (* *)
4 (* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
5 (* *)
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. *)
9 (* *)
10 (***********************************************************************)
12 (** The content of the LaTeX style to generate when generating LaTeX code. *)
14 (* $Id$ *)
16 let content ="
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}{%
25 \\bgroup
26 \\leftskip\\@totalleftmargin
27 \\rightskip\\z@skip
28 \\parindent\\z@
29 \\parfillskip\\@flushglue
30 \\parskip\\z@skip
31 %\\noindent
32 \\@@par\\smallskip
33 \\@tempswafalse
34 \\def\\par{%
35 \\if@tempswa
36 \\leavevmode\\null\\@@par\\penalty\\interlinepenalty
37 \\else
38 \\@tempswatrue
39 \\ifhmode\\@@par\\penalty\\interlinepenalty\\fi
40 \\fi}
41 \\obeylines
42 \\verbatim@font
43 \\let\\org@prime~%
44 \\@noligs
45 \\let\\org@dospecials\\dospecials
46 \\g@remfrom@specials{\\\\}
47 \\g@remfrom@specials{\\{}
48 \\g@remfrom@specials{\\}}
49 \\let\\do\\@makeother
50 \\dospecials
51 \\let\\dospecials\\org@dospecials
52 \\frenchspacing\\@vobeyspaces
53 \\everypar \\expandafter{\\the\\everypar \\unpenalty}}
54 {\\egroup\\par}
56 \\def\\g@remfrom@specials#1{%
57 \\def\\@new@specials{}
58 \\def\\@remove##1{%
59 \\ifx##1#1\\else
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}
67 {\\endlist\\medskip}
69 \\newenvironment{ocamldoccomment}
70 {\\list{}{\\leftmargin 2\\leftmargini \\rightmargin0pt \\topsep0pt}\\raggedright\\item\\noindent\\relax}
71 {\\endlist}
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}
90 \\endinput