What is the best way to include a small thumbnail image which links to the fullsize image which should be contained in the appendix?
Ideally it would be nice to have a macro which created a thumbnail inline and also automatically added a larger image to the appendices. Does this exist?
— Edit —
Issue with subfigure.
\begin{figure}[H]
\begin{subfigure}
\centering
\thumbnailandappendix{images/iPadMyPdfs}
\end{subfigure}%
\begin{subfigure}
\centering
\thumbnailandappendix{images/iPadMyPdfsPort}
\end{subfigure}
\caption{Main Tab}
\end{figure}
Packages used
\usepackage{array} %% so can bold columns in a latex table
\usepackage{float} %% used to help position images exactly where typed
\usepackage{subfigure}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{hyperref}
Best Answer
Here's a solution that uses the
hyperref
package's commandsand
It defines the command
\thumbnailandappendix
which takes one argument- the name of the image. This commandvbox
to be used later in the appendixthumbnail
to keep the hyperlinks uniqueThe clever bit comes from David Carlisle's answer to Write content of box to a file
The
showlabels
package is especially useful during debugging.The solution can be made to link the 'big' images back the thumbnails, however, this only makes sense if the thumbnail is used once
If the thumbnail is used more than once, then the 'big' image will link back to the most recent thumbnail.
Note: the blank lines are intentional, and important in this
macro
.You can use this command in the
subfigure
environment from thesubcaption
as expected; make sure to loadsubcaption
beforehyperref
and then you can use (for example)