[OS X TeX] Can a TeXShop engine give the PDF name?
Duncan Murdoch
murdoch.duncan at gmail.com
Wed Dec 4 18:56:35 EST 2013
On 13-12-04 6:15 PM, Chris Goedde wrote:
> On Dec 4, 2013, at 10:47 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
>> On 04/12/2013 11:34 AM, Michael Sharpe wrote:
>>> tell application "TeXShop"
>>> try
>>> open posix file "$cwd/foo.pdf"
>>> on error
>>> end try
>>> activate
>>> set index of window "$1:foo.pdf" to 1
>>> tell document "$1:foo.pdf" to refreshpdf
>>> end tell
>>
>> This still seems to have the same problem, namely that if TeXShop already has processed foo.tex to produce and preview foo.pdf, then this opens a new window, also named foo.pdf.
>
> I assume that you mean processing foo.tex produces and previews bar.pdf, correct?
No, I mean that I have both foo.tex and bar.Rnw. What I want to happen
is that when I typeset bar.Rnw, it runs my engine, which figures out
from the contents of bar.Rnw that foo.tex is the main file, and then
runs pdflatex on foo.tex producing foo.pdf, and opens that for preview.
That's what I want, that's not what actually happens.
If I use your script to open foo.pdf, it opens. If I call your script
again, foo.pdf stays open, no new preview opens. That's all fine.
The problem is that if I open foo.tex and get TeXShop to typeset that,
it opens foo.pdf for preview. If I then open bar.Rnw and get it to use
your script to open foo.pdf, I get a new window showing the same file.
I'm not on Mavericks, I'm on 10.6.8.
Duncan Murdoch
>
> Anyway, this is not what I see. For me under Mavericks, the first use of this script does the correct thing, the second doesn’t do anything, I guess because now its getting and catching the error Michael mentioned. I don’t see two open pdf windows, though.
>
> Chris
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
More information about the MacOSX-TeX
mailing list