I have a question regarding latex tables and figures. This is my code:
\begin{figure}
\centering
\includegraphics{Template Master Thesis/Figures/conceptual model.png}
\caption{Conceptual model}
\label{fig:my_label}
\end{figure}
Once I remove \begin{figure} and \end{figure} my image is appearing. But with the current code, the image is not appearing. I want to add a caption to the image but I cannot do that If I don't use \begin{figure} and \end{figure}. The same applies to adding a table.
Can someone help me in making this code work, by displaying the figure with caption in my document?
Thank you in advance!
figureandtableare floating environments which means they not necessarily appear in the pdf exactly where you pleaced them in the input. You can influence the positioning of floats (See How to influence the position of float environments like figure and table in LaTeX?). – leandriis Mar 24 '20 at 11:18\captionof{figure}{...}or\captionof{table}{...}to add captions to images and tabulars outside offigureodtableenvironments. – leandriis Mar 24 '20 at 11:18\documentclass{...}and ending with\end{document}. – Alessandro Cuttin Mar 24 '20 at 11:23\begin{table}[h](figurewould be more natural thantable) makes going to the end quite likely as it specifies that the float may not be placed at toe top or bottom of a page or on a page that only has floats (no t b or p) so latex doesn't have many options (in fact usually it gives a warning and change sit to[ht]to give itself at least a chance to position the figure) – David Carlisle Mar 24 '20 at 15:44