To include images in LaTeX you need to include a new package in the preamble of your document: \usepackage{graphicx}
. You will also need to add the path to your figures folder with \graphicspath{ {figures/} }
.
figure
environment\includegraphics{}
argument.It is useful, though, to include the image in a figure frame by creating a figure environment. In Overleaf, if you create a figure environment, Overleaf automatically creates the following code that centers your image with default caption and label:
The size of the figure can be modified by specifying the width or height of the figure.
\includegraphics[width=150pt]{figures/figure1.jpg}
You can also use \textwidth and \paperwidth to specify relative sizes.
\includegraphics[width=0.5\paperwidth]{figures/figure1.jpg}
Creating tables in LaTeX is straightforward and offers plenty of customization options. Here’s a quick guide:
To create a simple table, use the tabular
environment: