[TxMt] LaTeX - opening PDFs

Charilaos Skiadas cskiadas at gmail.com
Thu Jan 10 03:44:40 UTC 2008

On Jan 9, 2008, at 10:09 PM, Paul McCann wrote:

> Greetings all,
> I can confirm the behaviour Keith described: for me it's evident  
> when I
> 1. start in directory "x" and create a simple "article.tex" using  
> the article template in TextMate
> 2. create a "deeper" directory in "x" and create another "  
> article.tex" file within "x/deeper". Add a simple line of text to  
> distinguish the two outputs.
> 3. open up directory "x" in TextMate
> The processing works fine the first time (eg on "x/article.tex"),  
> but on processing "x/deeper/article.tex" nothing changes in the  
> previewer, and it's not brought to the front. Similarly a click on  
> the button "View in ((name of preview app))" in the web output  
> window produces no change (and no change of focus). I tried with  
> both Skim and TeXShop as previewer.
> I did have a poke around in the latex processing scripts, but am  
> probably a bit out of my depth here. The one thing that looks a bit  
> suspicious is that "refreshViewer(viewer,pdfFile)" in texMate.py  
> seems to use the filename, rather than the path of the file to send  
> the osascript to refresh the view. In "Skim" for example, the  
> command reads (in essence):
>  tell application "Skim" to revert document "filename"
> instead of something like
>  tell application "Skim" to revert (every document whose path is "/ 
> path/to/article.pdf")
> (I'll contain my hatred of Applescript to this set of brackets...)  
> Is that the command in your version Haris?

Now I am really confused. I am looking at texMate.py, and I am not  
seeing neither a refreshViewer method, nor any mention of any  
applescript terms.  In my version, /usr/bin/open is used, on line  
111, in a method called run_viewer. In which lines of texMate.py  
exactly are the applescript calls supposed to be at?

> If it is I'm surprised it could work with two identically named  
> files unless the act of refreshing was somehow changing the order  
> in which they were indexed. Anyway, I hope this might give someone  
> else a key to fixing the issue. It's also possible that I'm  
> misreading the chain of command(s).
> Cheers,
> Paul (happy user of the latex system in TextMate for quite some  
> time now!)

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

More information about the textmate mailing list