latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
23 stars 5 forks source link

Non-hyperlinked TOC entry when loading tocloft+hyperref with phase-III tagging with lualatex/xelatex 2023 #74

Open luisbran opened 2 months ago

luisbran commented 2 months ago

Hello.

When using \DocumentMetadata{testphase=phase-III} and compiling with lualatex/xelatex 2023, the loading of package tocloft and hyperref leads to non-hyperlinked entries in the TOC, LOT and LOF, whereas the expected behavior was to get hyperlinked entries.

The compilation does produce a related warning "Package tocloft Warning: \@starttoc has already been redefined; tocloft bailing out".

The non-hyperlinking issue does NOT occur if: (i) using testphase=phase-II, or (ii) compiling with pdflatex (2022 or 2023), or (iii) compiling with an earlier version (2022) of lualatex/xelatex, or (iv) not loading tocloft.

If loading tocloft is a must (e.g., when needing to use a template heavily dependent on tocloft), and if one should use lualatex 2023 (e.g., option "TeX Live Version" 2023 on overleaf) and testphase=phase-III for tagging purposes, is there a workaround to getting automatic hyperlinked entries in the TOC+LOT+LOF, while loading tocloft?

Thank you. See MWE below (compile on overleaf with Compiler=lualatex, TeX-Live-Version=2023):

\DocumentMetadata{testphase=phase-III}
\documentclass{article}
\usepackage{hyperref}
\usepackage{tocloft}
\begin{document}
\tableofcontents
\section{Introduction}
Check whether in the TOC the reference to this section is hyperlinked.
\end{document}
u-fischer commented 2 months ago

tocloft is currently not compatible. I can take a look, but can't promise a fast solution. Also I will move the issue to the tagging-project repo as it fits there better.

luisbran commented 2 months ago

Thank you for taking a look and for moving the issue to the more suitable tagging-project repo