summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_latex_style.ml
blob: e3453e2e3971d667442e93f9b43e4f577682d8cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
(**************************************************************************)
(*                                                                        *)
(*                                 OCaml                                  *)
(*                                                                        *)
(*             Maxence Guesdon, projet Cristal, INRIA Rocquencourt        *)
(*                                                                        *)
(*   Copyright 2001 Institut National de Recherche en Informatique et     *)
(*     en Automatique.                                                    *)
(*                                                                        *)
(*   All rights reserved.  This file is distributed under the terms of    *)
(*   the GNU Lesser General Public License version 2.1, with the          *)
(*   special exception on linking described in the file LICENSE.          *)
(*                                                                        *)
(**************************************************************************)

(** The content of the LaTeX style to generate when generating LaTeX code. *)

let content ="\
\n%% Support macros for LaTeX documentation generated by ocamldoc.\
\n%% This file is in the public domain; do what you want with it.\
\n\
\n\\NeedsTeXFormat{LaTeX2e}\
\n\\ProvidesPackage{ocamldoc}\
\n              [2001/12/04 v1.0 ocamldoc support]\
\n\
\n\\newenvironment{ocamldoccode}{%\
\n  \\bgroup\
\n  \\leftskip\\@totalleftmargin\
\n  \\rightskip\\z@skip\
\n  \\parindent\\z@\
\n  \\parfillskip\\@flushglue\
\n  \\parskip\\z@skip\
\n  %\\noindent\
\n  \\@@par\\smallskip\
\n  \\@tempswafalse\
\n  \\def\\par{%\
\n    \\if@tempswa\
\n      \\leavevmode\\null\\@@par\\penalty\\interlinepenalty\
\n  \\else\
\n    \\@tempswatrue\
\n    \\ifhmode\\@@par\\penalty\\interlinepenalty\\fi\
\n  \\fi}\
\n  \\obeylines\
\n  \\verbatim@font\
\n  \\let\\org@prime~%\
\n  \\@noligs\
\n  \\let\\org@dospecials\\dospecials\
\n  \\g@remfrom@specials{\\\\}\
\n  \\g@remfrom@specials{\\{}\
\n  \\g@remfrom@specials{\\}}\
\n  \\let\\do\\@makeother\
\n  \\dospecials\
\n  \\let\\dospecials\\org@dospecials\
\n  \\frenchspacing\\@vobeyspaces\
\n  \\everypar \\expandafter{\\the\\everypar \\unpenalty}}\
\n{\\egroup\\par}\
\n\
\n\\def\\g@remfrom@specials#1{%\
\n  \\def\\@new@specials{}\
\n  \\def\\@remove##1{%\
\n    \\ifx##1#1\\else\
\n    \\g@addto@macro\\@new@specials{\\do ##1}\\fi}\
\n  \\let\\do\\@remove\\dospecials\
\n  \\let\\dospecials\\@new@specials\
\n  }\
\n\
\n\\newenvironment{ocamldocdescription}\
\n{\\list{}{\\rightmargin0pt \\topsep0pt}\\raggedright\\item\\noindent\\relax\\ignorespaces}\
\n{\\endlist\\medskip}\
\n\
\n\\newenvironment{ocamldoccomment}\
\n{\\list{}{\\leftmargin 2\\leftmargini \\rightmargin0pt \\topsep0pt}\\raggedright\\item\\noindent\\relax}\
\n{\\endlist}\
\n\
\n\\let \\ocamldocparagraph \\paragraph\
\n\\def \\paragraph #1{\\ocamldocparagraph {#1}\\noindent}\
\n\\let \\ocamldocsubparagraph \\subparagraph\
\n\\def \\subparagraph #1{\\ocamldocsubparagraph {#1}\\noindent}\
\n\
\n\\let\\ocamldocvspace\\vspace\
\n\
\n\\newenvironment{ocamldocindent}{\\list{}{}\\item\\relax}{\\endlist}\
\n\\newenvironment{ocamldocsigend}\
\n     {\\noindent\\quad\\texttt{sig}\\ocamldocindent}\
\n     {\\endocamldocindent\\vskip -\\lastskip\
\n      \\noindent\\quad\\texttt{end}\\medskip}\
\n\\newenvironment{ocamldocobjectend}\
\n     {\\noindent\\quad\\texttt{object}\\ocamldocindent}\
\n     {\\endocamldocindent\\vskip -\\lastskip\
\n      \\noindent\\quad\\texttt{end}\\medskip}\
\n\
\n\\endinput\
\n"