There seems to be a bug in the LaTeX bundle's reference/citation auto-complete for my specific set-up.
I'm fairly sure I've fixed it (though its possible this is not the best / most generic method) so I'll try to describe my problem / situation:
In my project I have a master .tex document, and several other .tex files (each with something like the following line as their first line):
The file that it claims does not exist definitely exists, but in the error message that was output in my document, there was a diamond character immediately after "thesis.tex", visible because i have the "Show Invisibles" TextMate setting enabled.
I copied the text including the diamond character and pasted it into a web-based ascii-to-hex converter (
http://centricle.com/tools/ascii-hex/) and it seems to be the character %0A, i.e. the Line Feed or new line character (\n), suggesting the script is erroneously including the \n as part of the TEX root filename property.
- I've checked the document in TextMate with Show Invisibles on and cannot see any extra characters
- I've also tried deleting the line and typing it out again
- I've tried using absolute and relative paths for the root document property
None of these solved the problem (and none had any detrimental effect after I'd fixed it as described below).
I've fixed the problem by editing the script:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/LaTeX.tmbundle/Support/lib/LaTeXUtils.rb
and changing line 42 from: