[OS X TeX] Re: kpsewhich and TeXShop

Aaron Rendahl rendahla at gmail.com
Mon Jan 7 15:38:02 EST 2008


> At 1:28 PM -0600 1/6/08, Aaron Rendahl wrote:
>> On comp.tex.text the following script was
>> recommended to me for easily viewing sty and cls
>> files within packages:
>>
>> #!/bin/sh
>> emacs -f toggle-read-only `kpsewhich $*`  &
>>
>> Is there a way to modify it to open the file in TeXShop instead of  
>> emacs?

Thanks to all for your helpful suggestions.

Herb, you did guess that I was trying to find and open the source  
file to various packages, sorry I wasn't clearer.  I tried the Open  
Selection macro in TeXShopKit.zip from <http://homepage.mac.com/ 
herbs2/>, and it worked great, thanks so much.  This is the solution  
I'm going to use.

Thanks to others for suggesting this script which does exactly what I  
was looking for.
	#!/bin/sh
	open -a TeXShop `kpsewhich $*`
In my test, the & at the end of the command was indeed unnecessary.

I didn't try the advice on creating a shell function but will file it  
away as it looks like it could be handy for other things too.

Thanks so much,

Aaron Rendahl
University of Minnesota School of Statistics



More information about the MacOSX-TeX mailing list