Strange behaviour of Bibliography Completion and Label From Document commands accessed through option-esc. Description of the problem, and workaround based on my correspondence with Charilaos (Harris) Skiadas are below for archival purpose. Thanks Harris!
-- Working system
PowerPC G4, Mac OS X Version 10.4.8, TexMate Version 1.5.4 (1324), TexLive Full Installation (2006/11/07) [Tex (based upon TeX Live)] / MacTeX (10 November 2006)
-- Description of the problem
option-esc results in:
\footcite{sh: line 1: /usr/local/TeXLive/bin/i386-apple-darwin8.6.1/ kpsewhich: cannot execute binary file sh: line 1: /usr/local/teTeX/ bin/i386-apple-darwin8.6.1/kpsewhich: cannot execute binary file cite_key}
\ref{sh: line 1: /usr/local/TeXLive/bin/i386-apple-darwin8.8.1/ kpsewhich: cannot execute binary file sec:section_name}
\ref{sh: line 1: /usr/local/TeXLive/bin/i386-apple-darwin8.8.1/ kpsewhich: cannot execute binary file fig:label_name}
TeXLive and MacTeX installations modify /etc/profile, and set the path as: PATH="$PATH:/usr/local/TeXLive/bin/powerpc-apple-darwin-current", which is actually an alias for /usr/local/TeXLive/bin/powerpc-apple- darwin7.9.0/.
The scripts of both commands use first `which kpsewhich`, and only if that fails, `locate kpsewhich` to find out where kpsewhich lives.
Running the which kpsewhich command in the terminal returns: /usr/local/TeXLive/bin/powerpc-apple-darwin-current/kpsewhich
Running the locate kpsewhich command in the terminal returns: /usr/local/TeXLive/bin/i386-apple-darwin8.8.1/kpsewhich /usr/local/TeXLive/bin/powerpc-apple-darwin7.9.0/kpsewhich /usr/local/TeXLive/man/man1/kpsewhich.1 /usr/local/TeXLive/texmf.texlive/doc/man/man1/kpsewhich.1
The `which kpsewhich' command in both scripts fails -- according to my humble opinion, due to the fact that what is finds is not the actual file but an alias. Then `locate kpsewhich` points to the first kpsewhich it finds on the system, which is an intel binary. Thus it declares "[...] cannot execute binary file". (If you have the Basic Installation of TeXLive, which does not come with intel binaries, it will declare "[...] cannot find binary file".)
-- Workaround
Bibliograpyh Completion, and Label From Document commands are based on the following scripts: LatexCitekeys.rb, and LatexLabelCompletions.rb. Both of them live in /Applications/ TextMate.app/Contents/SharedSupport/Support/bin. Edit both scripts, replacing the following loop -- lines 51-55, and 11-15, respectively:
if `which kpsewhich`.match(/^no kpsewhich/) then kpsewhich = `locate kpsewhich`.split("\n").grep(/kpsewhich$/)[0] else kpsewhich = "kpsewhich" end
with a statement indicating the correct path to the powerpc kpsewhich binary.
kpsewhich = "/usr/local/TeXLive/bin/powerpc-apple-darwin-current/ kpsewhich" or kpsewhich = "/usr/local/TeXLive/bin/powerpc-apple-darwin7.9.0/kpsewhich" should both work.
Check your /etc/profile or better run "echo $PATH" in the terminal to confirm your path.
-- Özgür Gökmen | og@pyromedia.org
Hello,
you are aware of the fact that:
Am 17. Nov 2006 um 14:32 schrieb Özgür Gökmen:
-- Working system
PowerPC G4,
and
-- Description of the problem
option-esc results in:
\footcite{sh: line 1: /usr/local/TeXLive/bin/i386-apple-darwin8.6.1/ kpsewhich: cannot execute binary file sh: line 1: /usr/local/teTeX/ bin/i386-apple-darwin8.6.1/kpsewhich: cannot execute binary file cite_key}
the "i386"-part of your error message indicate that you have installed or at least activated the intel version of LaTeX?!
Dan
Dan, I believe you haven't read the whole mail. The Full Installation of TeXLive, or a default installation of MacTeX in that matter, come with binaries for both architectures. Although the Basic Installation of TeXLive is enough, you need the Full Installation if you want access to the documentation. Besides, even with a Basic Installation of TeXLive, which does not come with intel binaries, the script looks for the intel version of kpsewhich, and declares that it cannot find the binary file. So the issue is not related to the TeX installation, but to the dynamics of those particular scripts. Özgür
-- Özgür Gökmen | og@pyromedia.org
On Nov 17 , 2006, at 2:46 PM, Daniel Käsmayr wrote:
Hello,
you are aware of the fact that:
Am 17. Nov 2006 um 14:32 schrieb Özgür Gökmen:
-- Working system
PowerPC G4,
and
-- Description of the problem
option-esc results in:
\footcite{sh: line 1: /usr/local/TeXLive/bin/i386-apple- darwin8.6.1/kpsewhich: cannot execute binary file sh: line 1: /usr/ local/teTeX/bin/i386-apple-darwin8.6.1/kpsewhich: cannot execute binary file cite_key}
the "i386"-part of your error message indicate that you have installed or at least activated the intel version of LaTeX?!
Dan ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For archival purpose. The problem seems to occur only in those systems with both PowerPC and Intel binaries installed. No need to tinker the scripts, setting the PATH variable properly does the trick. See: http://macromates.com/textmate/manual/shell_commands#search_path Create a TextMate shell variable called PATH. Run "echo $PATH" in terminal. Put the result in the shell variable as value. Thanks to Harris and Allan. -- Özgür Gökmen | og@pyromedia.org