[OS X TeX] Adding a macro to TeXShop via an installer script
Adam R. Maxwell
amaxwell at mac.com
Sat Jan 30 13:06:34 EST 2010
On Jan 30, 2010, at 9:56 AM, Alan Munn wrote:
> Second, is is possible to add plist items via a script? I tried adding a postflight shell script that simply added a new element to the file ~/Library/TeXShop/Latex_Macros.plist but it didn't seem to work (i.e. the file wasn't even modified at all.)
It's possible, but using a shell script with typical tools (sed/awk) has a lot of potential to corrupt the file (especially if it's a binary plist!). I'd use python and plistlib or PyObjC to do it…which still might not work if TeXShop had the file open for some reason.
More information about the MacOSX-TeX
mailing list