5

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[left=1.5in, right=1in, top=1in, bottom=1in, headsep=0.1in, head=0.4in, includehead, includefoot, marginparsep=0in, marginparwidth=0in,footskip=0.4in]{geometry}

\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[pdfborder={0 0 0},plainpages=false,pdfpagelabels=\thepage,bookmarks=true,breaklinks=true]{hyperref}
%\usepackage{etoolbox}

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

\ref{test}
\end{document}
9
  • 1
    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
    Commented May 11, 2016 at 2:55
  • 1
    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
    Commented May 11, 2016 at 2:56
  • 1
    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
    Commented May 11, 2016 at 3:16
  • 1
    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
    Commented May 11, 2016 at 4:17
  • 1
    Turns out my chemstyle package loads varioref by default
    – J M
    Commented May 11, 2016 at 4:26

1 Answer 1

5

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

You should add

\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.

7
  • 1
    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
    Commented May 11, 2016 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
    Commented May 11, 2016 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
    Commented May 11, 2016 at 5:47
  • 1
    @JM - I'd say, compile a real document or two with the new settings and check for unwanted outcomes.
    – Mico
    Commented May 11, 2016 at 6:14
  • 1
    @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
    Commented May 11, 2016 at 14:03

You must log in to answer this question.

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