[OS X TeX] TexShop Applescript question
Jon Hanson
jkhanson at umich.edu
Mon Dec 18 15:21:56 EST 2006
Greetings,
I am trying to write a little macro that will typeset a file that is
not the frontmost window in TeXShop. The situation is this: I am
writing in one file (a chapter, which is just the body of the source)
and want to typeset a second file (the main document, which contains
commands to input the various chapters) in order to refresh the pdf.
I often have many source windows open so switching windows can get
cumbersome.
Ideally, my macro would work just like command-t except that it
instead typesets the main document file. I am not experienced in
Applescript, however, and have not been able to figure it out
inductively. It would be something along the lines of this:
--Applescript
set frontName to #DOCUMENTNAME#
set otherName to ???
tell application "TeXShop"
save document frontName
end tell
tell document otherName of application "TexShop"
latex
end tell
My main difficultly is figuring out what command to use to identify
the file that I want typeset. I am not looking for elegance, so it
can just refer to that file by its name, but I get errors when using
the filepath. Any help would be greatly appreciated!
Jon Hanson
Ph.D. Candidate
Department of Political Science
University of Michigan
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list