[OS X TeX] Open related... macro
Josep Maria Font
jmfont at ub.edu
Fri Feb 13 20:24:25 CET 2009
I have always wanted to have an "Open related..." macro in TeXShop
that lets you select and open one of the "related" files associated
with the current file: the results of some typesetting jobs may imply
you need to read some of them to solve some problems, etc. Instead of
issuing a "feature request" I decided to try to write it myself, by
modifying the macro "Open quickly..." that comes bundled with TeXShop
and customizing it "to your liking", as it says.
What I did was just change the list of extensions that are searched for:
property extensions_to_open : {"bbl", "toc", "log", "aux"}
And now, it happens that it does not work. It only finds the .log
and .aux files, no .toc or .bbl is found (and they are there!). If I
leave only the first two, Applescript complains that it cannot find
any files with those extensions.
By the way, the error message gives a wrong description of the error,
it says "Finder got an error: Can't get name of every file of folder
[the folder's path, rightly found] whose {"bbl", "toc"} contains name
extension"; it should say "... whose name extension contains {"bbl",
"toc"}". But this is a minor point.
The macro fails when clicking the "test" button, and also fails after
having saved it, if either called from the macro menu or from the
assigned key equivalent. It also fails after restarting TeXShop.
I have customized other macros (many .bib templates, for instance)
with success, but don't know Applescript own language. Any ideas ?
Thanks.
JMaF
More information about the macostex-archives
mailing list