Feed on
Posts
Comments

to insert a figure in latex, try the following code:

\begin{figure}[h]
\begin{center}
\includegraphics[width=4in]{your_file.jpg}
\end{center}
\caption{your_caption}
\end{figure}

note that you can adjust the size of your figure using the width parameter; height should simultaneously scale proportionately.


Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

11 Responses to “how to insert a figure in latex”

  1. on 22 Oct 2008 at 2:39 am maria

    i googled how to insert a picture on latex and your website was the first hit. i just wanted to tell you that your website is so creative!!! i loved it! also that you and your girlfriend look so happy and you make a really nice couple.

  2. on 26 May 2009 at 9:01 pm Lucas

    Also, remember to add

    \usepackage{graphicx}

    at the top of the file

  3. on 05 Oct 2010 at 1:50 am Ankit Patel

    Dear,
    i use the format for figure insertation as:

    \begin{center}
    % Requires \usepackage{graphicx}
    \includegraphics[width=4in]{p1.jpg}\\
    \emph{Figure 1: Schematic Diagram of the experimental setup}
    \end{center}

    there will be an error at :
    \includegraphics[width=4in]{p1.jpg}\\

    please give me the right format.

    thanking you,

  4. on 05 Oct 2010 at 1:50 am Ankit Patel

    Dear,
    i use the format for figure insertation as:

    \begin{center}
    % Requires \usepackage{graphicx}
    \includegraphics[width=4in]{p1.jpg}\\
    \emph{Figure 1: Schematic Diagram of the experimental setup}
    \end{center}

    there will be an error at :
    \includegraphics[width=4in]{p1.jpg}\\

    please give me the right format.

    thanking you,

  5. on 13 Oct 2010 at 8:34 pm Faree

    I use the same syntax and get this error:

    ! Undefined control sequence
    1.75 \includegraphics
    [width=3in]{FS2004.jpg}\\
    ?

    What is this error? Everyone uses this code and it works. Am I missing something?

  6. on 15 Oct 2011 at 4:04 am gamage

    use packege \usepackage{graphicx}..
    code should be following manner

    \usepackage{graphicx}
    %should be just below the \documentclass{}

    begin{figure}

    \includegraphics[width=50pt]{image_name.jpg}
    % image should be same directry of save
    \caption{23}\label{23}
    \end{figure}

  7. on 13 Apr 2012 at 3:32 am sunali

    i am getting the path of the image along with the output

  8. on 06 Nov 2012 at 2:30 pm Bunakiye

    What about saving the .jpg, how do you save to include the graphics

  9. on 06 Nov 2012 at 2:31 pm Bunakiye

    How do I save the file to be found by latex when it is in the includegraphics

  10. on 06 Nov 2012 at 2:32 pm Bunakiye

    How do I get the path of the image

  11. on 15 Nov 2018 at 8:06 pm Ciara Hartert

    A lot of what you state happens to be supprisingly accurate and that makes me ponder the reason why I had not looked at this in this light previously. This particular article really did turn the light on for me personally as far as this subject goes. Nonetheless at this time there is 1 factor I am not necessarily too cozy with so while I try to reconcile that with the main idea of your issue, permit me observe what all the rest of the visitors have to point out.Nicely done.

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.