latex3 / tagging-project

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

subcaption + hyperref with \listoffigures give tagpdf warning #85

Open John02139 opened 3 months ago

John02139 commented 3 months ago
\DocumentMetadata{
    testphase=phase-III
}
\documentclass{article}

\usepackage{hyperref} 
% leads to:
% Package tagpdf Warning: Destination figure.caption.2 has no related structure.

\usepackage{subcaption}
\usepackage{mwe}

\begin{document}

\listoffigures

\section{Intro}

\subsection{Subintro}

\begin{figure}[b]
    \begin{subfigure}[c]{0.495\textwidth}
    \centering\includegraphics[alt={sample image},width=0.99\textwidth]{example-image-c}%
    \subcaption{\label{fig:2a}}
    \end{subfigure}
    \begin{subfigure}[c]{0.495\textwidth}
    \centering{\includegraphics[alt={sample image},width=0.99\textwidth]{example-image-c}}%
    \subcaption{\label{fig:2b}}%
    \end{subfigure}%
    \caption{A figure with two subfigures: (a) first subfigure; (b) second subfigure.\label{fig:2}}
\end{figure}

\end{document}

Package tagpdf Warning: Destination figure.caption.2 has no related structure. (tagpdf) /Ref for structure 8 not updated

This issue is somewhat similar to https://github.com/latex3/tagging-project/issues/55#issue-2072113631