Hello all,
I use TextMate to create PDFs with LaTeX. I've configured TextMate to use pdflatex as the compile engine (TM_LATEX_COMPILER=pdflatex and the default engine in the LaTeX preferences is pdflatex too). That works fine.
Today I had to use for some reason the package epsfig and TextMate ran everytime latex instead of pdflatex. Finally I forced the use of pdflatex with the "%!TEX TS-program = pdflatex" directive in the tex file.
Is there an explanation for that behaviour and maybe a solution for that? (I found 3 postings here which are somehow related to that problem, but because I'm not an expert, I didn't get the clue, which might be in there.)
Thanks for your attention
Juergen
I havn't worked with pictures a lot in LaTeX, but in my opinion there are two ways to do this:
1) use eps-files and run latex->dvips/dvipdf 2) use jpg/png-files and run pdflatex
Pdflatex cannot work with eps grapics and latex just allows eps-files, as far as I know. For this reason TextMate will automatically use latex when including the epsfig package, I guess.
Ruben
Hi Ruben,
thanks a lot for your quick response.
Pdflatex cannot work with eps grapics and latex just allows eps-files, as far as I know. For this reason TextMate will automatically use latex when including the epsfig package, I guess.
Well, I can run pdflatex manually without problems on a tex file with epsfig included. That's why I'm wondering, why TextMate cannot use pdflatex, even if I configured it to do so.
Juergen
On Nov 16, 2007, at 1:45 AM, Juergen Arndt wrote:
Hi Ruben,
thanks a lot for your quick response.
Pdflatex cannot work with eps grapics and latex just allows eps- files, as far as I know. For this reason TextMate will automatically use latex when including the epsfig package, I guess.
Well, I can run pdflatex manually without problems on a tex file with epsfig included. That's why I'm wondering, why TextMate cannot use pdflatex, even if I configured it to do so.
I was under the impression, as Ruben points out, that epsfig would be used to include eps graphics, which won't compile properly under pdflatex, to the best of my knowledge. How do you use the epsfig package? Can you send the list or me a minimal example file of your use that:
1) Includes the epsfig package 2) Compiles fine with pdflatex from the command line 3) Will not compile fine if we replace the epsfig package with the graphicx package
Juergen
-- Juergen Arndt
Haris Skiadas Department of Mathematics and Computer Science Hanover College
I was under the impression, as Ruben points out, that epsfig would be used to include eps graphics, which won't compile properly under pdflatex, to the best of my knowledge. How do you use the epsfig package? Can you send the list or me a minimal example file of your use that:
- Includes the epsfig package
- Compiles fine with pdflatex from the command line
- Will not compile fine if we replace the epsfig package with the
graphicx package
Here is the minimal example:
\documentclass[]{article} \usepackage{epsfig}
\begin{document} \section{Introduction} \begin{figure}[htbp] \centering \includegraphics[height=3in]{Photo3.jpg} \caption{caption} \label{fig:Photo3} \end{figure} \end{document}
It compiles fine with pdflatex (and the result is as expected):
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./untitled.tex LaTeX2e <2003/12/01> ... (/sw/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/sw/share/texmf-dist/tex/latex/base/size10.clo)) (/sw/share/texmf-dist/tex/latex/graphics/epsfig.sty (/sw/share/texmf-dist/tex/latex/graphics/graphicx.sty (/sw/share/texmf-dist/tex/latex/graphics/keyval.sty) (/sw/share/texmf-dist/tex/latex/graphics/graphics.sty ... loading : Context Support Macros / PDF (2004.03.26) ) <Photo3.jpg, id=1, 642.4pt x 481.8pt> <use Photo3.jpg> [1{/sw/var/lib/texmf/f onts/map/pdftex/updmap/pdftex.map} <./Photo3.jpg>] (./untitled.aux)
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
)</sw/share/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></sw/share/texmf-dist/ fonts/type1/bluesky/cm/cmbx12.pfb> Output written on untitled.pdf (1 page, 86048 bytes). Transcript written on untitled.log.
While pasting the output to this mail I noticed, that the package graphicx is also loaded. And don't know why it's like that, but this could be the reason, why pdflatex compiles, even if only epsfig is included in the tex file.
This example of course also compiles fine, if only graphicx is included in the tex file. Unfortunately I cannot change epsfig to graphicx in my case, because several people work on this article and it's not up to me to change the configuration.
Juergen
Juergen wrote...
Well, I can run pdflatex manually without problems on a tex file with epsfig included. That's why I'm wondering, why TextMate cannot use pdflatex, even if I configured it to do so.
The engine that is used to compile you document is determined by the packages you use: "epsfig", which is an old package (and has been superseded by graphicx) usually indicates that the document is of 2.09 vintage, and will most likely require dvips to compile. At least I guess that's the logic behind the code in "TexMate.py" which decides which engine to use. I would imagine that trying to determine whether it's a modern document running a compatibility mode of an ancient package is going to get really old really quickly for the poor maintainer! I think it's time to convince your co-authors to shed their epsfig dependency and come into the 21st century! (Well, at least the 1990's...)
The example file you posted doesn't actually include an eps file, and if you try to compile it by simply substituting an eps file for the jpg you used it'll produce an error under pdflatex: "! LaTeX Error: Unknown graphics extension: .eps."
In short: using epsfig for inclusion of jpg's is, well, sufficiently funky/perverse that I wouldn't expect TextMate to bother trying to work out that it's *possible* to compile the thing under pdflatex.
Cheers, Paul
In short: using epsfig for inclusion of jpg's is, well, sufficiently funky/perverse that I wouldn't expect TextMate to bother trying to work out that it's *possible* to compile the thing under pdflatex.
Ok, I got the point. I will try to convince the coordinator of our project to exchange epsfig with graphicx. With your arguments it shouldn't be a big problem.
Thanks a lot for all your answers!
Juergen