Adding Images to LaTeX from PDF Sources

In summary, the conversation is about finding the best way to import an image from a pdf source into a \LaTeX document. The speaker mentions using the Snapshot tool in Adobe reader and saving the image as a jpg, but is looking for better options. Suggestions include setting the snapshot tool at high resolution and saving in a lossless format, grabbing the source figure from a version of the paper on arxiv.org, or converting the pdf to ps and using tools to extract images. The speaker expresses gratitude and plans to try these suggestions in the morning.
  • #1
robousy
334
1
Hey folks,

I plan to use a figure from a paper (Hubble diagram for type 1a supernova demonstrating accelerated expansion).'

I'm want to put the image in a [tex]\LaTeX[/tex] document. Of course, I could use the Snapshot tool in Adobe reader and then grab the image and import into photoshop say then save as a jpg or something, but...

I want to ask if anyone knows any better ways to get an image from a pdf source into a latex file.

THANKS!
 
Physics news on Phys.org
  • #2
If you use the snapshot tool, make sure you set it at a high-resolution (or else view it at high resolution)... then save it (via pasting into an image editor) in a lossless format like .png or .gif. Note that you will get a raster image... with some (possibly tolerable) degradation.

Is there a version of the paper on arxiv.org ? If so, you could grab the source figure. If it was produced by (say) gnuplot or something, then the source figure is probably in a vector format, like .eps.

In your pdf, it may be possible to find the section in the pdf file corresponding to image... then inserting it (possibly as an .eps figure) in your paper. You would probably get the same level of quality as the original.

You might also try converting your pdf to ps (via ghostscript), then use some tools from (say) http://www.geocities.com/SiliconValley/5682/HeavyDuty.html to extract images.
 
  • #3
Ok, sounds like great information. I'll give it a try in the morning! Thanks a lot!
 

1. How do I add images to LaTeX from a PDF source?

To add images to LaTeX from a PDF source, you can use the \includegraphics command. This command allows you to specify the file name, location, and size of the image in your LaTeX document. You will also need to use the graphicx package in your preamble.

2. Can I resize the image when adding it to my LaTeX document?

Yes, you can resize the image when adding it to your LaTeX document using the \includegraphics command. You can specify the desired width and height of the image in your document using options such as width= or height=.

3. How do I ensure that the image is properly aligned within my document?

You can use the \centering command to center the image within your document. This command should be placed before the \includegraphics command in your LaTeX code. You can also use the \begin{figure} and \end{figure} tags to create a floating image that will be automatically aligned within your document.

4. Can I add multiple images in one line of code?

Yes, you can use the \includegraphics command multiple times in one line of code to add multiple images to your document. You can also use the subfig package to create subfigures within one floating environment.

5. What should I do if my image does not appear in my document?

If your image does not appear in your document, make sure that the file name and location are correct in your \includegraphics command. Also, check that you have properly loaded the graphicx package in your preamble. If the issue persists, try converting the image to a different file format and try again.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
34K
  • Computing and Technology
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
Replies
16
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
12K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Back
Top