Hi there I was working on a subfigure and since it's part of a pipeline I wanted to have something in my main text saying: ... (Figure 4, top right) ... (Figure 4, middle) ... (Figure 4, bottom).
Now, the subfigure part it's pretty straightforward and it appears to be correct; however, when clicking on the in-text links I'm always prompted to the whole Figure 4... What I would actually like to happens is a close-in look at the top/middle/bottom of the figure according to where I click.
Below the packages I use and how I implemented the subfigure.
\documentclass[12pt]{report}
\usepackage{float}
\usepackage{graphicx} % for inserting images
\usepackage[inkscapearea=page]{svg} %for SVG import
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{textcomp}
\usepackage{setspace}
\usepackage{csquotes}
\usepackage{authblk}
\usepackage{xurl}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=blue,
filecolor=.,
linkcolor=maroon,
urlcolor=teal,
linktoc=all
}
\usepackage{cleveref}
\usepackage{caption}
\usepackage{orcidlink}
\usepackage{subcaption}
%\captionsetup[table]{font=small}
\captionsetup[figure]{font=small}
\renewcommand{\thefigure}{\arabic{figure}}
\definecolor{teal}{rgb}{0.0, 0.5, 0.5}
\definecolor{maroon}{rgb}{0.69, 0.19, 0.38}
\definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}
\definecolor{MSBlue}{rgb}{0.204, 0.353, 0.541}
\definecolor{darkcerulean}{rgb}{0.03, 0.27, 0.49}
\usepackage{tocloft}
\usepackage{tocbasic}
\usepackage[nottoc]{tocbibind} % automatically adds LOF and LOT to TOC
\renewcommand{\cftdot}{}
\renewcommand{\baselinestretch}{1.5}
\renewcommand{\cftchapfont}{\Large\bfseries\color{MSBlue}}
\renewcommand{\cfttoctitlefont}{\Large\bfseries\color{black}}
\renewcommand{\cftloftitlefont}{\Large\bfseries\color{black}}
\renewcommand{\cftsecfont}{\large\bfseries\color{darkcerulean}}
\renewcommand{\cftsubsecfont}{\normalsize\bfseries\color{coolblack}}
\makeatletter
\renewcommand@dotsep{10000}
\makeatother
\DeclareTOCStyleEntry[
entrynumberformat=\entrynumberwithprefix{\figurename},
dynnumwidth,
numsep=1em
]{tocline}{figure}
\newcommand\entrynumberwithprefix[2]{#1\enspace#2:\hfill}
\title{\Huge\bfseries{Pangenome-based Demographic Inference}}
\author{\LARGE{Matteo Tommaso Ungaro}}
\date{}
\usepackage{microtype}
\usepackage[main=english]{babel}
\usepackage[sorting=ynt, backend=biber, giveninits]{biblatex}
\addbibresource{references.bib}
\DeclareNameAlias{author}{family-given}
\titleformat{\chapter}[hang]{\Large\bfseries\color{MSBlue}}{\thechapter}{1em}{}
\titleformat{\section}{\large\bfseries\color{darkcerulean}}
\titleformat{\subsection}{\normalsize\bfseries\color{coolblack}}
\begin{document}
...
%referring to part of the figure/specific subfigures
(\textbf{\hyperref[figure:construction]{Figure 4, top right}})
(\textbf{\hyperref[figure:mapping]{Figure 4, middle}})
(\textbf{\hyperref[figure:analyses]{Figure 4, bottom}})
%subfigure part
\begin{figure}[htbp]
\centering
\begin{subfigure}{\textwidth}
\centering
\includesvg[width=6.5in]{figure4_flowchart_pt1}
\vspace{-1.1\baselineskip}
\label{figure:construction}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includesvg[width=6.5in]{figure4_flowchart_pt2}
\vspace{-1.1\baselineskip}
\label{figure:mapping}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includesvg[width=6.5in]{figure4_flowchart_pt3}
\label{figure:analyses}
\end{subfigure}
\caption[\textbf{Workflow from pangenome construction to downstream analyses}]{\textbf{Workflow from pangenome construction to downstream analyses.} }
\label{figure:workflow}
\end{figure}
\end{document}
I didn't use \caption for subfigures as I didn't need it, I only require a global caption for the workflow. Also, I got rid of extra white spaces between the subfigures since I want the workflow to appear as a single item. See image below.
I'm not sure what I've done wrong, any help is greatly appreciated!



\captionstatements inside thesubfigureenvironments, the\labelstatements can't latch on to anything that's specific to thosesubfigures. Instead, all LaTeX can do is associate them with the overall\captionstatement. Asubfigureenvironment is nothing but aminipageenvironment that knows what to do when it encounters a\captiondirective. Since you don't want to provide subfigure-specific captions, it's kind of pointless to even employsubfigureenvironments. Why not provideminipageenvironments directly? – Mico Feb 18 '24 at 13:13\subfigurewith\minipagebut that doesn't seem to change the end result... is there anything else specific I need to do? Sorry but I'm quite new to LaTex, also apology I fixed the typos – Matteo Feb 18 '24 at 13:34subfigure-specific captions, the basic\label-\refmechanism cannot work since the\labelstatement have no anchor to attach themselves to. Please consult the posting How to cross-reference an unnumbered theorem using hyperref and cleveref and its accepted answer [shameless self-citation alert!] for an alternative approach to creating cross-references. – Mico Feb 18 '24 at 13:53