[OS X TeX] TeXShop's Insert Reference macro and Lion
Herbert Schulz
herbs at wideopenwest.com
Thu Jan 19 03:00:55 CET 2012
On Jan 18, 2012, at 6:36 PM, Gary L. Gray wrote:
> On Jan 18, 2012, at 1:24 PM, Michael Sharpe wrote:
>
>> On Jan 18, 2012, at 8:04 AM, Herbert Schulz wrote:
>>
>>> Howdy,
>>>
>>> Is there any TeXShop user with Applescript experience out there who is willing to get TeXShop's Insert Reference macro operating under Mac OS X 10.7 (Lion)? There has been a request for that on the TeXShop Forum.
>>>
>>> Good Luck,
>>>
>>> Herb Schulz
>>> (herbs at wideopenwest dot com)
>>>
>>
>> I believe I've fixed the file---available as a zip at
>>
>> http://math.ucsd.edu/~msharpe/InsertReference.zip
>>
>> I changed:
>> 1. Applescript to Applescript direct so that messages appear without activating.
>> 2. Changed the tell application "TeXShop" scopes.
>> 3. Made use of the builtin ## variables
>> 4. (Most critical) Changed 'front document' to 'document docname'
>>
>> I think some of the problems may due to changes in the TeXShop dictionary rather than Lion.
>
> Thanks Michael. I tried fixing this problem under Lion, but didn't have much luck.
>
> Unfortunately, I am not able to get your fix to work, though I may not be implementing it correctly. Here is what I did.
>
> (1) Downloaded and unzipped InsertReference.zip.
>
> (2) Opened the resulting .plist file and copied everything from
>
> --Applescript direct
>
> which occurs immediately after <string> down to the
>
> end if
>
> which occurs two lines before </string>
>
> (3) I then opened the Macro Editor in TeXShop, selected the Insert reference macro, selected all the text in the Content field, and pasted the text I copied from the .plist file.
>
> When I then try and execute the macro, I get:
>
> Expected end of line, etc. but found unknown token.
>
> Am I doing something wrong?
>
> Thank you.
>
> Gary
Howdy,
You did it incorrectly. The macro has some characters that aren't allowed in plist (i.e., xml) files directly so what you copied had some translated items.
The way to do it is to Open TeXShop and execute the Macros->Open Macro Editor… menu command. Once the Editor is open you and look under the Macros menu and there are two new items one of which is Macros->Add macros from file… . Choose that command and work your way to the plist file and select that and open it. The macro, with its name and keyboard shortcut will be added to the bottom of the list of macros in the left hand pane. You can then grab it and move it anywhere you wish and also change the shortcut.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the macostex-archives
mailing list