# \ref is automatically prefixing the string “Fig.” to figure numbers and “Table” to table numbers. Why?

I'm not sure what package I've loaded, but my figures are being printed automatically as "Fig. #", while my tables are printed automatically as "Table #".

Is there a way to just get the number?

Also, I've read the default is for Figures to be labeled as "Figure" not "Fig.", I am not sure what I've loaded. How can I decipher the source (or return the behavior to the original).

My preamble is quite complicated, I'm not sure I could simply comment out various packages and see which one removes the behavior I'm wanting to change.

--EDIT--

As requested here is a MWE. I have commented out the other packages that I am including in my main document, just in case it changes your answer or assistance.

\documentclass[oneside,openany,openbib,11pt]{memoir}

\usepackage[demo]{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
%\usepackage{bpchem} %labeling and referencing of compounds
\usepackage[journal=rsc,tracking=bpchem]{chemstyle} %for schemes and such
%\usepackage{textcomp} %use for symbols
%\usepackage{amssymb,amsmath}
%\usepackage{multirow} % for mutlirow
%\usepackage{mciteplus} % for multicitations
%\usepackage[super=true,journal=jacsat,maxauthors=0]{achemso} %for proper citation formatting
%\usepackage{flafter} %floats appear after their
%\usepackage{floatrow} %float customization
%\usepackage{textgreek} %greek text
%\usepackage{bm} %bold math text
%\usepackage{siunitx}
%\usepackage{glossaries}
%\usepackage{etoolbox}

\begin{document}
\begin{figure}
\caption{testing}\label{test}
\includegraphics{test}
\end{figure}

\ref{test}
\end{document}

• No. That's why you create a minimal working example which reproduces the behaviour. We neither need nor want your entire preamble. Although it does sound as if you should probably do some pruning - but that's not relevant here. – cfr May 11 '16 at 2:55
• By creating a MWE, I will likely figure it out, as that will narrow the list of packages. I was hoping to avoid such an time-intensive process. But alright. – J M May 11 '16 at 2:56
• Yes. That's how creating an MWE often goes. Do you really have so little idea what your preamble does that you can't make a reasonable guess that quite a lot of it is irrelevant? As I say, I get the very strong impression that you have a preamble which has accumulated a lot of excess baggage. If so, pruning it is well worth your time. Such preambles make it enormously difficult to understand, maintain and diagnose your code. Every problem will take longer to solve than it should, if you manage to solve it at all. – cfr May 11 '16 at 3:16
• It is not clear if the undesired "Fig." appear in the caption lables or in text references If the second, are you using the cleveref package and \cref (not \ref) for cross-references? May be \vref also with varioref package? Or some other listed here ? – Fran May 11 '16 at 4:17
• Turns out my chemstyle package loads varioref by default – J M May 11 '16 at 4:26

First, you need to reset the macro \figurename. Its default value, if the chemstyle package is loaded, is "Fig.".

\AtBeginDocument{\renewcommand\figurename{Figure}}


to the preamble to change the macro to, you guessed it, "Figure".

Second, you need to provide the option varioref=false when loading the chemstyle package:

\usepackage[journal=rsc,tracking=bpchem,varioref=false]{chemstyle}


This will suppress the prefixing of Fig. (or Figure) in the cross-reference.

Remember to recompile twice to fully propagate all changes.

• That took care of the first part (changing the "Fig" to "Figure". But \ref still prints "Figure 0.1" automatically and not just "0.1" as the default is. How do I achieve that (I believe that is an impact of the chemstyle package). Which seems to load a bunch of other packages too. – J M May 11 '16 at 5:36
• @JM - I've edited my answer to show how to get rid of the "Fig." (or "Figure" prefix in the cross-reference callouts. – Mico May 11 '16 at 5:45
• Thank you, are there any unintended consequences in my document that might arise from disabling varioref? I also saw that maybe I could change labelformat{figure}{#1} would this also work? – J M May 11 '16 at 5:47
• @JM - I'd say, compile a real document or two with the new settings and check for unwanted outcomes. – Mico May 11 '16 at 6:14
• @JM - If you're committed to keep using the memoir document class, you may also want to look into using \fref, \tref, etc to cross-reference figures, tables, and so on. – Mico May 11 '16 at 14:03