Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am a newbie in Latex and I am using TexEditor for using LaTeX and then converting my document into PDF. The issue that I have is that I want to include some math plots in my document.

Now, the program that I am using for capturing the plots can only store the graphic in: jpeg, bmp or gif. I have read that for not having lose of quality in my final document I should store it in eps format, is that right?

So in which format should I store the initial graph, in jpeg, bmp or gif? after that, what can I do? convert it by some online tool like http://image.online-convert.com/convert-to-eps or using Adobe Photoshop?

Things to consider

  • I am using Windows 7
  • The graph is obtained by a math program, that program does not allow the conversion to pdf directly, and only can save it in the three formats I mentioned before
share|improve this question
3  
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Henri Menke Jun 15 '13 at 13:00
    
If you are using a piece of software like Mathematica, Maple, Sage, Matlab or so... they can export your plots to PDF directly. However, if it's not the case, but you're a Linux user, by installing imagemagic you can convert figures using the sentence convert image01.png image01.pdf (assuming you're standing on the folder with your image file and it's named image01) –  Dox Jun 15 '13 at 13:06
1  
@Dox ImageMagik is limited in what it can so; see my answer. Manuel, it would be beat to edit into your question which software you are using to generate the graph. There may be another conversion that doesn't involve images, for example. (I can imagine software that can generate picture or tikz code, for example.) –  Sean Allred Jun 15 '13 at 14:12
add comment

4 Answers

Remarks

Apparently you are wanting to include a raster image format into your document. Of course, vector formats are preferred for such tasks, as including plots.

Using raster graphics formats

Nevertheless, you can find a comparison of various image compression formats here: http://www.aivosto.com/vbtips/imageformats.html

Personally I don't think, that bmp is a good choice, as it doesn't offer any compression, any your files tend to get huge.

jpeg offers a higher color range, than gif, while gif supports transparency.

Prospects

If you have any possibility to save your raster graphics as png, do so, because this format is more recent and isn't protected by any patents.

I don't know, what kind of plotting program you are using, but try to find an option, that allows export to a vector format, such as pdf, ps or eps. Your images will be much smaller and invariant under scaling.

share|improve this answer
add comment

Vector graphics, such as eps, certainly is much better than bitmaps such as jpg. However, instead of creating plots in a bitmap which would then be converted to eps, I would suggest using a tool that creates eps files directly - such as gnuplot or GLE. It might take a while to learn to use them but at the end it is easier than converting everything. Plus these programs have some nice features that you might find useful as well.

share|improve this answer
    
thanks, but the problem is that the original graph is generated by a math program, so the only think that I can do is to take the screenshot –  Manuel Jun 15 '13 at 13:06
    
@Manuel You can also check documentation to your math program. I think it should be possible to export the plot directly (ideally as eps), or you can save the data in a text file and use them for plotting in some other program, such as GLE or gnuplot I suggested. –  Ondřej Černotík Jun 15 '13 at 13:11
    
thanks for you reply, I have check it. Unfortunately it does not have any other options apart of the ones I mentioned –  Manuel Jun 15 '13 at 13:13
2  
@manuel What math program are you using? –  Dox Jun 15 '13 at 13:28
add comment

Compiling with pdflatex accept jpg or png files as figures. Try to compile that way intead of going from tex->dvi->pdf.

share|improve this answer
add comment

It's not really possible to convert a jpeg or gig or png (or any raster format) onto a vector, such as PDF or EPS. It's a really big task in CS -- one that a lot of people are noodling -- but there are no good solutions. All that usually happens, with PDF for example, is inclusion in the document as-is; if you don't have access to a truly vector copy, there's no detriment to just including the image in your LaTeX document (as pdfLaTeX, included in virtually every distribution, can take the formats you mention, and raster formats in general are supported by many conversion options).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.