I'm using Texmaker for a report and am fairly new to latex.
My cross referenced equations seem to appear just fine, but not my figures. I've labelled them and referenced the label using ref. I ran PDFLatex, then BibTex, then PDFLatex again, then Quick Build, but I keep getting "??"
\documentclass{article}
\usepackage{cite}
\usepackage{harvard}
\usepackage{url}
\renewcommand{\harvardurl}[1]{\textbf{URL:} \url{#1}}
\usepackage{caption}
\usepackage{mathtools}
\citationmode{abbr}
\citationstyle{dcu}
\begin{document}
\section{Results\label{results}}{}
\subsection{Measuring Detection Rate\label{detection}}{}
\subsubsection{Cross-correlation\label{crosscorrdetect}}
{
\begin{figure}[h]
\begin{centering}
\includegraphics[width=\textwidth]{corrDetectTest.png}
\caption{This is the $CrossCorrelation.h5$. $2$ is the value}
\end{centering}
\label{corrdetectdiag}
\end{figure}
}
{\ref{corrdetectdiag} shows the resulting...}
\newpage
\bibliographystyle{dcu}
\bibliography{BIB_FILE}
\end{document}
I liked how math mode formats the text, so I used it every time I mention a file name, value, or equation.
center
environment and place a\centering
instead. Why is all your stuff in groups (between curlyy braces)? – Johannes_B Jun 5 '15 at 11:52centering
is not an environment that you should\begin{}
and\end{}
. remove these and replace them with a single\centering
after your\begin{figure}
– ArTourter Jun 5 '15 at 12:14