Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When referring to a figure, the output in my pdf is not a number, but 'Figure xx'. For example: if I use the phrase

This is figure \ref{test}.

the output in my pdf file is always:

This is figure Figure 1.3.

I would like to know why LaTeX shows the prefix 'Figure' and not simply the number of the figure. Here is the general code that I use for a figure:

\begin{figure}[h]
    \centering
    \includegraphics[scale=0.9]{Test.eps}
    \caption{Test}
    \label{test}
\end{figure}

Interestingly, when referring to a subfigure, this issue does not occur; it only occurs when I want to refer to a 'whole' figure. As my document is quite extend (thesis), I use a lot of packages in my preamble, but even after an extensive quest I could not figure out what the problem might be.

My preamble:

\usepackage{a4wide}                         
\usepackage[pdftex]{graphicx}                   
\usepackage[small,bf,hang]{caption}     
\usepackage[latin1]{inputenc}                           
\usepackage{fancyhdr}                   
\usepackage{titlesec}                   
\usepackage{subfig}                     
\usepackage[superscript,biblabel]{cite} 
\usepackage{chngcntr}                   
\usepackage[nottoc,notlot,notlof]{tocbibind}    
\usepackage{fixltx2e}                   
\usepackage{wrapfig}                    
\usepackage{arevtext,arevmath}          
\usepackage{enumitem}                   
\usepackage[Gray,squaren,thinqspace,thinspace]{SIunits} 

\usepackage[version=3]{mhchem}              
\usepackage{chemscheme}
\usepackage{epstopdf}                   
\usepackage[varioref=true,journal=jcp]{chemstyle}  
\usepackage{float}

% **** General lay out ****

\setlength{\parindent}{0cm}             
\renewcommand{\baselinestretch}{1.3}    
\pagenumbering{arabic}                  
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyhead[R]{\thepage}

% **** Font in titles and text ****

\usepackage[scaled=.95]{helvet}         
\usepackage{sectsty}
\allsectionsfont{\sffamily}
\renewcommand{\familydefault}{\sfdefault}   

% **** Fancy chapter titles ****

\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\sffamily\huge\raggedleft}    
  {\MakeUppercase{\chaptertitlename}
    \rlap{ \resizebox{!}{1.4cm}{\thechapter} \rule{5cm}{1.45cm}}} 
  {10pt}{\Huge}  % Chaptertitelgrootte
\titlespacing*{\chapter}{0pt}{2pt}{90pt}

% **** Fancy captions for images ****

\captionsetup{
margin=1ex,
font={small, sf},
labelfont={bf, sf},
labelsep= endash}

% ************

\makeatletter 
\def\@seccntformat#1{\llap{\csname the#1\endcsname\quad}}
\makeatother

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
share|improve this question
    
Please add your preamble here because \ref should print just the number. Do you use the cleveref package? –  Oliver Mar 9 at 13:47
    
I have added my preamble now. –  Machaeri Mar 9 at 13:52
    
With cleveref, typing: This is \cref{test} will result in: This is figure 1.3, and \Cref{test} shows that… in: Figure 1.3 shows that… It cooperates with varioref. –  Bernard Mar 9 at 14:08

1 Answer 1

This is caused by chemstyle package, and to be more precisely by the varioref option. Set it to false if you don't need it.

share|improve this answer
    
Thanks for the help! It all works now as it should be! –  Machaeri Mar 9 at 16:51
    
Actually I wanted to turn this on. Thanks! –  ntrrgc Aug 20 at 15:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.