Skip to content

latex backends: add an option to shorten submodules #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 4, 2025

Conversation

Octachron
Copy link
Member

In the latex backend, inlining all submodule and functor definitions in their long form is not always the optimal choice.
In particular, it can be better to be more concise and use only the short description for nested submodules

This PR adds a flag --shorten-beyond-depth to the latex backend to make it choose the abbreviated form
for submodules beyond a given depth.

Along the way, this PR fixes a collision between page url and anchor and adds missing label definitions for pages that have been inlined in the current page in order to redirect references to those page toward the inlined contents.

Combined with an option to remove link to functor arguments, this seems enough to remove all missing labels warning from the build of the reference manual.

@jonludlam jonludlam force-pushed the odoc_latex_shorten_submodules branch from 56e2c14 to ac16f2c Compare July 4, 2025 12:50
@Octachron
Copy link
Member Author

@jonludlam , would you prefer to me to add a Changes entry with the initial PR?

By default, I tend to add it once the PR has been reviewed, but switching to an optimist mode for the Changes entry is fine with me.

@jonludlam
Copy link
Member

I don't particularly mind when it's added - but since this has been languishing for ages without being looked at, I thought I wouldn't then send it back because it didn't have CHANGES :-) Sorry it's been so long! It looks fine though, so as soon as the tests are all passing, in it goes!

@jonludlam jonludlam merged commit 4daca5b into ocaml:master Jul 4, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants