1

It was working fine until I tried to insert an image and now comes up with the location of where I've saved the file and says pdf does not exist. I even deleted the code for the image and it's still doing the same. Anyone have any ideas?

Here is my code:

\documentclass{article}

%Graphics stuff

\usepackage{graphicx} %to import images

\usepackage{float} %control of float positions

% Header  stuff

\usepackage{fancyhdr}

\pagestyle{fancy}

%

\begin{document}

\begin{titlepage}

 \begin{center}

 \huge{\bfseries The Collisionless Dynamics of the Milky Way}\\

 [12cm]

    \end{center}
        \begin{flushright}\
        \textsc{\large name}
      \\130009548\\
        \end{flushright}
\end{titlepage}

% table of contents stuff

\tableofcontents

\thispagestyle{empty}

\cleardoublepage


\setcounter{page}{1}

\section{Introduction}\label{sec:intro}

Some text for my intro

\begin{figure}[H]

 \centering

\includegraphics[height=3in]{\\cfs\users\sm292\Documents\Pictures\MWmodella.jpg}

\caption[Fig. 1. Structure of the Milky Way]


\end{document}
Sebastiano
  • 54,118
SFL
  • 45
  • Welcome to TeX.SE! What version you use of Adobe Reader? Into these links, peraphs, there is a solution: https://tex.stackexchange.com/questions/250472/texniccenter-adobe-reader-dc, or https://tex.stackexchange.com/questions/166490/texniccenter-cannot-automatically-open-pdf-in-adobe-reader?rq=1. – Sebastiano Apr 09 '18 at 22:14
  • @Sebastiano thank you. Acrobat reader DC, apparently – SFL Apr 09 '18 at 22:18

1 Answers1

1

Please try the following changed code:

\documentclass{article}

\usepackage{graphicx} %to import images
\usepackage{float} %control of float positions

\usepackage{fancyhdr}
\pagestyle{fancy}


\begin{document}

\begin{titlepage}

 \begin{center}

 \huge{\bfseries The Collisionless Dynamics of the Milky Way}\\

 [12cm]

 \end{center}
        \begin{flushright}\
        \textsc{\large name}
      \\130009548\\
        \end{flushright}
\end{titlepage}

% table of contents stuff

\tableofcontents

\thispagestyle{empty}

\cleardoublepage


\setcounter{page}{1}

\section{Introduction}\label{sec:intro}

Some text for my intro

\begin{figure}[H]
  \centering
  \includegraphics[height=3in]{//cfs/users/sm292/Documents/Pictures/MWmodella.jpg} % <=================
  \caption{Structure of the Milky Way} % <==============================
\end{figure} % <================================================ missing

\end{document}

Please see that I changed the lines marked with <=======. Please see that I added the missing \end{figure}.

Please see that I corrected the line: \caption{Structure of the Milky Way}. The figure numbering is done by LaTeX ...

Because I do not have the called file MWmodella.jpg I get the following result:

resulting pdf

Because I do not have your image I use the package MWE (must be installed, but not called) to show the result with example-image-a: \includegraphics[height=3in]{example-image-a}.

With the MWE

\documentclass{article}

\usepackage{graphicx} %to import images
\usepackage{float} %control of float positions

\usepackage{fancyhdr}
\pagestyle{fancy}


\begin{document}

\begin{titlepage}

 \begin{center}

 \huge{\bfseries The Collisionless Dynamics of the Milky Way}\\

 [12cm]

 \end{center}
        \begin{flushright}\
        \textsc{\large name}
      \\130009548\\
        \end{flushright}
\end{titlepage}

% table of contents stuff

\tableofcontents

\thispagestyle{empty}

\cleardoublepage


\setcounter{page}{1}

\section{Introduction}\label{sec:intro}

Some text for my intro

\begin{figure}[H]
  \centering
  \includegraphics[height=3in]{example-image-a} % <=================
  \caption{Structure of the Milky Way} % <==============================
\end{figure} % <================================================ missing

\end{document}

you get the result:

enter image description here

Mensch
  • 65,388