[OS X TeX] BBedit and LaTeX

Jason Davies ophiochos at gmail.com
Fri Apr 13 09:54:49 EDT 2007

```>I think in this case the applescript code assumes that TeXShop
>already has the document open, although it doesn't matter
>whether or not it is the front-most document. (If it isn't the
>front document, it is brought to the front after it is
>tell TeXShop to open the document before it attempts to compile
>it. I don't have time at the moment to figure out how to do that.

try this

tell application "BBEdit"
activate
save active document of text window 1
set texdatei to file of active document of text window 1
end tell

tell application "TeXShop"
activate
open texdatei

latex document of window 1
end tell

as far as I can see, BBEdit's support for TeX is currently
mostly the syntax colouring but I've found them interested (but
not expert) in adding stuff for TeX. Eg they just implemented
folding for \paragraph and \subparagraph (as they had for
chapter etc) when I sent them a detailed report.