[TxMt] Re: Can't compile pdflatex; only latex

René Schwaiger sanssecours at f-m.fm
Fri Feb 27 18:46:04 UTC 2015


Hi Nick,

> On 27 Feb 2015, at 17:28 , Nick Eubank <nickeubank at gmail.com> wrote:
> 
> Hello Rene,
> 
> OK, after much toying, I think I found the problem (or rather, a solution) -- the presence of \include{epsfig} seems to be causing the issue.

thanks for taking the time to create the sample file!

> I'm not sure why -- it works fine when I compile in TeXShop -- but I don't need it at the moment, so I'm not going to worry about it.

`texmate` — aka “Typeset & View” — checks for packages which are only compatible with a certain tex engine. One of those packages is `epsfig`, which — in theory — is only compatible with `latex`.

`pdflatex` does not support eps files directly [1]. Newer versions of tex engines auto-convert eps files to PDF. So using epsfig with a middle-aged engine — like `pdflatex`— or one of the newer engines — like `lualatex`, or my personal favorite `xelatex` — should work. I think using the package `graphicx` instead of `epsfig` is the better option though. To cite a user from the linked StackExchange article [1]:

> pdflatex can not include eps files you need to convert it to pdf, also the epsfig package is for compatibility with LaTeX 2.09, don't use it unless your document was written in the 1980s use the graphicx package instead. –  David Carlisle

I removed `epsfig` from the packages that auto trigger a translation using `latex` in commit 610ee6ef [2]. The LaTeX bundle will be updated with the new code after Michael or Allan find the time to push out the changes.

[1]: http://tex.stackexchange.com/questions/115810/using-epsfig-gives-errors-in-kile-but-compiles-fine-using-pdflatex-in-terminal
[2]: https://github.com/textmate/latex.tmbundle/commit/610ee6ef0d6162249374a480c1209c1ddd46a955

> I also discovered that adding "%!TEX TS-program = pdflatex" to the head of the document (even if I leave in the \include{epsfig} command) solves the problem. 
> 
> Still, here's a working example that causes the problem in case you want to chase it down for other users. 
> 
> Thanks,
> 
> Nick

Thanks again for taking the time to hunt down the problem.

Kind regards,
  René


More information about the textmate mailing list