[OS X TeX] Mountain Lion, BBEdit, TexShop and Applescript

David Goldenberg goldenberg at biology.utah.edu
Tue Dec 31 01:43:42 CET 2013

    You're a hero!  This does, indeed, seem to work, and I am back in business without too much disruption of my ingrained habits.

Thanks again,

On Dec 29, 2013, at 6:24 PM, Michael Sharpe <msharpe at ucsd.edu> wrote:

> On Dec 29, 2013, at 1:57 PM, David Goldenberg <goldenberg at biology.utah.edu> wrote:
>> Michael,
>>   Thanks for your reply, and your work on Applescript for TexShop.  Unfortunately, a delay up to 100 didn't eliminate the error (thought it slow it down!), unless, like you, I turned off "configure external editor".  I'd prefer not to have the TexShop 
> editor window appear, as it just adds to the clutter and my confusion.
>> Thanks,
>> David
> Here's a small variant form that does seem to work with "configure external editor" checked, but "automatic preview update" unchecked.
> set TSLibAlias to alias ((path to home folder as string) & "Library:TeXShop:Scripts:TSLib.scpt")
> set TSLib to (load script TSLibAlias)
> tell application "BBEdit"
> 	save active document of text window 1
> 	set texFile to file of active document of text window 1
> 	set FILEPATH to (POSIX path of texFile) as string
> end tell
> tell TSLib to set {pdir, shortname, displayname} to docName(FILEPATH)
> set pdfname to shortname & ".pdf"
> tell application "TeXShop"
> 	try
> 		close window (pdfname)
> 	end try
> 	tell TSLib to opendoc(FILEPATH)
> 	activate
> 	delay 1
> 	latexinteractive document
> end tell
> Tested with only a few documents.
> Michael
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

Department of Biology
University of Utah
257 South 1400 East
Salt Lake City, UT  84112-0840

Telephone: (801) 581-3885
Fax:  (801) 581-2174

E-mail: goldenberg at biology.utah.edu
Lab web page: http://bioweb.biology.utah.edu/goldenberg

More information about the macostex-archives mailing list