Including graphics in LaTeX Help

  • Context: LaTeX 
  • Thread starter Thread starter *melinda*
  • Start date Start date
  • Tags Tags
    Graphics Latex
Click For Summary

Discussion Overview

The discussion revolves around the challenges of including graphics generated in Maple into a LaTeX document. Participants explore various technical aspects related to graphics packages, file formats, and error messages encountered during the process.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes their attempt to include a Maple-generated graph in LaTeX and reports receiving error messages.
  • Another suggests using the "graphicx" package instead of "graphics" and asks for the specific error messages encountered.
  • A different participant raises the possibility that the required graphics package might not be installed, specifically mentioning "psfig".
  • One participant shares the specific warning and error messages received, indicating that the .ps file was not found and that LaTeX does not recognize the .ps extension.
  • Another participant proposes using both "graphicx" and "ifvtex" packages to declare graphics extensions based on the TeX version.
  • There is a suggestion that the participant may need to use "encapsulated postscript" (.eps) files instead of .ps files, with links provided for further information.
  • One participant expresses confusion about the difference between .ps and .eps files and questions why LaTeX requires .eps files.
  • Another participant notes that the Maple export file is labeled as postscript and seeks clarification on compiling the document with specific commands like "dvips -Ppdf".
  • There is a request for clarification on the concept of the bounding box and how to use it.
  • A participant inquires about the version of TeX being used and the command for running LaTeX, emphasizing that different versions may handle graphics formats differently.

Areas of Agreement / Disagreement

Participants express various viewpoints on the necessary packages and file formats, with no consensus reached on the best approach to resolve the issues presented.

Contextual Notes

Participants mention potential limitations related to the installation of graphics packages and the specific commands required for compiling LaTeX documents, but these remain unresolved.

*melinda*
Messages
86
Reaction score
0
hi,

I'm trying to put a graph generated in maple into a latex document, but I have no experience using either program. So far I've been able to save my maple plot in postscript format, and based on various online tutorials I've included the \usepackage{graphics} comand after \documentclass{article}.

In the body of my document I put,

\begin{figure}[h]
\includegraphics{myfile.ps}
\end{figure}

but this is obviously wrong since all I get is a document with no graph and a whole lot of error messages.

Any help would be mucho appreciated!
:smile:
 
Physics news on Phys.org
It would help if you told us what the error messages are. If I remember correctly, "graphics" is an old package and you should use "graphicx". Maybe that will help?
 
You might not have the package installed. Do you know if you have psfig? http://ctan.org/tex-archive/nonfree/graphics/psfig/

(I probably can't help much if you are not using linux.)
 
Last edited by a moderator:
Latex gave me one warning and one error.

Latex warning: file 'myfile.ps' not found on line41
! Latex error: unknown graphics extention: .ps

I did use \usepackage{graphicx} in my document, I just typed it wrong in this thread.

And as far as having a graphics package instaled, I'm not sure. I downloaded latex from http://www.tug.org/protext/ and instaled all the required and suggested software.

How would I find out if I have the right graphics package?
 
There are other graphics packages that you must use to include .ps files...

\usepackage{graphicx}
\usepackage{ifvtex}
\ifvtex
\DeclareGraphicsExtensions{.ps}
\else
\DeclareGraphicsExtensions{.png}
\fi

might work at the beginning of the file...
 
It might be that you have to use "encapsulated postscript" .eps files
http://amath.colorado.edu/documentation/LaTeX/reference/figures.html
http://www.postscript.org/FAQs/language/node82.html
http://www.tm.uka.de/~bless/ps2eps

Maple should be able to export .eps.
 
Last edited:
I included all those commands, but I still got the same warning and error.

What's the difference between .ps and .eps and why would latex require me to use .eps?
 
Ok, I went into my maple worksheet and chose to export my graph as an .eps, but the file says that it is postscript. I'm also very confused by some of the instructions on the links. For example at

http://amath.colorado.edu/documentation/LaTeX/reference/figures.html

In the 'Only PostScript image' section they say, "Then you must compile the document with latex followed by dvips -Ppdf..." I don't understand what I'm being asked to do. What is 'dvips -Ppdf'? Is it a comand, and if it is, how am I supposed to issue it?

I'm also confused about the boundind box. I think I understand what it's used for, but I don't know how to use it.
 
  • #10
What version of TeX are you using? What command do you use to run LaTeX?

Different versions of TeX have different capabilities for handling graphics formats, so if we don't know those facts everybody is guessing.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 8 ·
Replies
8
Views
12K
  • · Replies 4 ·
Replies
4
Views
43K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K