0

It seems that using \label inside \subbottom causes known problems inside the 'memoir' class of documents.

Although I already solved the problem, I was stumped by the fact that I cannot reproduce one of the solutions here in TEX: https://tex.stackexchange.com/a/303156/107951

\documentclass{memoir}

\usepackage{graphicx}
\usepackage{hyperref}
\newsubfloat{figure}

\begin{document}

\begin{figure}[h]
  \subbottom[Image A]{\includegraphics[width=0.5\columnwidth]{example-image-a}}
  \caption{First}
\end{figure}

\begin{figure}
  \subbottom[Image B]{\includegraphics[width=0.5\columnwidth]{example-image-b}}
  \caption{Second}
\end{figure}

\end{document}

I copied it verbatim and compiled it, and keep getting the warning: "pdfTex warning (ext4): destination with the same identifier (name{subfigure.1}) has been already used, duplicate ignored"

I'm using TEXnicCenter 2.02 (64 bits) and basic-miktex-2.9.5997 (64 bits).

The error occurs independently of the order of \usepackage{hyperref} and \newsubfloat{figure} (i.e., both the original question and the solution in Hyperref: destination with the same identifier (...) has been already used, duplicate ignored lead to the same error):

enter image description here

enter image description here

Log: http://textuploader.com/53jkc

  • 1
    The linked example works for me out of the box. Please show us your document rather – user31729 Jun 20 '16 at 13:28
  • @ChristianHupfer Do you mean include the code in the question, attach the .tex file or attach the .pdf? – AFS Rodrigues Jun 20 '16 at 13:35
  • Update your question by pasting the code of minimal example into it. You cannot attach files. – daleif Jun 20 '16 at 13:37
  • @ChristianHupfer I am literally using the code in the link, is it not a minimal working example? – AFS Rodrigues Jun 20 '16 at 13:41
  • Where are you placing the label? It should go in side the [...] option. And please update your example, there are no labels or references here, so this example cannot give you the warning you mention. – daleif Jun 20 '16 at 13:47
1

In your example code you have \newsubfloat{figure} behind \usepackage{hyperref}. This is correct and compile without warnings.

But in your screenshot you have \newsubfloat{figure} before \usepackage{hyperref}, and this leads to the warning as now hyperref can't patch the subfloat.

  • Sorry, I was trying both the question and the solution to see the difference and posted the wrong one. But the warning persists. I've updated the question with both images. – AFS Rodrigues Jun 20 '16 at 14:31
  • Show the complete log-file of the compilation of the example with the \newsubfloat behind hyperref. – Ulrike Fischer Jun 20 '16 at 14:44
  • Here it is textuploader.com/53jkc – AFS Rodrigues Jun 20 '16 at 14:56
  • I can not reproduce the warning, but your system is older than mine. It is rather curious that your memoir is from 2015 but your hobsub-generic version is older than the one in texlive 2014. – Ulrike Fischer Jun 20 '16 at 15:30
  • Ok, no problem. As I said in the question, I've solved the problem through other means, it was just strange that a verbatim copy of the solution in that thread kept giving the warning. Thanks for looking into it. – AFS Rodrigues Jun 20 '16 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.