ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Jan 2015 21:26:14 +0100Is there a way to insert a .png into a LaTex document?https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/ 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.Thu, 15 Jan 2015 03:50:34 +0100https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/Answer by noufalasharaf for <p>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?</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?answer=25529#post-id-25529you can do it by \includegraphics {name.png}Thu, 15 Jan 2015 13:31:16 +0100https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?answer=25529#post-id-25529Answer by dazedANDconfused for <p>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?</p>
<p>Thank you.</p>
https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?answer=25535#post-id-25535Assuming 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](https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics#Compiling_with_pdflatex).
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.Thu, 15 Jan 2015 16:56:38 +0100https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?answer=25535#post-id-25535Comment by kstd for <p>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}.</p>
<p>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
<a href="https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics#Compiling_with_pdflatex">here</a>.</p>
<p>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.</p>
https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?comment=25536#post-id-25536Thank you! I was using that command (which I should have mentioned), but I saved the image in the wrong place.Thu, 15 Jan 2015 21:26:14 +0100https://ask.sagemath.org/question/25523/is-there-a-way-to-insert-a-png-into-a-latex-document/?comment=25536#post-id-25536