I am working on my thesis project and want to insert an image. This works fine at first, but I want to use the figure environment to give it a caption. However, when I do this I get ``` signs on the page instead of the figure. Everything else works just fine.
What am I doing wrong? Does it got something to do with a float and a report decument?
This is my preamble:
\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {C:/Users/beren/Documents/Master SCM/Thesis/Images/} }
\usepackage[a4paper, width=150mm, top = 16mm, bindingoffset=10mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{15pt}
\fancyhead[LE,RO]{Topic title}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[LO,CE]{SCM Master Thesis}
\fancyfoot[CO,RE]{Name}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}
\addbibresource{References.bib}
%\renewcommand*{\nameyeardelim}{\addcomma\space}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{0pt}{\Huge}
And this is what my code of my chapter looks like (where I want to insert the picture), so no not in the main.tex file:
\begin{figure}[!h]
\centering
\tikzstyle{myblock} = [rectangle, draw, minimum height=1cm]
\begin{tikzpicture}
\node (BDA)[myblock]{BDA Capabilities};
\node (FP)[myblock,right = 0.2cm and 8cm of BDA]{Firm Performance};
\draw[->] (BDA) -- node[above, yshift = 0.2cm] {+} (FP);
\end{tikzpicture}
\caption{Conceptual model}
\label{fig:my_label}
\end{figure}
\begin{figure}[t]
\caption{Simplified model of container flow with three possible decisions at the port to continue}
%\centering
\includegraphics[width=0.7\textwidth]{Figure1}
\end{figure}
I actually gave it a second attempt to get one of my own figures in Latex as well, but I got the same issue.
Your response is highly appreciated! :-)
Link to figure: https://imgur.com/a/yzr9GdC Minimum code:
\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {C:/Users/beren/Documents/Master SCM/Thesis/Images/} }
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{figure}[!h]
\centering
\tikzstyle{myblock} = [rectangle, draw, minimum height=1cm]
\begin{tikzpicture}
\node (BDA)[myblock]{BDA Capabilities};
\node (FP)[myblock,above right = 0.2cm and 8cm of BDA]{Firm Performance};
\draw[->] (BDA) -- node[above, yshift = 0.2cm] {+} (FP);
\end{tikzpicture}
\caption{Conceptual model}
\label{fig:my_label}
\end{figure}
\begin{figure}[t]
\caption{Simplified model of container flow with three possible decisions at the port to continue}
%\centering
\includegraphics[width=0.7\textwidth]{Figure1}
\end{figure}
\end{document}
right = 0.2cm and 8cm of BDA
is not correct, do you meanabove right = 0.2cm and 8cm of BDA
? Also, your preamble does not seem to loadtikz
, norpositioning
, which would be needed here. BTW,\tikzstyle
is deprecated.tikzpicture
or the one added via\includegraphcis
?\graphicspath
is the problem?