[TxMt] Re: TextMate 2 + LaTeX == 'Error: Could not open to check for packages'

Allan Odgaard mailinglist at textmate.org
Fri Feb 14 01:07:05 UTC 2014

On 14 Feb 2014, at 6:53, Florian Jug wrote:

> I am using:
> - OSX 10.9 (latest updates installed)
> - TeXLive 2009 (now also 2013)
> - latest LaTeX bundle (reinstalled just before)

Generally there is no need to manually install bundles (that are listed 
in Preferences → Bundles), on the contrary; TextMate keeps things 
updated, and if you start to manually install things, you will eclipse 
automatic updates (and might soon end up with a stale bundle).

> […] "Error: Could not open to check for packages."
> And in a second line it continues: "This is most likely a problem with 

Looking at the LaTeX bundle, this error seems to be because it fails to 
obtain your document’s file name by running:

     kpsewhich -progname="pdflatex" «document»

Here «document» should be your document unless you have set 
TM_LATEX_MASTER (or are perhaps using some %iTeX directive), which is 
why the bundle suggests it might be an issue with TM_LATEX_MASTER.

But it could probably also be an issue with kpsewhich.

Above you mention both TeXLive 2009 and 2013. I think we’ve had users 
install one, then update it, and afterward the LaTeX environment was 
broken for TextMate.

> Some more info:
> - I do try to compile a simple file, no includes or imports... So I 
> guess I
> do not need TM_LATEX_MASTER, do I?

You do not. This is only if you have multiple .tex files and want to 
designate one of them the “master”, i.e. the one to typeset, 
regardless of what file is the current one.

> If anybody has ANY idea what the most likely totally braindead and 
> stupid
> thing is that I do not see...

In a terminal run:

     which kpsewhich

And also try to run:

     kpsewhich -progname="pdflatex" /path/to/document.tex

More information about the textmate mailing list