Skip to Main Content
[NJIT Library Logo]

LaTeX for CoAD: Images and Figures

Images

Figures or images are inserted in LaTex using the figure environment {figure}

Including images in your LaTeX document requires adding: \usepackage{graphicx} to the beginning/preamble of your document.

 

\includegraphics{ } command tells LaTeX to insert the image.

To upload an image, click the upload button, and upload your image file.  

 

 
Then include the code:
 
\begin{figure}[htbp]
\centerline{\includegraphics{tonebow.jpg}}
\caption{This is an image from a text that uses color to teach music.}
\label{fig}
\end{figure}
 

To add a caption to your figure, insert \caption{ } after \includegraphics{ }

What is [htbp] ? It controls where the figure is placed.

h: here, where the figure appears in the text (use can always just use [h] )
t: top,  top of the current page.
b: bottom of the current page.
p: page, top of the next available float space (sometimes end up being the end of the document).

These are then arranged in your preferred order of priority.  

What is \centerline?  This centers the image.  *This IEEE conference template example uses centerline, but usually \centering is preferable.  

 

 

The image inserted in the above example is way too big.  There are a couple of ways to resize images in your LaTeX document.  

One way is [scale=] For example, if I want to reduce the size of the image by half:

\begin{figure}[htbp]
\centerline{\includegraphics[scale=.5]{tonebow.jpg}}
\caption{This is an image from a text that uses color to teach music.}
\label{fig}
\end{figure}
 
You can also resize the image to a specific width and height:
 
\begin{figure}[htbp]
\centerline{\includegraphics[width=1in, height=2in]{tonebow.jpg}}
\caption{This is an image from a text that uses color to teach music.}
\label{fig}
\end{figure}
 
To create a list of figures in your document, use the command \listoffigures .  Insert this command where you want the list to appear.  *This will only list figures that have a \caption.  

New Jersey Institute of Technology
University Heights, Newark, New Jersey 07102-1982
(973) 596-3206
Contact Us | Ask A Librarian |  Map & Directions | A to Z Site Index

Copyrighted 2024 | Robert W. Van Houten Library