@@ -3,12 +3,14 @@ We need to odoc-compile the package mld file, listing its children
3
3
$ odoc compile index . mld -- parent-id pkg1/ doc/ -- output-dir _odoc
4
4
5
5
$ odoc compile-asset -- parent-id pkg1/ doc/ -- output-dir _odoc -- name caml. gif
6
+ $ odoc compile-asset -- parent-id pkg1/ doc/ -- output-dir _odoc -- name Cri_du_chameau. ogg
7
+ $ odoc compile-asset -- parent-id pkg1/ doc/ -- output-dir _odoc -- name flower. webm
6
8
7
9
This will have produced a file called ' page-index.odoc' .
8
10
9
11
Link (and generate the HTML):
10
12
$ odoc link -P pkg1: _odoc/ pkg1/ doc _odoc/ pkg1/ doc/ page-index. odoc
11
- File " index.mld" , line 33 , characters 48 -64:
13
+ File " index.mld" , line 41 , characters 48 -64:
12
14
Warning: Failed to resolve reference ./ module-x Path ' module-x' not found
13
15
File " index.mld" , line 12 , characters 28 -83:
14
16
Warning: Failed to resolve reference ./ camezfzeffl. gif Path ' camezfzeffl.gif' not found
@@ -23,43 +25,49 @@ To test visually, indent:
23
25
24
26
Testing the working references:
25
27
26
- $ cat html/ index / index . html | grep img
27
- cat : html/ index / index . html: No such file or directory
28
- [1 ]
28
+ $ cat html/ pkg1/ doc/ index . html | grep img
29
+ <a href="caml.gif" class="img-link" >
30
+ <img src="caml.gif" alt="caml.gif"/ >
31
+ <a href="caml.gif" class="img-link" >
32
+ <img src="caml.gif" alt="With alt text and emphasis"/ >
33
+ <a href="https://picsum.photos/200/300" class="img-link" >
34
+ <img src="https://picsum.photos/200/300" alt="reference"/ >
35
+ <a href="https://picsum.photos/200/300" class="img-link" >
36
+ < img src= " https://picsum.photos/200/300"
29
37
30
- $ cat html/ index / index . html | grep video
31
- cat : html/ index / index . html: No such file or directory
32
- [1 ]
38
+ $ cat html/ pkg1/ doc/ index . html | grep video
39
+ <li ><a href="#video" >Video</a >
40
+ </div ><h2 id="video" ><a href="#video" class="anchor" ></a >Video</h2 >
41
+ </h3 ><div ><video src="flower.webm" controls="controls" ></video ></div >
42
+ < video
43
+ src= " https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
44
+ </video >
33
45
34
- $ cat html/ index / index . html | grep audio
35
- cat : html/ index / index . html: No such file or directory
36
- [1 ]
46
+ $ cat html/ pkg1/ doc/ index . html | grep audio
47
+ <li ><a href="#audio" >Audio</a >
48
+ </ul ><h2 id="audio" ><a href="#audio" class="anchor" ></a >Audio</h2 >
49
+ <div ><audio src="Cri_du_chameau.ogg" controls="controls" ></audio ></div >
50
+ < audio
51
+ </audio >
37
52
38
53
Testing the unresolved references:
39
54
40
- $ cat html/ index / index . html | grep xref-unresolved
41
- cat : html/ index / index . html: No such file or directory
42
- [1 ]
55
+ $ cat html/ pkg1/ doc/ index . html | grep xref-unresolved
56
+ <div ><span class="xref-unresolved" ><code >./ caqzdqzdml. gif</code ></span >
57
+ <span class="xref-unresolved" >With alt text and <b >emphasis</b ></span >
58
+ <div ><span class="xref-unresolved" ><code >./ module-x </code ></span ></div >
43
59
44
60
Testing latex and manpages
45
61
46
- $ odoc latex-generate -o latex page-index. odocl
47
- odoc: FILE. odocl argument: no ' page-index.odocl' file or directory
48
- Usage: odoc latex-generate [OPTION]… FILE. odocl
49
- Try ' odoc latex-generate --help' or ' odoc --help' for more information.
50
- [2 ]
51
- $ cat latex/ index . tex | grep ocamlinlinecode
52
- cat : latex/ index . tex: No such file or directory
53
- [1 ]
62
+ $ odoc latex-generate -o latex _odoc/ pkg1/ doc/ page-index. odocl
63
+ $ cat latex/ pkg1/ doc/ index . tex | grep gif
64
+ \ocamlinlinecode{caml. \allowbreak{}gif}
65
+ \ocamlinlinecode{. \allowbreak{}/ caqzdqzdml. \allowbreak{}gif}
54
66
55
- $ odoc man-generate -o man page-index. odocl
56
- odoc: FILE. odocl argument: no ' page-index.odocl' file or directory
57
- Usage: odoc man-generate [OPTION]… FILE. odocl
58
- Try ' odoc man-generate --help' or ' odoc --help' for more information.
59
- [2 ]
60
- $ cat man/ index . 3o | grep gif
61
- cat : man/ index . 3o: No such file or directory
62
- [1 ]
63
- $ cat man/ index . 3o | grep " With alt text"
64
- cat : man/ index . 3o: No such file or directory
65
- [1 ]
67
+ $ odoc man-generate -o man _odoc/ pkg1/ doc/ page-index. odocl
68
+ $ cat man/ pkg1/ doc/ index . 3o | grep gif
69
+ caml\. gif
70
+ \./ caqzdqzdml\. gif
71
+ $ cat man/ pkg1/ doc/ index . 3o | grep " With alt text"
72
+ With alt text and \fBemphasis\fR
73
+ With alt text and \fBemphasis\fR
0 commit comments