Ask Your Question
1

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

asked 2015-01-15 03:50:34 +0100

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-01-15 13:31:16 +0100

noufalasharaf gravatar image

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

edit flag offensive delete link more
1

answered 2015-01-15 16:56:38 +0100

dazedANDconfused gravatar image

updated 2015-01-15 16:58:12 +0100

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.

edit flag offensive delete link more

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 ( 2015-01-15 21:26:14 +0100 )edit

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: 2015-01-15 03:50:34 +0100

Seen: 34,531 times

Last updated: Jan 15 '15