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
- Exposed sherlodoc libraries for use in other projects (@jonludlam, #1349)
- OCaml 5.4.0 support (@Octachron, #1355)
- New arguments to LaTeX generator, --shorten-beyond-depth and
--remove-functor-arg-link (@Octachron, #1337) - New experimental markdown generator (@davesnx, #1341)
Changed
- Remove cmdliner compatibility layer, no longer needed (@dbuenzli, #1328)
- Drop support for OCaml < 4.08 (@jonludlam, #1300)
- Allow referencing libraries from package added in
odoc-config.sexp
(@panglesd, #1343) - Use full path in heading labels in LaTeX backend (@Octachron, #1332)
- Separate page from anchor in LaTeX labels to prevent collisions (@Octachron,
#1337)
Fixed
- Fix bug in parsing META files when there are no dependencies (@jonludlam, #1352)
- Fix #1335 - incorrect rendering when on medium screen size with no global
sidebar (@lukemaurer, #1361) - Fixed generation of occurrences for docs CI (@jonludlam, #1362)
- Partial fix for #1369 - ensure that we never create a link to a hidden page
(@jonludlam, #1370)