Solving PSFRAG for PDFs in LaTeX

  • LaTeX
  • Thread starter xanmas
  • Start date
  • Tags
    Latex
In summary, the conversation discusses the issue of converting postscript files to pdf for a paper submission. The person is using gnuplot and psfrag to generate graphs with pretty latex fonts, but the journal they are submitting to only accepts pdf graphics. The person is asking for a solution or alternative to gnuplot that works on Mac OS. Another person suggests using Adobe Acrobat 8 to convert ps files to pdf and copy the graph from there.
  • #1
xanmas
4
0
Hi,

Let me preface my question by saying, I'm not sure if this is the right section but it seemed to be the most fitting. If it isn't, please move it, and I apologize for the inconvenience.

So the issue is that the professor that I am working with and I are getting ready to publish a paper. Well, I used gnuplot to generate the graphs and then imported them into the latex document and use psfrag to replace various parts of the postscript file with the pretty latex fonts. However, the journal of physical chemistry doesn't accept postscript files for graphics, they require it to be done as pdf graphics. The problem is that the psfrag package doesn't work with pdfs and I cannot find any such package to replace parts of the pdf to make use of the pretty latex fonts. If there is no easy solution, is there an alternative to gnuplot that works well on mac os?
 
Physics news on Phys.org
  • #2
Thread moved to Math & Science Software -- hopefully you'll get some good replies in here. Here is a comment from Astronuc:

Astronuc said:
We use Adobe Acrobat 8 to convert ps files to pdf. I also converts MS Word files to pdf. On can then copy the graph in the pdf file and paste it as some other format, e.g. bmp.

Welcome to the PF!
 
  • #3


As a fellow scientist, I understand the frustration of encountering compatibility issues when preparing a paper for publication. In this case, the best solution would be to find an alternative to psfrag that works with PDFs. There are a few options available, such as the pstool package or the pdfrack package, which can both be used to replace parts of a PDF with LaTeX fonts. You may also consider using a different plotting software that is compatible with PDFs, such as Matplotlib or R. It may take some extra effort to switch to a new software, but it will ensure that your graphics are accepted by the journal. I hope this helps and good luck with your publication.
 

1. What is PSFRAG and how does it relate to PDFs in LaTeX?

PSFRAG is a package used in LaTeX to incorporate PostScript graphics into PDF documents. It allows for the use of PostScript commands in LaTeX, which can be useful for creating complex graphics or mathematical equations.

2. How do I install and use PSFRAG in LaTeX?

To use PSFRAG in LaTeX, you must first install the package. This can typically be done through your LaTeX distribution's package manager. Once installed, you can use the \usepackage{psfrag} command in your document's preamble to load the package. Then, use the \psfrag command to replace text in your PostScript graphics with LaTeX code.

3. Can I use PSFRAG with any type of graphics in LaTeX?

No, PSFRAG can only be used with PostScript graphics. It cannot be used with other types of graphics such as JPEGs or PNGs. Additionally, the text replacements done by PSFRAG will only work with fonts that are available in both LaTeX and PostScript.

4. Are there any limitations or common issues when using PSFRAG in LaTeX?

One limitation of PSFRAG is that it cannot be used with graphics that are included in floating environments, such as figures or tables. Additionally, if the PostScript graphics file is not compatible with the PSFRAG package, the text replacements may not work properly.

5. Are there any alternatives to using PSFRAG in LaTeX?

Yes, there are a few alternatives to using PSFRAG in LaTeX. Some users prefer to use the graphicx package, which allows for the direct inclusion of graphics in LaTeX documents. Others may use TikZ, a graphics package that allows for the creation of graphics within LaTeX using code. However, for those who are comfortable with PostScript and want to incorporate it into their PDF documents, PSFRAG remains a popular option.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
393
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
797
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
20
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
11K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
997
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
Back
Top