Ask Your Question
1

Is there a way to insert a .png into a LaTex document?

asked 10 years ago

kstd gravatar image

I'm trying to insert a picture of a graph I made for a project I'm working on and I would like to insert it into my final Latex file. Is there a way to do this on sagemath?

Thank you.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 10 years ago

noufalasharaf gravatar image

you can do it by \includegraphics {name.png}

Preview: (hide)
link
1

answered 10 years ago

dazedANDconfused gravatar image

updated 10 years ago

Assuming sagemath means Sagemath Cloud, you can. First you need to put \usepackage{graphicx} in your preamble (before \begin{document}). Then you insert the picture as nousfalasharaf indicates: \includegraphics{picturename.png}.

Depending on how your picture was made, you might find your picture is too big/small. The \includegraphics command comes with options to help with the size, rotation, etc. The LaTeX wiki is a great reference to answer many questions. The section on including graphics and the various options is here.

Note (in the link above) that if you aren't using Sagemath Cloud to compile your document and the engine used is LaTeX, rather than pdfLaTeX, then it won't compile. It needs images as eps files.

Preview: (hide)
link

Comments

Thank you! I was using that command (which I should have mentioned), but I saved the image in the wrong place.

kstd gravatar imagekstd ( 10 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 10 years ago

Seen: 35,019 times

Last updated: Jan 15 '15