TextMateのLaTeX bundleは,platex, uplatexをサポートしていない。また,デフォルトはpdflatexとなっている。自分が使いたいのは,uplatexなので,最小限の手間でこれが使えるようにした。実際には,ptex2pdf を使うことにした。これが uplatex, dvipdfmx を順に呼び出してPDFを作るので,pdflatexと同じというわけだ。
~/Library/Application Support/TextMate/Managed/Bundles/latex.tmbundle/Support/lib/Python/tmprefs.py を編集する。36行目からの
self.default_values = { 'latexAutoView': True, 'latexEngine': "pdflatex", 'latexEngineOptions': "", 'latexVerbose': False, 'latexUselatexmk': True, 'latexViewer': "TextMate", 'latexKeepLogWin': True, 'latexDebug': False, }
を次のように書き換えた。
self.default_values = { 'latexAutoView': True, 'latexEngine': "ptex2pdf", 'latexEngineOptions': '-u -l -ot "-synctex=1 -file-line-error -shell-escape"', 'latexVerbose': True, 'latexUselatexmk': False, 'latexViewer': "TextMate", 'latexKeepLogWin': True, 'latexDebug': False, }
ポイントは,デフォルトのlatexEngineをptex2pdfにして,デフォルトのlatexEngineOptionsを-u -l -ot “-synctex=1 -file-line-error -shell-escape” にしたこと。これで,とりあえずコンパイルできる。ただし,コンソールを見ると,冒頭部分に,
Multiple filename arguments? OK, I’ll take the latter one.
と出力されるので,良きに計らってはくれているものの,パラメーターが正しく渡されていないようだ。