1
1
We need to odoc-compile the package mld file, listing its children
2
2
3
- $ odoc compile index . mld -- child asset-caml. gif
4
- File " index.mld" , line 33 , characters 30 -38:
5
- Warning: Non-asset reference is not allowed in media target.
6
- Suggestion: Use a reference to an asset
3
+ $ odoc compile index . mld -- parent-id pkg1/ doc/ -- output-dir _odoc
7
4
8
- This will have produced a file called ' page-index.odoc ' .
5
+ $ odoc compile-asset -- parent-id pkg1 / doc / -- output-dir _odoc -- name caml . gif
9
6
10
- Link and generate the HTML (forgetting the asset ! ) :
7
+ This will have produced a file called ' page-index.odoc ' .
11
8
12
- $ odoc link page-index. odoc
13
- File " index.mld" , line 12 , characters 28 -85:
14
- Warning: Failed to resolve reference unresolvedroot(camezfzeffl. gif) Couldn't find asset " camezfzeffl.gif"
15
- File " index.mld" , line 11 , characters 31 -55:
16
- Warning: Failed to resolve reference unresolvedroot(caqzdqzdml. gif) Couldn't find asset " caqzdqzdml.gif"
17
- $ odoc html-generate -o html -- indent -- asset caml. gif page-index. odocl
9
+ Link (and generate the HTML):
10
+ $ odoc link -P pkg1: _odoc/ pkg1/ doc _odoc/ pkg1/ doc/ page-index. odoc
11
+ File " index.mld" , line 33 , characters 48 -64:
12
+ Warning: Failed to resolve reference ./ module-x Path ' module-x' not found
13
+ File " index.mld" , line 12 , characters 28 -83:
14
+ Warning: Failed to resolve reference ./ camezfzeffl. gif Path ' camezfzeffl.gif' not found
15
+ File " index.mld" , line 11 , characters 31 -53:
16
+ Warning: Failed to resolve reference ./ caqzdqzdml. gif Path ' caqzdqzdml.gif' not found
17
+ $ odoc html-generate -o html -- indent _odoc/ pkg1/ doc/ page-index. odocl
18
18
$ odoc support-files -o html
19
19
20
20
To test visually, indent:
@@ -24,49 +24,42 @@ To test visually, indent:
24
24
Testing the working references:
25
25
26
26
$ cat html/ index / index . html | grep img
27
- <a href="caml.gif" class="img-link" >
28
- <img src="caml.gif" alt="caml.gif"/ >
29
- <a href="caml.gif" class="img-link" >
30
- <img src="caml.gif" alt="With alt text and emphasis"/ >
31
- <a href="https://picsum.photos/200/300" class="img-link" >
32
- <img src="https://picsum.photos/200/300" alt="reference"/ >
33
- <a href="https://picsum.photos/200/300" class="img-link" >
34
- < img src= " https://picsum.photos/200/300"
27
+ cat : html/ index / index . html: No such file or directory
28
+ [1 ]
35
29
36
30
$ cat html/ index / index . html | grep video
37
- <li ><a href="#video" >Video</a >
38
- </div ><h2 id="video" ><a href="#video" class="anchor" ></a >Video</h2 >
39
- < video
40
- src= " https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
41
- </video >
31
+ cat : html/ index / index . html: No such file or directory
32
+ [1 ]
42
33
43
34
$ cat html/ index / index . html | grep audio
44
- <li ><a href="#audio" >Audio</a >
45
- </ul ><h2 id="audio" ><a href="#audio" class="anchor" ></a >Audio</h2 >
46
- < audio
47
- </audio >
35
+ cat : html/ index / index . html: No such file or directory
36
+ [1 ]
48
37
49
38
Testing the unresolved references:
50
39
51
40
$ cat html/ index / index . html | grep xref-unresolved
52
- < div >< span class="xref-unresolved" >< code >caqzdqzdml . gif< /code >< /span >
53
- < span class="xref-unresolved" >With alt text and < b >emphasis< /b >< /span >
41
+ cat : html / index / index . html : No such file or directory
42
+ [ 1 ]
54
43
55
44
Testing latex and manpages
56
45
57
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 ]
58
51
$ cat latex/ index . tex | grep ocamlinlinecode
59
- \ocamlinlinecode{caml. \allowbreak{}gif}
60
- \ocamlinlinecode{caqzdqzdml. \allowbreak{}gif}
61
- \ocamlinlinecode{https: // picsum. \allowbreak{}photos/ 200 / 300 }
62
- \ocamlinlinecode{https: // upload. \allowbreak{}wikimedia. \allowbreak{}org/ wikipedia/ commons/ f/ f1/ Cri\_\allowbreak{}du\_\allowbreak{}chameau. \allowbreak{}ogg}
63
- \ocamlinlinecode{https: // interactive-examples. \allowbreak{}mdn. \allowbreak{}mozilla. \allowbreak{}net/ media/ cc0-videos/ flower. \allowbreak{}webm}
64
- \ocamlinlinecode{module-x }
52
+ cat : latex/ index . tex: No such file or directory
53
+ [1 ]
65
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 ]
67
60
$ cat man/ index . 3o | grep gif
68
- caml\ . gif
69
- caqzdqzdml\ . gif
61
+ cat : man / index . 3o : No such file or directory
62
+ [ 1 ]
70
63
$ cat man/ index . 3o | grep " With alt text"
71
- With alt text and \fBemphasis\fR
72
- With alt text and \fBemphasis\fR
64
+ cat : man / index . 3o : No such file or directory
65
+ [ 1 ]
0 commit comments