1

I would appreciate any help with a problem that I have with reference to figures in my appendix. For example, instead of (Fig. A.1 ), I only get (Fig. A). I read all the previous posts but they did not help me. According to a previous post, I even added

\renewcommand\thesection{\Alph{section}}
\renewcommand{\thefigure}{\thesection.\arabic{figure}}

after the \appendix command, but that did not help either. Here is the minimal code I use:

\documentclass[reprint,
superscriptaddress,
 amsmath,amssymb,
 aps,
]{revtex4-1}


\section{AAA}\label{AAA}
Blah blah Fig. \ref{xyz}  blah blah.

\appendix
\section{ BBB}\label{BBB}

\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{xyz.png}
\caption{blah blah}
\end{center}\label{xyz}
\end{figure}
  • Welcome to TeX.SX! Change \begin{center} into \centering and remove \end{center}. – egreg Jun 16 '15 at 16:53
  • This produces the desired output: \documentclass[reprint, superscriptaddress, amsmath,amssymb, aps, ]{revtex4-1} \usepackage{graphicx} \begin{document} \section{AAA} \label{AAA} Blah blah Fig. \ref{xyz} blah blah. \appendix \renewcommand\thesection{\Alph{section}} \renewcommand{\thefigure}{\thesection.\arabic{figure}} \section{BBB}\label{BBB} \begin{figure} \centering \includegraphics[scale=0.5]{example-image-a} \caption{blah blah} \label{xyz} \end{figure} \end{document} Do you get something different? – Gonzalo Medina Jun 16 '15 at 16:58
  • The question is a duplicate; in the linked question the centering environment was used, but the problem is just the same. – egreg Jun 16 '15 at 17:02
  • Thank you so much, @Gonzalo Medina. The problem is now solved. – user101464 Jun 17 '15 at 17:22