I'm having trouble with the LaTeX bundle. In the preferences, I select pdflatex, but when I command-R, it appears to be using latex and produces errors. In the "Typeset & View" window, the button always says "Re-Run latex," never "Re-Run pdflatex" as it used to.
I'm using TM Version 1.5.9 (1589).
Any ideas?
Jim
I have since messed with TM enough that pdflatex is now executing with command-R but the latexmk.pl doesn't seem to detect changes in the source files. Is it possible the latexmk.pl is corrupt? If so, how do I restore the original version.
Any help would be appreciated.
Jim LaGrone <jlagrone86@...> writes:
I'm having trouble with the LaTeX bundle. In the preferences, I select
pdflatex, but when I command-R, it appears to be using latex and produces errors. In the "Typeset & View" window, the button always says "Re-Run latex," never "Re-Run pdflatex" as it used to.I'm using TM Version 1.5.9 (1589).Any ideas?Jim
I'm seeing the same thing. I use xelatex, and "Typeset & View" now insists on using just latex. In attempting to troubleshoot this, I have completely removed all traces of TextMate (the app, /Library/Application Support/Textmate, ~/Library/Application Support/Textmate, and prefs from /Library/Preferences), and reinstalled from scratch. So I'm up-to-date with build 1589, and I'm using the default Latex.tmbundle. I'm also using MacTex 2009, and have added /usr/texbin to my PATH within TextMate (current path is: /usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin). I should also mention that I'm on 10.6.2.
Anyone have any suggestions on how to fix this?
As often happens in online forums, I discover a solution after I've posted a request for help. The problem is in texMate.py.
/Applications/TextMate.app/Contents/SharedSupport/Bundles/ LaTeX.tmbundle/Support/bin/texMate.py
It tries to be smart and pick the right TeX engine based on presence of a select few packages in the contents of the file. Only if this fails does it use the user's preference. Not only that, if it passes the test for 'latex' it does not even try to check for xelatex.
For example, if I include the packages pstricks and fontspec, texMate.py will see pstricks and immediately choose to use latex, which subsequently dies when fontspec (a xelatex package) is encountered. Take out pstricks, and it will use xelatex.
This heuristic looks pretty broken to me. The preference setting should always take precedence. If we want to keep this dubious auto-detection code, we should add 'auto-detect' to the list of engines in preferences and only do the auto-detection if this is the selected preference.
Thoughts?
On 4 Jan 2010, at 21:33, David Whetstone wrote:
This heuristic looks pretty broken to me. The preference setting should always take precedence.
I second that.
I remember I posted some time ago with the exact same suggestion, and that's indeed how I modified the script for myself.
The case arose for me when using pdftricks, which allows to process pstricks commands using pdflatex, and texMate.py stubbornly wanted to process my file with latex. I do consider too this behaviour to be flawed.
enas
On Jan 5, 2010, at 2:40 AM, enas wrote:
On 4 Jan 2010, at 21:33, David Whetstone wrote:
This heuristic looks pretty broken to me. The preference setting should always take precedence.
I second that.
I remember I posted some time ago with the exact same suggestion, and that's indeed how I modified the script for myself.
You could submit a patch. ;)
—Alex
On 5 Jan 2010, at 20:14, Alex Ross wrote:
On Jan 5, 2010, at 2:40 AM, enas wrote:
I remember I posted some time ago with the exact same suggestion, and that's indeed how I modified the script for myself.
You could submit a patch. ;)
Well I just crudely commented out the relevant sections :)
I agree though with the first poster that a nice option would be that the latex bundle preferences give the option of turning on or off the autodetect feature. I would happily patch the bundle accordingly, but that's beyond my capabilities/time available at the moment I'm afraid...
enas