Odoc 3.1.0

We're excited to announce the release of odoc 3.1.0! This release brings several new features, important improvements, and bug fixes to OCaml's documentation generator.

What's New

OCaml 5.4.0 Compatibility

Full support for OCaml 5.4.0 has been added, ensuring odoc stays current with the latest OCaml releases.

New Output Formats and Options

  • Enhanced LaTeX Generator: New command-line arguments --shorten-beyond-depth and --remove-functor-arg-link provide more control over LaTeX output formatting

Key Improvements

Modernized Dependencies

The cmdliner compatibility layer has been removed as it's no longer needed, simplifying the codebase and reducing maintenance overhead.

Updated System Requirements

Support for OCaml versions prior to 4.08 has been dropped, allowing the project to leverage more modern language features and reduce compatibility complexity.

Better Configuration Management

Libraries from packages can now be referenced when added in odoc-config.sexp, improving flexibility in documentation project setup.

Improved LaTeX Output

  • Heading labels now use full paths to improve navigation and reference accuracy
  • Page and anchor separation in LaTeX labels prevents naming collisions

Bug Fixes

This release addresses several important issues:

  • Fixed META file parsing when dependencies are absent
  • Resolved rendering problems on medium screen sizes without global sidebar
  • Corrected occurrence generation for documentation CI systems
  • Ensured hidden pages never receive links, preventing broken references

Getting Started

To install odoc 3.1.0:

opam install odoc

For existing users, upgrade with:

opam upgrade odoc

Contributors

Special thanks to all contributors who made this release possible: @jonludlam, @Octachron, @davesnx, @dbuenzli, @panglesd, and @lukemaurer.

What's Next

We continue to work on expanding odoc's capabilities and improving documentation generation. The development team remains committed to making OCaml documentation more accessible and comprehensive.

Happy documenting!

See full changelog

### Added

Changed

Fixed