Learn How to Easily Insert Images on LaTeX | Helpful Tips and Tricks

  • Context: LaTeX 
  • Thread starter Thread starter Juggler123
  • Start date Start date
  • Tags Tags
    Images Latex
Click For Summary

Discussion Overview

The discussion revolves around inserting images into LaTeX documents and troubleshooting errors related to double integrals in LaTeX syntax. It includes practical tips for formatting and common issues encountered by users.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant seeks assistance with inserting a .gif image into a LaTeX document, expressing confusion over the process.
  • Another participant suggests converting the .gif file to .pdf, .png, or .jpg and provides specific LaTeX commands to include the image, recommending the use of figures as floats.
  • A participant encounters an error while trying to write a double integral and questions the correctness of their syntax.
  • One participant points out that the correct command for the multiplication dot is cdots, while another asserts that cdot is also valid.
  • A later reply indicates that the error message is related to the iint command, which requires the amsmath package to be included in the LaTeX preamble.
  • Participants express frustration over persistent error messages despite following suggestions, indicating a lack of clarity on the underlying issues.

Areas of Agreement / Disagreement

Participants generally agree on the need for specific LaTeX packages for certain commands, but there is some contention regarding the correct usage of multiplication symbols and the source of error messages.

Contextual Notes

Some participants may not have included all necessary packages in their LaTeX documents, leading to undefined control sequence errors. There is also a potential misunderstanding regarding the syntax for double integrals.

Juggler123
Messages
80
Reaction score
0
Hi,
I know this isn't a general math problem but I didn't really know where else to post.
I'm trying to insert an image into a text I'm wrtting on LaTeX, the file is saved in .gif format in My Documents. I've read a little on the web about how I should insert the image into my text but I can't really make sense of it! Any help would be really great.
Thanks.
 
Physics news on Phys.org
First off, you are going to need to convert that .gif file into a form that your LaTeX engine understands: .pdf, .png, or .jpg (assuming you are using pdflatex as your engine). Copy the converted file to your document directory, aka folder. (You can also place it in subdirectory of your document directory.) I'm going to assume you named it imagefile.png. Substitute accordingly for your file name. Add a \usepackage{graphicx} directive to the header of your .tex file and a \includegraphics{imagefile} in the appropriate place of the body of your .tex file, and voila! there is your image in your pdf file.

It is almost certainly better to make your graphics figures (floats). Read up on how to place figures in your LaTeX file.
 
Thanks!
 
Got another problem now,
I'm trying to type a double integral into my work but it keeps coming up with an error message.

\begin{equation}
M(x)=\iint y\cdot\sigma(x,y) dy dz
\end{equation}

To me this looks right!? I don't understand what is going wrong.
Any help would be great!
 
The command is cdots, not cdot.
 
Tried that but I keep getting the same error message...
 
Works for me:

<br /> M(x)=\iint y\cdots\sigma(x,y) dy dz<br />So what is the error message?
 
cdot is a legit command and perhaps what the OP wants. It works on this board:

\begin{equation}<br /> M(x)=\iint y\cdot\sigma(x,y) dy dz<br /> \end{equation}<br />

On this board maybe he forgot the tex tags.
 
Thank you for this thread, I have been wanting do just this for some while.

:cool:
 
  • #10
LCKurtz; that's exactly what I want but even when I copy and paste the formula into my work it still comes up with this error meassge;

[2]
! Undefined control sequence.
l.80 M(x)=\iint
y\cdot\sigma(x,y) dy dz
?

This is starting to get annoying now! I just can't figure it out...
 
  • #11
That complaint is about iint, not cdot. iint is not part of the base LaTeX set of macros. It is defined in the amsmath package.

Add \usepackage{amsmath} to your prologue.
 
  • #12
Brilliant! Thankyou
 
  • #13
Juggler123 said:
Got another problem now,
I'm trying to type a double integral into my work but it keeps coming up with an error message.

\begin{equation}
M(x)=\iint y\cdot\sigma(x,y) dy dz
\end{equation}

To me this looks right!? I don't understand what is going wrong.
Any help would be great!
After surrounding the corrected equation with tex tags, here's how it looks:
\begin{equation}<br /> M(x)=\iint y \cdot \sigma(x,y) dy dz<br /> \end{equation}<br />

Edit: Didn't realize that I was restating what LCKurtz already said.
 
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
5K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K