odoc icon indicating copy to clipboard operation
odoc copied to clipboard

Remarks on odoc's doc

Open panglesd opened this issue 4 years ago • 2 comments

I collect here the remarks I had when reading the doc. Please tell me if I should do things differently, split the issue in several smaller issues...

Page Odoc for authors

  1. (Maybe this is not related to odoc's doc itself, but: ) In the example given just before the "Basic markup" section, the css seems a bit broken for Variants/Records with comments: image Maybe adding a width of 100% for tables improves this? image
  2. In the example about scope
val x : int
val y : int

module A : sig
  (** In this module I can refer to val {!x} declared above as well as
      type {!u} declared later in the parent module. Elements declared
      in this signature take priority, so {!y} refers to {!A.y} as
      opposed to the [y] declared in the parent signature.  *)

  val y : string
end

type u

Is there a way to refer to the first y? If there is no actual way maybe it should be emphasized, as it can be surprising.

  1. "Odoc_examples.Scope" should be "Odoc_examples.Scope". This seems to be an odoc issue as the source seems legit: {!Odoc_examples.Scope}
  2. In Section and Headings nothing is said about level-6 headings (contrary to all other headings)

Page Features

  1. In the end of Module type of, M' should link to M' instead of to M

Page ocamldoc_differences

  1. In "Odoc for authors", it is said that

There are no differences in how odoc handles comment placement between .ml and .mli files, which is another difference from OCamldoc.

However, this difference is not listed in the ocamldoc_differences

Conclusion

I can try to make the related PR, but I would need help sorting points 2, 3 and 4.

Otherwise, the doc was very clear and pleasant to read, thanks!

panglesd avatar Nov 03 '21 12:11 panglesd

Thanks for the review !

About points 2, 3, 4:

  1. The reference to the other y is {!Scope.y}. Additionally, the comment in A is also rendered into the parent page, it is the synopsis of the module. I think it would be worth adding an empty comment at the top to avoid this behavior, which is confusing when the comment talks about its own position.

  2. This seems like a bug indeed, perhaps in the HTML backend. But more importantly, the reference is not resolving.

  3. That's because there is no level 6 ! Also, the level 0 is not for sections but for the page title. The example should be changed to {[1-5] text} and the sentence "0 is reserved for page titles for .mld files." removed because it is already well explained in the section about pages.

Julow avatar Nov 03 '21 14:11 Julow

4. That's because there is no level 6 !

but the "doc for authors" says:

The syntax for declaring sections is as follows:

{[0-6] text}

sanette avatar Mar 24 '23 08:03 sanette

Most problems have been fixed.

panglesd avatar May 15 '24 13:05 panglesd