Hi all-
Having trouble running the "new" TextMate bundle with a LaTeX file that worked via the old (or current, stable) bundle and (now) works on the command line. Here's a bit of the log:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2009.11.7) 6 AUG 2010 11:43 entering extended mode file:line:error style messages enabled. **"/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex" (/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex LaTeX2e <2009/09/24>
[clip...]
Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional ) /usr/local/texlive/2009/texmf-dist/tex/xelatex/fontspec/fontspec.sty:18:
- XeTeX is required to compile this document.
- Sorry!
********************************************. \RequireXeTeX ...********************************}
My document uses XeLaTex and has this as its first line:
%!TEX TS-program = xelatex
So I imagine my problem is that XeLaTeX isn't getting run.
My default engine in Preferences is "xelatex" so, being a noobie, I'm not sure what else to do to tell the bundle my desires.
Any help greatly appreciated!
Best wishes,
Charles
On 6 Aug 2010, at 18:08, Charles Turner wrote:
Having trouble running the "new" TextMate bundle with a LaTeX file that worked via the old [...]
My document uses XeLaTex and has this as its first line:
%!TEX TS-program = xelatex
So I imagine my problem is that XeLaTeX isn't getting run.
Indeed. The “new” LaTeX bundle does not support these %!TEX directives. It is more of a “cut down” (just the basics) LaTeX bundle.
On 6 Aug 2010, at 17:08, Charles Turner wrote:
Hi all-
Having trouble running the "new" TextMate bundle with a LaTeX file that worked via the old (or current, stable) bundle and (now) works on the command line. Here's a bit of the log:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2009.11.7) 6 AUG 2010 11:43 entering extended mode file:line:error style messages enabled. **"/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex" (/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex LaTeX2e <2009/09/24>
[clip...]
Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional ) /usr/local/texlive/2009/texmf-dist/tex/xelatex/fontspec/fontspec.sty:18:
- XeTeX is required to compile this document.
- Sorry!
********************************************. \RequireXeTeX ...********************************}
My document uses XeLaTex and has this as its first line:
%!TEX TS-program = xelatex
So I imagine my problem is that XeLaTeX isn't getting run.
The new LaTeX bundle is a bit rough around the edges. It doesn't support the %!TEX directives as Allan said, but it should though switch to xelatex automatically when it encounters fontspec). The following line of the Typeset & View command should achieve that:
ENV["TM_LATEX"] ||= (`grep -c fontspec #{ENV["TM_FILEPATH"]}`.to_i > 0 ? 'xelatex' : 'pdflatex')
My default engine in Preferences is "xelatex" so, being a noobie, I'm not sure what else to do to tell the bundle my desires.
The new bundle ignores the Preferences. Instead it makes use of environment variables, which are undocumented. It helps to browse through the code of the command to discover some of them. For example you can set TM_LATEX to specify the engine and TM_LATEX_FLAGS to specify custom flags (which overrides the default ones). As far as I know you can only set environment variables on a per file basis if they're part of a project though.
enas
On Aug 18, 2010, at 3:38 AM, enas wrote:
The new LaTeX bundle is a bit rough around the edges. It doesn't support the %!TEX directives as Allan said, but it should though switch to xelatex automatically when it encounters fontspec). The following line of the Typeset & View command should achieve that:
ENV["TM_LATEX"] ||= (`grep -c fontspec #{ENV["TM_FILEPATH"]}`.to_i > 0 ? 'xelatex' : 'pdflatex')
My default engine in Preferences is "xelatex" so, being a noobie, I'm not sure what else to do to tell the bundle my desires.
The new bundle ignores the Preferences. Instead it makes use of environment variables, which are undocumented. It helps to browse through the code of the command to discover some of them. For example you can set TM_LATEX to specify the engine and TM_LATEX_FLAGS to specify custom flags (which overrides the default ones). As far as I know you can only set environment variables on a per file basis if they're part of a project though.
All of Enas' information in this older post is very good, but my problem turned out to be much simpler: the LaTeX2 bundle doesn't like spaces in the TM_FILEPATH.
HTH, Charles