Hello,
I have just installed the latest security update on my Mac (10.10.2) and some commands in my latex bundle were broken by it. For example, I have a script (below) that opens a terminal window and typesets the master file, but after the security update the command no longer tries to typeset the master file, but the subfile, and hence typesetting fails. I am sure is is the Mac OS security update that led to the failure, because I tried on two Macs with the same behaviour.
Thanks for any help you may offer
Geoff
--------
#!/usr/bin/env bash [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
TM_LATEX_MASTER=`${TM_RUBY:-ruby} <<"RUBY" require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb" require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"
master = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH']) puts master RUBY`
FILE=${TM_LATEX_MASTER:-$TM_FILEPATH} cd ${TM_DIRECTORY}
open -a iterm
/Users/gkv/scripts/iterm "time /usr/texbin/pdflatex -synctex=1 ${FILE%.tex}"
--------
Hi Geoff,
On 23 Mar 2015, at 21:02 , Geoff Vallis gkvallis@gmail.com wrote:
Hello,
I have just installed the latest security update on my Mac (10.10.2) and some commands in my latex bundle were broken by it. For example, I have a script (below) that opens a terminal window and typesets the master file, but after the security update the command no longer tries to typeset the master file, but the subfile, and hence typesetting fails. I am sure is is the Mac OS security update that led to the failure, because I tried on two Macs with the same behaviour.
Thanks for any help you may offer
Geoff
#!/usr/bin/env bash [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
TM_LATEX_MASTER=`${TM_RUBY:-ruby} <<"RUBY" require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb" require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"
master = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH']) puts master RUBY`
FILE=${TM_LATEX_MASTER:-$TM_FILEPATH} cd ${TM_DIRECTORY}
open -a iterm
/Users/gkv/scripts/iterm "time /usr/texbin/pdflatex -synctex=1 ${FILE%.tex}"
————
recently I updated the code for `LaTeXUtils.rb`. One of the “minor changes” was an update of the name from `LaTeXUtils.rb` to `latex.rb` [1]. Your script should work fine if you replace `LaTeXUtils.rb` with `latex.rb`. Sorry for the inconvenience. May I ask why don't use “Typeset & View (PDF)” to translate tex files?
Kind regards, René
[1]: https://github.com/textmate/latex.tmbundle/commit/de963f34e6a94f73c76665091f...
Hi Ren,
Your fix did the trick, thanks very much.
The reasons I don't use 'typeset and view' are twofold. The main one is just that it is a bit slow - I have to wait almost five seconds before it actually starts to typeset, which may not seem very long but when I am 'debugging' it is a little frustrating. Using a terminal window the typesetting starts instantly. The second reason is that I can go back and forth between xelatex and pdflatex easily by setting up two scripts with different keyboard shortcuts, which I find quite convenient. I know there are some advantages to 'typeset and view' and if it were a bit quicker, like the equivalent command in TexShop which is quite fast, I would use it.
Thanks again Geoff
Date: Mon, 23 Mar 2015 21:24:45 +0100 From: Ren? Schwaiger sanssecours@f-m.fm To: TextMate users textmate@lists.macromates.com Subject: [TxMt] Re: Latex command fail following new security update Message-ID: 276A6D88-5D56-491B-85C5-EB12FEB8100D@f-m.fm Content-Type: text/plain; charset=utf-8 Hi Geoff,
On 23 Mar 2015, at 21:02 , Geoff Vallis gkvallis@gmail.com wrote:
Hello,
I have just installed the latest security update on my Mac (10.10.2) and some commands in my latex bundle were broken by it. For example, I have a script (below) that opens a terminal window and typesets the master file, but after the security update the command no longer tries to typeset the master file, but the subfile, and hence typesetting fails. I am sure is is the Mac OS security update that led to the failure, because I tried on two Macs with the same behaviour.
Thanks for any help you may offer
Geoff
#!/usr/bin/env bash [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
TM_LATEX_MASTER=`${TM_RUBY:-ruby} <<"RUBY" require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb" require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"
master = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH']) puts master RUBY`
FILE=${TM_LATEX_MASTER:-$TM_FILEPATH} cd ${TM_DIRECTORY}
open -a iterm
/Users/gkv/scripts/iterm "time /usr/texbin/pdflatex -synctex=1 ${FILE%.tex}"
????
recently I updated the code for `LaTeXUtils.rb`. One of the ?minor changes? was an update of the name from `LaTeXUtils.rb` to `latex.rb` [1]. Your script should work fine if you replace `LaTeXUtils.rb` with `latex.rb`. Sorry for the inconvenience. May I ask why don't use ?Typeset & View (PDF)? to translate tex files?
Kind regards, Ren?
–––
Hi Geoff,
On 24 Mar 2015, at 13:32 , Geoff Vallis gkvallis@gmail.com wrote:
Hi Ren,
Your fix did the trick, thanks very much.
The reasons I don't use 'typeset and view' are twofold. The main one is just that it is a bit slow - I have to wait almost five seconds before it actually starts to typeset, which may not seem very long but when I am 'debugging' it is a little frustrating. Using a terminal window the typesetting starts instantly.
Commit 39b09967 [1] should improve the startup time of `texmate` significantly.
[1]: https://github.com/textmate/latex.tmbundle/commit/39b09967
I get an overhead of less than 0.3s if I use `texmate` on a minimal file. The translation of the minimal file inside Terminal using the command `time pdflatex tmp.tex` takes 0.55s. The following command — basically simulating a run of “Typeset & View (PDF)” — inside TextMate takes about 0.79s:
— #!/usr/bin/env bash
BUNDLE_DIR="$HOME/Library/Application Support/Avian/Bundles/LaTeX.tmbundle" TM_BUNDLE_DIR="$HOME/Library/Application Support/TextMate/Managed/Bundles"
export TM_FILEPATH="tmp.tex" export TM_SUPPORT_PATH="$TM_BUNDLE_DIR/Bundle Support.tmbundle/Support/shared" export TM_BUNDLE_SUPPORT="$BUNDLE_DIR/Support" export PATH="$BUNDLE_DIR/Support/bin":$PATH export TM_SELECTION='1:1'
texmate.py -suppressview latex -latexmk no -engine pdflatex —
tmp.tex: — \documentclass{article}
\begin{document} Bla \end{document} —
Could you maybe test the above example and send in your results. If it takes multiples seconds before `texmate` starts typesetting, then maybe your local copy of the bundle does not contain the changes done in commit 5074427f [2]?
[2]: https://github.com/textmate/latex.tmbundle/commit/5074427f
The second reason is that I can go back and forth between xelatex and pdflatex easily by setting up two scripts with different keyboard shortcuts, which I find quite convenient.
You can change the typesetting engine used by “Typeset & View (PDF)” with the following commands:
defaults write com.macromates.textmate.preview latexEngine xelatex defaults write com.macromates.textmate.preview latexEngine pdflatex
I know there are some advantages to 'typeset and view' and if it were a bit quicker, like the equivalent command in TexShop which is quite fast, I would use it.
Hopefully the latest changes help.
Thanks again Geoff
Kind regards, René