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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
% Section macros with mandatory labels
% Note: hevea and normal latex are forked due to the use of \@ifstar on the latex side
% First, we save the normal macros
\let\@oldsection=\section
\let\@oldsubsection=\subsection
\let\@oldsubsubsection=\subsubsection
% The *-version are distincts macros in hevea
\let\@oldsection*=\section*
\let\@oldsubsection*=\subsection*
\let\@oldsubsubsection*=\subsubsection*
%We go back to standard macros for ocamldoc generated files
\newcommand{\ocamldocinputstart}{%
\let\section=\@oldsection
\let\subsection=\@oldsubsection
\let\subsubsection=\@oldsubsubsection
% The *-version are distincts macros in hevea
\let\section*=\@oldsection*
\let\subsection*=\@oldsubsection*
\let\subsubsection*=\@oldsubsubsection*
}
\renewcommand{\section}[2]{\@oldsection{\label{#1}#2}}
\renewcommand{\section*}[2]{\@oldsection*{\label{#1}#2}}
\renewcommand{\subsection}[2]{\@oldsubsection{\label{#1}#2}}
\renewcommand{\subsection*}[2]{\@oldsubsection*{\label{#1}#2}}
\renewcommand{\subsubsection}[2]{\@oldsubsubsection{\label{#1}#2}}
\renewcommand{\subsubsection*}[2]{\@oldsubsubsection*{\label{#1}#2}}
% For paragraph, we do not make labels compulsory
\newcommand{\lparagraph}[2]{\paragraph{\label{#1}#2}}
% Colors for links
\newstyle{a.section-anchor::after}{
content:"\@print@u{128279}";
font-size:smaller;
margin-left:-1.5em;
padding-right:0.5em;
}
\newstyle{a.section-anchor}{
visibility:hidden;
color:grey !important;
text-decoration:none !important;
}
\newstyle{*:hover>a.section-anchor}{
visibility:visible;
}
\def\visited@color{\#0d46a3}
\def\link@color{\#4286f4}
\newstyle{a:link}{color:\link@color;text-decoration:underline;}
\newstyle{a:visited}{color:\visited@color;text-decoration:underline;}
\newstyle{a:hover}{color:black;text-decoration:underline;}
\newstyle{@media all}{@font-face \{
/* fira-sans-regular - latin */
font-family: 'Fira Sans';
font-style: normal;
font-weight: 400;
src: url('fonts/fira-sans-v8-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Fira Sans Regular'), local('FiraSans-Regular'),
url('fonts/fira-sans-v8-latin-regular.eot?\#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/fira-sans-v8-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/fira-sans-v8-latin-regular.woff') format('woff'), /* Modern Browsers */
url('fonts/fira-sans-v8-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/fira-sans-v8-latin-regular.svg\#FiraSans') format('svg'); /* Legacy iOS */
\}}
% Compact layout
\newstyle{body}{
max-width:750px;
width: 85\%;
margin: auto;
background: \#f7f7f7;
margin-top: 80px;
font-size: 1rem;
}
% selects the index's title
\newstyle{.maintitle}{
font-family: "Fira Sans", sans-serif;
text-align: center;
}
\newstyle{h1, h2, h3}{
font-family: "Fira Sans", sans-serif;
font-weight: normal;
border-bottom: 1px solid black;
}
\newstyle{div.ocaml}{
margin:2ex 0px;
font-size: 1rem;
background: beige;
border: 1px solid grey;
padding: 10px;
overflow-y:auto;
display:flex;
flex-direction: column;
flex-wrap: nowrap;
}
\newstyle{div.ocaml .pre}{
white-space: pre;
font-family: monospace;
}
\newstyle{.ocamlkeyword}{
font-weight:bold;
}
\newstyle{.ocamlhighlight}{
font-weight:bold;
text-decoration:underline;
}
\newstyle{.ocamlerror}{
font-weight:bold;
color:red;
}
\newstyle{.ocamlwarning}{
font-weight:bold;
color:purple;
}
\newstyle{.ocamlcomment}{
color:grey;
}
\newstyle{.ocamlstring}{
opacity:0.75;
}
% Creative commons license logo
\newstyle{\#cc_license_logo}{
float:left;
margin-right: 1em;
}
% More spacing between lines and inside tables
\newstyle{p,ul}{line-height:1.3em}
\newstyle{.cellpadding1 tr td}{padding:1px 4px}
%Styles for caml-example and friends
\newstyle{div.caml-output}{color:maroon;}
% Styles for toplevel mode only
\newstyle{div.caml-example.toplevel div.caml-input}{color:\#006000;}
%%% Code examples
\newcommand{\input@color}{\htmlcolor{006000}}
\newcommand{\output@color}{\maroon}
\newcommand{\machine}{\@span{class=machine}\tt}
\newenvironment{machineenv}{\begin{alltt}}{\end{alltt}}
\newcommand{\var}[1]{\textit{#1}}
%% Caml-example environment
\newcommand{\camlexample}[1]{
\@open{div}{class="caml-example #1"}
}
\newcommand{\endcamlexample}{
\@close{div}
}
\newenvironment{caml}{\@open{div}{class=ocaml}}{\@close{div}}
\newcommand{\ocamlkeyword}{\@span{class="ocamlkeyword"}}
\newcommand{\ocamlhighlight}{\@span{class="ocamlhighlight"}}
\newcommand{\ocamlerror}{\@span{class="ocamlerror"}}
\newcommand{\ocamlwarning}{\@span{class="ocamlwarning"}}
\newcommand{\ocamlcomment}{\@span{class="ocamlcomment"}}
\newcommand{\ocamlstring}{\@span{class="ocamlstring"}}
\newcommand{\?}{\@span{class=ocamlprompt}\#}
\newstyle{.ocamlprompt}{color:black;}
%%% End of code example
\newenvironment{library}{}{}
\newcounter{page}
\newenvironment{comment}{\begin{quote}}{\end{quote}}
\newcommand{\nth}[2]{\({#1}_{#2}\)}
\newenvironment{options}{\begin{description}}{\end{description}}
%%venant de macros.tex
\newcommand{\osvariant}{\@span{class=osvariant}}
\newstyle{.osvariant}{font-family:sans-serif}
\def\versionspecific#1{\begin{quote}{\osvariant{}#1:}\quad}
\def\unix{\versionspecific{Unix}}
\def\endunix{\end{quote}}
\def\windows{\versionspecific{Windows}}
\def\endwindows{\end{quote}}
\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\entree#1#2{#1 & #2 \\}
\def\tableau#1#2#3{%
\par
\@open{div}{class="tableau"}
\begin{center}%
\begin{tabular*}{.8\linewidth}{#1}%
\multicolumn{1}{c}{\textbf{#2}} &
\multicolumn{1}{c}{\textbf{#3}} \\
%%#2 & #3 \\%
}%
\def\endtableau{\end{tabular*}\end{center}\@close{div}\par}
\newstyle{.tableau, .syntax, .syntaxleft}{
/* same width as body */
max-width: 750px;
overflow-y: auto;
}
% L'environnement library (pour composer les descriptions des modules
% de bibliotheque).
\def\restoreindent{\begingroup\let\@listI=\@savedlistI}
\def\endrestoreindent{\endgroup}
% PDF stuff
\def\pdfchapterfold#1#2{}
\def\pdfsection#1{}
\def\pdfchapter{\pdfchapterfold{0}}
%%% Pour camlidl
\def\transl#1{$[\![\mbox{#1}]\!]$}
% Pour l'index
\usepackage{multind}
\let\indexentry=\index
\renewcommand{\index}[1]{\indexentry{\jobname}{#1}}
\def\ikwd#1{\indexentry{\jobname.kwd}{#1}}
% nth
\def\th{^{\mbox{\@span{class=th}th}}}
\newstyle{.th}{font-size:small;}
\renewcommand{\hbox}[1]{\mbox{#1}}
% Notations pour les metavariables
\def\nmth#1#2#3{\({#1}_{#2}^{#3}\)}
\def\optvar#1{[\var{#1}\/]}
\def\event{$\bowtie$}
\def\fromoneto#1#2{$#1 = 1,\ldots{} , #2$}
\newcommand{\vfill}{}
\def\number{}
\def\year{\arabic{year}}
% Pour alltt
\def\rminalltt#1{{\rm #1}}
\def\goodbreak{\ \\}
\def\@savedlistI{}
%List of links with no space around items
\newstyle{.li-links}{margin:0ex 0ex;}
\newenvironment{links}
{\setenvclass{itemize}{ftoc2}\setenvclass{li-itemize}{li-links}\itemize}
{\enditemize}
\newenvironment{maintitle}{\@open{div}{class="maintitle"}}{\@close{div}}
%%% Linking to modules
\newenvironment{linklist}{\begin{links}}{\end{links}}
\ifocamldoc
\newcommand{\moduleref}[3]{\ahref{#1/#2.html}{#3}}
\newcommand{\stdmoduleref}[1]{\moduleref{libref}{#1}{\texttt{#1}}}
\else
\newcommand{\moduleref}[3]{\ahref{#1/#2/index.html}{#3}}
\newcommand{\stdmoduleref}[1]{\moduleref{libref}{Stdlib/#1}{\texttt{#1}}}
\fi
\newcommand{\docitem}[3]{\item \moduleref{#1}{#2}{Module \texttt{#2}}: #3}
\newcommand{\libdocitem}[2]{\docitem{libref}{#1}{#2}}
\newcommand{\compilerdocitem}[2]{\docitem{compilerlibref}{#1}{#2}}
%%% Missing macro
\newcommand{\DeclareUnicodeCharacter}[2]{}
\newcommand{\DisableLigatures}[1]{}
\ifocamldoc
\newcommand{\stddocitem}[2]{\libdocitem{#1}{#2}}
\else
\newcommand{\stddocitem}[2]{\docitem{libref/Stdlib}{#1}{#2}}
\fi
\renewcommand{\tt}{\@span{class=font-tt}}
\newstyle{.font-tt}{font-family:monospace;}
\renewcommand{\it}{\@span{class=font-it}}
\newstyle{.font-it}{font-style:italic;}
\renewcommand{\bf}{\@span{class=font-bold}}
\newstyle{.font-bold}{font-weight:bold;}
\renewcommand{\sl}{\ifmath\ifmathml\@span{class='sl-math'}%
\else\@span{class="font-sl"}\fi\else\@span{class="font-sl"}\fi}
\newstyle{.font-sl}{font-style:oblique;}
|