[OS X TeX] BBedit and LaTeX

Thomas Rike tricycle222 at earthlink.net
Fri Apr 13 16:00:18 CEST 2007


Richard,
Thank you very much. Now that I open the file ahead of time in  
TeXShop, the script works just as advertised. Has anyone written a  
beginners guide to writing applescripts with lots of working examples  
to learn from?  Thanks again.
Tom Rike
On Apr 13, 2007, at 5:43 AM, Richard Seguin wrote:

> 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 compiled.)  
> Additional code would have to be added in order to 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.
>
> Richard Séguin
>
> On Apr 12, 2007, at 11:01 PM, Thomas Rike wrote:
>
>> I don't know how to write an Applescript, but I copied and pasted  
>> the one provided, compliled it, and saved it to the  
>> ApplicationsSupport  BBedit folder and get the following error  
>> when trying to run it. After the last command TeXShop opens and I  
>> get:
>>
>> TeXShop got an error: NSReceiverEvaluationScriptError:4
>>
>> It can't seem to find the file. Any ideas on how I can help  
>> TeXShop find it.
>>
>> Thanks, Tom Rike
>>
>> On Apr 12, 2007, at 7:30 PM, Richard Seguin wrote:
>>
>>>
>>> On Apr 12, 2007, at 6:50 PM, David Goldenberg wrote:
>>>
>>>> Hi,
>>>>    I was wondering if anyone could point me to information about  
>>>> using the new version of BBedit (8.6) with LaTeX.  The company  
>>>> web page indicates that the new version has lots of new tex- 
>>>> related features, but there isn't much documentation for them.
>>>>     I would be particularly interested in suggestions for  
>>>> setting up scripts to make it easy to process and view LaTeX  
>>>> files from BBedit.
>>>>
>>>> Thanks,
>>>> David Goldenberg
>>>
>>> David,
>>>
>>> The current 8.6.1 version has a little bug with LaTeX syntax  
>>> coloring, but the latest beta version for 8.6.2 has fixed that  
>>> problem. I can't say for sure when 8.6.2 will be out because I  
>>> don't work for the company, but I imagine it won't be long.
>>>
>>> You can download a demo copy.
>>>
>>> BBEdit has extensive applescript hooks, and TeXShop isn't bad  
>>> either in that respect.
>>>
>>> Here's an applescript that tells BBEdit to save its front  
>>> document and then tells TeXShop to compile it to PDF:
>>>
>>> tell application "BBEdit"
>>> 	set fileName to (file of text window 1) as text
>>> end tell
>>> set unixname to POSIX path of fileName
>>> set oldDelimiters to AppleScript's text item delimiters
>>> set AppleScript's text item delimiters to "/"
>>> -- pull the path out as a string and strip off the filename
>>> set pathText to unixname
>>> set pathList to (text items of pathText)
>>> set docName to last item of pathList
>>> set AppleScript's text item delimiters to oldDelimiters
>>> tell application "BBEdit"
>>> 	save text document docName
>>> end tell
>>> tell document docName of application "TeXShop"
>>> 	activate
>>> 	latexinteractive
>>> end tell
>>>
>>> Richard Séguin
>>> ------------------------- Helpful Info -------------------------
>>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>> TeX FAQ: http://www.tex.ac.uk/faq
>>> List Archive: http://tug.org/pipermail/macostex-archives/
>>> List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
>>>
>>>
>>
>>
>> ------------------------- Helpful Info -------------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
>>
>>
>
>
> ------------------------- Helpful Info -------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
> List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
>
>

Thomas Rike
Oakland High School Mathematics Department(Ret.)
1023 MacArthur Blvd.
Oakland, CA 94610
Phone: 510-879-3040 (ext 216)
FAX: 510-879-3049




------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list