latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
125 stars 34 forks source link

Hyperref links in TOC are misplaced #168

Closed jbezos closed 2 years ago

jbezos commented 2 years ago

The link is placed in the leaders and the page number and not in the title. It used to work, so a change to either babel or hyperref has broken it (when?). There is a similar problem with \ref.

u-fischer commented 2 years ago

Can you show an example?

jbezos commented 2 years ago

@u-fischer I was still investigating but the problem seems to be in hyperref:

\documentclass{article}

\usepackage{hyperref}

\begin{document}

\textdir TRT \pardir TRT % \bodydir TRT \pagedir TRT 

\section{Blah}
\label{blah}

Blah bla bla bla bla bla bla (((\ref{bla}))) bla bla bla.

\end{document}

With TeXlive 2020 it works as expected (tested in Overleaf), and the link is in the number, but with 2021 the link is misplaced and goes from the left of the ref to the end of the line.

u-fischer commented 2 years ago

That is due to an engine bug. I reported that in april last year and it was fixed revision 7431. With luahbtex 1.14 it works (tested with miktex and a local binary) so I think it will be okay again in texlive 2022.

jbezos commented 2 years ago

👍 Not being a bug in babel, I’ll close it.