File: Include_sections.tex

package info (click to toggle)
ocaml-odoc 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,744 kB
  • sloc: ml: 37,049; makefile: 124; sh: 79
file content (59 lines) | stat: -rw-r--r-- 3,251 bytes parent folder | download
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
\section{Module \ocamlinlinecode{Include\_\allowbreak{}sections}}\label{module-Include+u+sections}%
\label{module-Include+u+sections-module-type-Something}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{Something}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{module-Include+u+sections-module-type-Something-val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
\subsubsection{Something 1\label{something-1}}%
foo

\label{module-Include+u+sections-module-type-Something-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\\
\subsubsection{Something 2\label{something-2}}%
\label{module-Include+u+sections-module-type-Something-val-bar}\ocamlcodefragment{\ocamltag{keyword}{val} bar : unit}\begin{ocamlindent}foo bar\end{ocamlindent}%
\medbreak
\subsubsection{Something 1-bis\label{something-1-bis}}%
Some text.

\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}A module type.\end{ocamlindent}%
\medbreak
Let's include \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{module-Include+u+sections-module-type-Something}]} once

\ocamltag{keyword}{include} \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1+u+2}}%
foo

\subsubsection{Something 2\label{something-2+u+2}}%
\subsection{Something 1-bis\label{something-1-bis+u+2}}%
Some text.

\subsection{Second include\label{second-include}}%
Let's include \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{module-Include+u+sections-module-type-Something}]} a second time: the heading level should be shift here.

\ocamltag{keyword}{include} \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1+u+3}}%
foo

\subsubsection{Something 2\label{something-2+u+3}}%
\subsection{Something 1-bis\label{something-1-bis+u+3}}%
Some text.

\subsubsection{Third include\label{third-include}}%
Shifted some more.

\ocamltag{keyword}{include} \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1+u+4}}%
foo

\subsubsection{Something 2\label{something-2+u+4}}%
\subsection{Something 1-bis\label{something-1-bis+u+4}}%
Some text.

And let's include it again, but without inlining it this time: the ToC shouldn't grow.

\ocamltag{keyword}{include} \hyperref[module-Include+u+sections-module-type-Something]{\ocamlinlinecode{Something}}\label{module-Include+u+sections-val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
\subsection{Something 1\label{something-1+u+5}}%
foo

\label{module-Include+u+sections-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\\
\subsubsection{Something 2\label{something-2+u+5}}%
\label{module-Include+u+sections-val-bar}\ocamlcodefragment{\ocamltag{keyword}{val} bar : unit}\begin{ocamlindent}foo bar\end{ocamlindent}%
\medbreak
\subsection{Something 1-bis\label{something-1-bis+u+5}}%
Some text.