skip to Main Content
(Last Updated On: February 23, 2018)

As a typesetting system, LaTeX is capable of creating beautiful files with superior typographic quality. This system is particularly useful for scientists to produce professional-looking reports, dissertations or research papers. Agree or not, pictures are essential elements for these scientific documents. Pictures help make your scholarly content more striking, vivid and compiling. LaTeX gives you the option to include pictures by coding the relevant command lines. If you are an expert, doing so is just a piece of cake. But if you are a beginner, this could be a challenge. So, this article is going to explain how to import picture into LaTeX for those who are new to the LaTeX system.

How to insert picture into LaTeX document.

The power of LaTeX rests on numerous packages, which provides extended functionalities to the file for any requirement you might have. As for inserting image to TEX file, we need to use the “graphicx” package. This package is usually included in the basic installation of LaTeX distribution like MikTeX. If you are not sure about if the package is installed on your computer, you can check installed items by using “MikTeX package manager”.

Insert image to TEX file using TeXworks.

TeXworks is an environment used to open, edit and compile TEX files. This application sports a user-friendly interface where a wide array of tools you need for a workflow are easily accessible. There is a large and clean editing field for you to write and edit the content. It also comes with PDF viewing capability for you to view the file as you use a PDF reader. You can find this application in the installation folder of a TeX distribution such as MiKTeX or TeX Live.

Step 1.

Put the TEX file and the image in the same directory.

Step 2.

Open the TEX file with TeXworks.

Type the command line \usepackage{graphicx} above \begin {document}.

Type the command line\includegraphics{filename} between \begin{document} and \end{document}.

Step 3.

Go to “File”>”Save”.

Insert image to TEX file using Texmaker.

Texmaker is a LaTeX editor combing ease of use with a rich feature set. This program packed with a diverse collection of commands like\document class, usepackage{}, \beign{document}, \title,\author, \includegraphics{file}, \input{file}, and more. This makes the code wiring process much easier than usual. A graphic including function allows you to insert an image through a file browser like you do it in the MS Word processor.

Step 1.

Drag and drop the file onto the main window.

Or go to “File”>”Open” to open the file.

Step 2.

Ensure there is the command line \usepackage{graphicx} above \begin {document}.

Navigate the cursor to somewhere between \begin{document} and \end {document}.

Go to “LaTeX”>”\includegraphics{file}.

Click on the “browser” button in the dialog box to select the image.

Click on “OK”.

Step 3.

Click on “File”, then “Save”.

You might not believe your eyes but this is all you need to know to add a picture to the .tex file. Any alternative methods to handle this? Feel free to let me know.

Back To Top