I've tried to make bilingual caption with package "ccaption" and compiled it with pdfLaTeX.

It works fine but with a warning:

pdfTeX warning (ext4): destination with the same identifier (name{figure.1}) has been already used, duplicate ignored.

Here is a mini example:


Figure \ref{fig1}
\bicaption[fig1]{}{中文标题}{Fig.}{English caption}

Sorry for the inconvenience if you don't have package ctex which defines a documents class ctexart for typesetting Chinese. You can replace the documentclass with article and the warning it still there.

  • @HeikoOberdiek :) Thanks. I've got a lot help from TeX.SX. This is my very first time to register and ask a question. Commented Jul 18, 2013 at 8:19
  • Warning, here comes an absolute shameless self-advertisement: The bicaption package works fine with hyperref, out-of-the-box.
    – user2574
    Commented Jul 19, 2013 at 5:07
  • @AxelSommerfeldt Sure it is. Maybe you could consider adding the first example from your answer here to the manual, which I believe is easier to understand. Thanks. Commented Jul 20, 2013 at 6:13

1 Answer 1


ccaption uses an elementary (and mostly feasible) way of producing duplicate captions for the same float. The main function at play here is \contcaption:


It steps the regular float counter back by one, sets a reference and then continues a call to set the actual caption text. On the .aux-file side, this leads to two cross-reference entries with the same hyperlink anchor name... something that hyperref doesn't enjoy. True, without hyperref, this problem won't be noticeable.

A way around this is to use an alias counter, provided by the aliascnt package, and using it as part of \contcaption:

enter image description here

\usepackage{aliascnt,ccaption}% http://ctan.org/pkg/{aliascnt,ccaption}
\usepackage{hyperref}% http://ctan.org/pkg/hyperref

\newaliascnt{figurealt}{figure}% New alias counter for figure float
  \expandafter\addtocounter\expandafter{\@captype alt}{\m@ne}% Step alias cntr back
  \expandafter\refstepcounter\expandafter{\@captype alt}% Make reference
Figures~\ref{fig1} and~\ref{fig2}.
\bicaption[fig1]{}{abc}{Fig.}{English caption}
\bicaption[fig2]{}{xyz}{Fig.}{English caption}

The above MWE provides the alias figurealt which should work in tandem with figure, using it as the replacement reference for the second (continued) caption rather than the traditional float counter.

A similar alias can be created for other floats (like table, using tablealt).

  • Wow, thank you very much for your quick response, though the solution is a little bit complicated than I thought. It works perfect. Commented Jul 18, 2013 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .