[OS X TeX] O no, not this again - fonts

Richard Seguin riseguin at earthlink.net
Mon Nov 15 04:01:18 CET 2004


On Nov 14, 2004, at 5:01 AM, Jason Davies wrote:

>> 1. I have bought BBEdit. Now I try to learn using it (I have never
>> imagined before that an apparently simple program like an editor could
>> be complicated in this way.) But I don´t succeed in telling BBEdit to
>> work with TeX.
>
>
> firstly join the BBEdit list for general help - you have a very 
> powerful
> program there! They will be helpful to a newcomer.
>
> <http://www.barebones.com/support/lists/bbedit_talk.shtml>
>
>
> secosdly, I use BBEbit with TeXshop via this script (originally posted
> here at my request)
>
> 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
> end tell
>
> f it's a new document it will prompt you for a name - make sure you add
> the suffix 'tex'.
> Tell Texshop to use an external text editor in the preferences, assign 
> a
> keyboard shortcut to it (via the Scripts Palette in BBEdit) and you're
> away. I am sure iTeXMac will also do it.
>
> There are other possibilities - it depends what you want to do. But 
> that
> works nicely for me.
>

This is the Applescript that I've cobbled together from several sources 
in order to initiate typesetting in TeXShop from BBEdit:

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 "/"
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
	typesetinteractive
end tell

It assumes that TeXShop already has opened the document in question, 
but the document to be typeset need not be the front document in 
TeXShop. I don't know if it can be made more efficient than this.

Richard Séguin


--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list