2

I'm using IEEEtran.cls to produce an article. When setting captions on figures, the text begins with

Fig 1.

(for example).

However, when I reference this figure by using \ref{img:something}, this is rendered to

figure 1

Is there a way to tweak the \ref command so that it be consistent with captions?

jub0bs
  • 58,916
Tom
  • 123
  • 2
    Welcome to TeX.SX! If you're planning on submitting an article to IEEE, just comply with their template and focus on the content of your paper. Don't try to change the default style set up by the IEEEtrans, or you run the risk of seeing your article rejected/delayed. – jub0bs Jun 25 '14 at 02:37
  • HI, This was a remark done by one of hte reviewers. They want me to change this. – Tom Jun 25 '14 at 02:42
  • Please see these, http://tex.stackexchange.com/questions/17489/change-caption-name-of-figures and http://tex.stackexchange.com/questions/135482/how-to-change-figure-caption-to-fig-1-in-stead-of-fig-1 – Masroor Jun 25 '14 at 02:55
  • Are you using the hyperref package and, by some chance, have you made \ref into an alias for \autoref? – Mico Jun 25 '14 at 04:42

1 Answers1

3

You must be loading a separate package; IEEEtran does not attempt to format the number from \ref:

\documentclass{IEEEtran}
\begin{document}
\section{Intro}

See Fig.\,\ref{fig:a}

\begin{figure}[b]
\fbox{a figure}
\caption{A figure}
\label{fig:a}
\end{figure}
\end{document}

I use the refstyle package to format references; for your purposes you'd use something like:

\documentclass{IEEEtran}
\usepackage{refstyle}
    \def\RSfigtxt{Fig.\,}%
    \def\RSfigstxt{Figs~}%
    \def\RSFigtxt{Fig.\,}%
    \def\RSFigstxt{Figs~}%
\begin{document}
\section{Intro}

See \figref{fig:a}

\begin{figure}[b]
\fbox{a figure}
\caption{A figure}
\figlabel{fig:a}
\end{figure}
\end{document}

See the file refstyle.cfg for a full listing of commands that can be modified.