Subfigure link in List Of Figures don't redirect to the subfigure
I am having some problems with my List Of Figures in memoir document class.
When I go to the list of Figures, the link for the main caption works well and redirects to the right page.
But when I click on the link on one of the captions of the subfigure, I get redirected to the 1st page of my report.
Graphics, Figures & Tables ⇒ Subfigure link in List Of Figures don't redirect to the subf
-
- Posts: 2
- Joined: Sat Aug 20, 2016 11:20 pm
- Stefan Kottwitz
- Site Admin
- Posts: 10316
- Joined: Mon Mar 10, 2008 9:44 pm
Subfigure link in List Of Figures don't redirect to the subf
Welcome to the forum!
I don't have this problem when I use memoir, figures and subfigures with hyperref.
Can you please post a
minimal working example that shows the issue?
Stefan
I don't have this problem when I use memoir, figures and subfigures with hyperref.
Can you please post a

Stefan
LaTeX.org admin
-
- Posts: 2
- Joined: Sat Aug 20, 2016 11:20 pm
Subfigure link in List Of Figures don't redirect to the subf
The LaTeX code :
Code: Select all
\documentclass{memoir}
\usepackage{graphicx}
\usepackage[lofdepth,lotdepth]{subfig}
\usepackage[list=true]{subcaption}
\usepackage{subfloat}
\setcounter{lofdepth}{2}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue, citecolor=purple]{hyperref}
\begin{document}
\listoffigures
\chapter{My chapter}
\begin{figure}[H]
\centering
\subfloat [Scanner]{\label{fig:8.1a}
\includegraphics[scale=0.40]{fig/reader2.png}}
\subfloat [Scanner Handling]{\label{fig:8.1b}
\includegraphics[scale=0.53]{fig/reader1.jpg}}
\caption{\label{fig:8.1}Startek FM220}
\end{figure}
\end{document}}
Subfigure link in List Of Figures don't redirect to the subf
Hi,
you're trying to use two, possibly three different packages that try to give similar functionality.
That can not work.
You even get an error:
Try s.th. like
KR
Rainer
you're trying to use two, possibly three different packages that try to give similar functionality.
That can not work.
You even get an error:
Code: Select all
! Package subcaption Error: This package can't be used in cooperation
(subcaption) with the subfig package.
Code: Select all
\documentclass{memoir}
\usepackage[demo]{graphicx}
%\usepackage[lofdepth,lotdepth]{subfig} <-- subcaption is not compatible to this package
\usepackage[list=true]{subcaption}
%\usepackage{subfloat}
\setcounter{lofdepth}{2}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue, citecolor=purple]{hyperref}
\begin{document}
\listoffigures
\chapter{My chapter}
\begin{figure}%[H] <-- unknown option
\centering
\begin{subfigure}[b]{0.3\linewidth}
\includegraphics[width=0.8\linewidth]{fig/reader2.png}% scale=0.40
% using the scale option would require me to know the graphic's dimensions...
\caption{Scanner}
\label{fig:8.1a}% <-- I would use something I could remember the label by, say, "fig:scanner"
\end{subfigure}%
\hspace{1em}% <-- optional space between the subfigures
% \hfill instead of \hspace{..} would fill the gap completely
\begin{subfigure}[b]{0.3\linewidth}
\includegraphics[width=\linewidth]{fig/reader1.jpg}
\caption{Scanner Handling}
\label{fig:8.1b}
\end{subfigure}
\caption{\label{fig:8.1}Startek FM220}
\end{figure}
\end{document}
% though not a problem, since everything after "\end{document}" is ignored, there was an additional closing brace "}".
Rainer