odoc icon indicating copy to clipboard operation
odoc copied to clipboard

latex backend: full path in heading labels

Open Octachron opened this issue 9 months ago • 2 comments

This PR fixes the label used for headings in the latex backend.

Previously, the latex backend used only the heading label, for instance,


(** {1:s_name Title } *)

generated

\subsection{Title\label{s_name}}

whereas the references used the full path

\hyperref[Module_name-s_name]{Title[p\pageref*{Module_name-s-name}]}

This PR fixes this discrepancy (observed on the odoc version of the OCaml manual) by using the full path in the heading translation.

Octachron avatar Mar 18 '25 14:03 Octachron

There seems to be multiple changes required to make the reference manual works with odoc 3, I am planning to switch this PR to non-draft mode once I have compiled all the changes.

Octachron avatar Mar 19 '25 10:03 Octachron

Finally, it seems that the changes required for the reference manual to build without dead references apply cleany on the top of this PR, thus I am removing the draft status.

Octachron avatar Mar 25 '25 13:03 Octachron

Thanks @Octachron !

jonludlam avatar Jul 04 '25 12:07 jonludlam