LaTeX is a good tool for creating articles or books. However, when it comes to inserting figures, it is a very cumbersome process. This tutorial will show the steps for producing LaTeX documents with figures. For the purpose of this tutorial, we will use a graph from an excel document.
Step 1: Highlight (left click) the graph in the excel file.
Step 2: Copy the graph into memory. Right click and select Copy. (or just press and hold Ctrl, and then press c)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYuDUr3MG2QWiGbSzmj95TiMYkktBxcQ0k618rCzi3LhmlZt84PdT0SZg96EJCMZZFUSTRZoo7DVRMzhcVm2KjdeNAgscxMP8tVEnpd_9lFSYQvkMF4ZFhFKt5NOysmdT93LhjayyoiPED/s1600/11.png)
Step 3: Open Paint application. Click on the Start button, choose All Programs > Accessories > Paint.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1O5Y_-wOKt8o9VovPF-VUQ4DWywkZY2yXji7pPQbx1XogszsGqKCCd-ffiMeb3Gx1uFxylax9afH40z9d8XNikd9pt8jVX0J-K7s-M8xc06gqvch-5OJvXu2G4UIrUVGqyv1AbSJS2vzQ/s1600/21.png)
Step 4: Paste the graph that we have just copied into Paint. Click on Edit > Paste. (or just press and hold Ctrl, and then press v)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEika-GPiEkB3YZzYY1cwDtdxoeBKq7dH5oX-6wQNLtb5aqKHYwYgxJveEvV7mJN4aSw7IpKk5fDB85N30akbZ4UQqTcXk_UL_WMdHjswR-KT360C_oKCp3PAYoIfiTs0rhqYPkf2v-mbTMK/s1600/31.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHtzD4W0eKe5E_hI2yPzXwY9YzC-QZLTgyDkDkvU-OnvJJnai5ba88Wp1iN85LTokY5Q707i3roAyk4TYC-wpiMAIQM6QDSASPB6lfP2IxRBWwITelpoDxBUaFaDQJbT53mwllCFOem7P/s1600/3a.png)
Step 5: Now we are going to save our graph in JPEG format. Click File > Save As. A "Save As" dialog box will opened. Type the file name - graph. For the "Save as type" choose JPEG. For simplicity, make sure that the graph is saved in the save folder as the LaTeX document. Then, click on the save button.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfhRjP38MB68CL85t5om4bvtOS7Qayls2LsGZvTnDVHvSd9MHkrwj4wWDV7_-l5dpIjdM32x6REyZbryPg9fP0sBF_-WQZPRsDlbH6My9fgxHi3YukwOfPxOkO594IE-Bj3LRaygJgNvBa/s1600/41.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEvRa7n4BuewVfy7GX1ZFs-7SN1HfwqkRigUoGpjCyjATkXkLHwPvv5qIWlQVqzWZM_vlqPxvarivjPshI4Vj9614AGm1hWH031VMds4wxQF9pL8qofLUhp1JvomVkg-px2LRg56gBJAAO/s1600/51.png)
Step 6: Open the LaTeX document, and type the following LaTeX code:
\begin{figure}[htp]
\centering
\includegraphics{graph}
\caption{Some graph}
\label{fig:graph}
\end{figure}
Don't forget to import the graphicx package, by inserting
\centering
\includegraphics{graph}
\caption{Some graph}
\label{fig:graph}
\end{figure}
\usepackage{graphicx}
at the top of the LaTeX document.Step 7: Now we can produce the pdf document, using the pdflatex command.
note: This tutorial assumed that we are going to produce a pdf file, since pdflatex only accept PDF, PNG, JPEG and GIF format. For producing a postscript or dvi file, we need to convert the JPEG file (graph.jpg) to eps format. It could be done using tools such as jpeg2ps. However, it is beyond this tutorial.