Skip to Main Content

LaTeX document preparation system

Getting Started with Figures

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/} }.

  • Create a new folder in your Overleaf document named figures (upper left above main.tex). 
  • Add the image to your document by using the upload button (upper left above your figures folder). 
  • To include a figure we are going to use figure environment
  • To include a figure you just need to add \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}


 

Getting Started with Tables

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: