@@ -232,36 +232,36 @@ from OCamldoc.
232
232
Text within the comments can be formatted using the following markup. Firstly,
233
233
the simple typesetting markup:
234
234
235
- - [{b text}] bold
236
- - [{i text}] italic
237
- - [{e text}] emphasis
238
- - [{^ text}] superscript
239
- - [{_ text}] subscript
235
+ - [{b < text> }] bold
236
+ - [{i < text> }] italic
237
+ - [{e < text> }] emphasis
238
+ - [{^ < text> }] superscript
239
+ - [{_ < text> }] subscript
240
240
241
241
{3:lists Lists}
242
242
Unordered lists:
243
243
{v
244
- {ul {- item}
245
- {- item}
246
- {- item}}
244
+ {ul {- < item> }
245
+ {- < item> }
246
+ {- < item> }}
247
247
v}
248
248
and ordered lists:
249
249
{v
250
- {ol {- item 1}
251
- {- item 2}
252
- {- item 3}}
250
+ {ol {- < item 1> }
251
+ {- < item 2> }
252
+ {- < item 3> }}
253
253
v}
254
254
There is also an abbreviated syntax for lists. The above could be written:
255
255
{v
256
- - item
257
- - item
258
- - item
256
+ - < item>
257
+ - < item>
258
+ - < item>
259
259
v}
260
260
and
261
261
{v
262
- + item 1
263
- + item 2
264
- + item 3
262
+ + < item 1>
263
+ + < item 2>
264
+ + < item 3>
265
265
v}
266
266
267
267
{3:code_blocks Code Blocks}
@@ -379,19 +379,19 @@ module type [Foo].
379
379
380
380
The prefixes supported are:
381
381
- [module]
382
- - [module-type] (also [modtype])
382
+ - [module-type] (and the equivalent deprecated prefix [modtype])
383
383
- [class]
384
- - [class-type] (also [classtype])
385
- - [value ] (also [val ])
384
+ - [class-type] (and the equivalent deprecated prefix [classtype])
385
+ - [val ] (and the equivalent deprecated prefix [value ])
386
386
- [type]
387
- - [exn ] (also [exception ])
387
+ - [exception ] (and the equivalent deprecated prefix [exn ])
388
388
- [method]
389
- - [constructor] (also [const])
389
+ - [constructor] (and the equivalent deprecated prefix [const])
390
390
- [extension]
391
- - [field] (also [recfield])
391
+ - [field] (and the equivalent deprecated prefix [recfield])
392
392
- [instance-variable]
393
- - [label ] (also [section] - for referring to headings)
394
- - [page] ( for referring to [.mld] pages)
393
+ - [section ] (and the equivalent deprecated prefix [label]) - for referring to headings
394
+ - [page] - for referring to [.mld] pages
395
395
396
396
In some cases the element being referenced might have a hyphen, a dot or a space in the name,
397
397
e.g. if trying to refer to a page from a [.mld] file "1.2.3.mld". In this case, the
@@ -505,22 +505,23 @@ These tags have a block of potentially marked-up text associated with them,
505
505
and occasionally some more data too. The block of text is ended by the end
506
506
of the comment or by another tag. They are:
507
507
508
- - [@deprecated text] - marks the element as deprecated. [text] should describe
508
+ - [@deprecated < text> ] - marks the element as deprecated. [text] should describe
509
509
when the element was deprecated, what to use as a replacement, and possibly
510
510
the reason for the deprecation
511
- - [@param id text] - Associate the the given description (text) to the given
511
+ - [@param <id> < text> ] - Associate the the given description (text) to the given
512
512
parameter name id. OCamldoc uses this tag for functions, methods, classes
513
513
and functors, but [odoc] does not currently enforce this restriction.
514
- - [@raise exn text] - Indicates that the element may raise [exn]. The text should
514
+ - [@raise < exn> < text> ] - Indicates that the element may raise [exn]. The text should
515
515
describe when this might occur. [@raises] is a synonym for this tag.
516
- - [@return text] - describes the return value. [@returns] is a synonym for this.
517
- - [@before version text] - Allows differences in past behaviour to be described.
516
+ - [@return < text> ] - describes the return value. [@returns] is a synonym for this.
517
+ - [@before < version> < text> ] - Allows differences in past behaviour to be described.
518
518
This is intended to be used to document compatibility issues.
519
- - [@see < URL > text] - Add a reference to the URL with [text] as a comment.
520
- - [@see 'filename' text] - Add a reference to the given file (written between
519
+ - [@see <<URL>> <text>] - Add a reference to the URL (written between [<] and
520
+ [>] delimiters) with [text] as a comment.
521
+ - [@see '<filename>' <text>] - Add a reference to the given file (written between
521
522
single quotes), with the given text as comment. {e Note:} [odoc] currently
522
523
doesn't turn this into a link in the output HTML.
523
- - [@see "document-name" text] - Adds a reference to the given document name
524
+ - [@see "< document-name>" < text> ] - Adds a reference to the given document name
524
525
(written between double quotes), with the given text as comment. {e Note:}
525
526
As with the file reference, [odoc] doesn't turn this into a link.
526
527
@@ -724,23 +725,27 @@ contents and thus should be used to introduce examples, comments or other
724
725
complementary notes. An alternative would be to consider splitting into
725
726
multiple files.
726
727
728
+ Finally, documentation pages should start with a level-0 heading, see
729
+ {!section-"page-title"}. Level-0 headings should not be used elsewhere.
730
+
727
731
The syntax for declaring sections is as follows:
728
732
729
733
{v
730
- {[0-6] text}
734
+ {[0-5] < text> }
731
735
v}
732
736
or
733
737
{v
734
- {[0-6]: label text}
738
+ {[0-5]:< label> < text> }
735
739
v}
736
- where the number represents the sectioning level. [0] is reserved for page titles
737
- for [.mld] files. [label] is an optional label for the section, allowing it to be
738
- referenced via the [{!label-...}] reference. For example:
740
+
741
+ where the number represents the sectioning level. [<label>] is an optional label
742
+ for the section, allowing it to be referenced via the [{!section-<label>}] reference.
743
+ For example:
739
744
740
745
{v
741
746
{2:foobar Foo Bar}
742
747
...
743
- See {!label -foobar} for details
748
+ See {!section -foobar} for details
744
749
v}
745
750
746
751
In this case the reference text would be "Foo Bar" so the paragraph would read
@@ -755,7 +760,7 @@ name in the reference link as follows:
755
760
{v
756
761
{2:foo-bar Foo Bar}
757
762
...
758
- See {!label -"foo-bar"} for details
763
+ See {!section -"foo-bar"} for details
759
764
v}
760
765
761
766
You can use [_] instead of [-] to avoid this syntax.
0 commit comments