1

I am writing my dissertation in overleaf, and I am borrowing a series of figures from different publications. In each relevant figure caption, I have the citation followed by the text "Permissions."

Here is an example.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[style=apa,sorting=ynt]{biblatex}
\addbibresource{references.bib}
\usepackage[colorlinks]{hyperref}
\hypersetup{
    linkcolor={blue},
    citecolor={blue}
}

\title{Moth figure} \date{November 2021}

\begin{document}

\maketitle

\section{Some Section}

Some text goes here.

\begin{figure}[b!] \centering % https://www.pexels.com/photo/insect-macro-butterfly-bugs-56848/ \includegraphics[width=0.6\textwidth]{pexels-pixabay-56848.jpg} \caption{This is a pretty moth, but not actually a hawkmoth. \parencite[]{Ellington1996} - Permissions} \label{fig:my_label} \end{figure}

\section{Permissions}

\section*{Journal Name} \begin{itemize} \item Figure \ref{fig:my_label}: This is not actually an image from \cite{Ellington1996} but if it were I would say that I have the appropriate permissions. \end{itemize} \printbibliography[title=\MakeUppercase{References}] \end{document}

First Page Second Page

My original plan was to use hyperref in combination with hypertarget to cross-reference the word "Permissions" to the bullet point on the next page. But when I tried to do this, the figure would not show up in the list of figures page I had and would cause an error. Are there any tools for cross-referencing within a figure caption to another page? I would imagine there should be since the link from the citation in the figure caption is effectively doing this.

  • 1
    This question has the answer for a table caption, but a figure caption is just the same: Change caption in List of Tables – barbara beeton Nov 21 '21 at 22:34
  • @barbarabeeton How is that an answer? It doesn't mention adding a cross-reference to another page in the caption at all? – WnGatRC456 Nov 22 '21 at 14:07
  • 1
    What you need to do is add an optional version to the caption: \caption[<version for lof/lot>]{<full version for actual caption>}. The cross reference is placed in the full version, will not disrupt the list of figures, and, with hyperref, should behave like any other cross reference. – barbara beeton Nov 22 '21 at 15:51
  • Oh I see. I will attempt that when I can access my document again. – WnGatRC456 Nov 22 '21 at 16:00
  • @barbarabeeton So that does seem to work, but in some of my captions, I have the need to have text that has [] in it aside from the brackets defining the . Do you have any idea how to get around that? Sorry if this technically counts as a second question. – WnGatRC456 Nov 24 '21 at 02:28
  • 1
    When an "internal" set of [] is needed (and causing problems because the closing ] is being interpreted as closing the main option), the solution is always to bury the entire element in another set of braces, so that (La)TeX will interpret it as a distinct separate environment. Dealt with here: LaTeX: optional arguments with square brackets and here: [ ] inside an optional argument](https://tex.stackexchange.com/q/99495). – barbara beeton Nov 24 '21 at 15:05
  • Thanks, if you want to write this up as an answer I will accept it. – WnGatRC456 Nov 24 '21 at 15:09

1 Answers1

4

This is a two-part question, both parts of which are really duplicates, but I haven't found a single answer that addresses both parts, so here goes.

To get a "streamlined" version for the List of Figures (also works for a List of Tables; see explanation in Change caption in List of Tables), add an option to the caption:

\caption[<version for LoF>]{<version for the real caption>}

If the text of the optional version contains any close bracket ] (often part of another option, but not always), LaTeX will assume that this is the end of the main option, resulting in an error. To defeat this interpretation, wrap the entire expression containing the ] in another set of braces to isolate it. Be ultra safe -- do that everywhere within the caption:

\caption[<version for LoF with {...[...]...}>]{<version for the real caption {\cref[...]{...}} ...>}

Explanations in these earlier questions: LaTeX: optional arguments with square brackets and [ ] inside an optional argument.