I'm using one of the preset project formats provided by Sharelatex (thesis template with memoir). The .tex file looks like:
\documentclass[11pt,a4paper,oldfontcommands]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage[dvips]{graphicx} %I've tried removing [dvips] here but this doesn't make a difference?
\usepackage{xcolor}
\usepackage{times}
\usepackage[
breaklinks=true,colorlinks=true,
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}
\usepackage{geometry}
\geometry{total={210mm,297mm},left=25mm,right=25mm, bindingoffset=0mm, top=25mm,bottom=25mm}
\OnehalfSpacing
%%% CHAPTER'S STYLE
\chapterstyle{bianchi}
%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS
\setsecheadstyle{\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\bfseries\sffamily\raggedright}
%%% STYLE OF PAGES NUMBERING
\pagestyle{plain}
\makepagestyle{plain}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\maxsecnumdepth{subsection}
\maxtocdepth{subsection}
\begin{document}
Then, later on in my script I use:
\begin{figure}[h]
\includegraphics[width=8cm]{Xray}
\centering
\end{figure}
But this doesn't produce a picture, just a box where the picture should be with "Xray.png" in it. I have the .png file in the same folder as the .tex file so I am a little lost as to what could be the problem. Anyone who knows what could be the cause of the problem?
.jpg
,.png
. E.g.:Xray.jpg
[dvips]
from\usepackage[dvips]{graphicx}
[dvips]
but dvips can not include png files. If you use pdflatex rather than latex/dvips then it will work.\centering
at the start of the figure, not the end.