[TxMt] Context Bundle

Robin Houston robin.houston at gmail.com
Sat Mar 17 15:13:44 UTC 2007


On 3/17/07, Paul Nakroshis <paulnakroshis at mac.com> wrote:
>
> The LaTeX bundle is very nice, though the ConTeXt bundle
> doesn't seem to have a way to typeset the resulting file (at least as
> far as I can see.) I have configured TeXShop to use Textmate as an
> external editor---this works, but it is not as nice as working solely
> in Textmate.


This is not quite an answer to your question, but when I'm using TextMate as
an external editor for TeXShop I find the following script very useful. I've
added it as a command to the LaTeX bundle, called "Typeset and view in
TeXShop", and I've assigned it to apple-T
(instead of the default typeset and view command).

It compiles the file in the background (i.e. without bringing TeXShop to the
front), and then activates TeXShop when the compilation is complete. (If
there's an error, you have to activate TeXShop yourself to see it: there
doesn't seem to be any easy way to automatically detect that's happened. I
suppose I could check whether the .log file has stayed the same for a couple
of seconds...)

I like this way of working: TextMate is a wonderful editor, but I prefer
TeXShop's console and PDF viewer.

Robin

FILENAME="$(basename "$TM_FILEPATH")"
osascript <<END &>/dev/null &
    tell application "TeXShop"
        open_for_externaleditor at "$TM_FILEPATH"
        tell document "$FILENAME"
        latexinteractive
             repeat
                delay 1
                if taskdone then
                    exit repeat
                end if
            end repeat
        end tell
        activate
    end tell
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070317/f929a2e0/attachment.html>


More information about the textmate mailing list