[OS X TeX] simpdftex, Skim and auto-refresh
jkock at start.no
Tue Sep 4 08:40:44 EDT 2007
>it seems that the latest simpdftex and the latest Skim do not like
>each other :-)
>In fact, the auto-refresh feature of the latest Skim does not work
>with the latest simpdftex, which updates the PDF file atomically.
>As commented in
>the fact that Skim does not intercept atomic updates is a feature and
>not a bug.
According to the Skim Wiki it is a design decision to track files by
vnode not by posix name. The reason is that 'this is how all cocoa
applications do'. On the other hand, as far as I know, tex and all
the scripts that constitute a tex installation reference files by
posix name. Perhaps Skim could use vnodes as long as they exist
but revert to posix name tracking in the 'exceptional' situation
where the node is deleted (for example by simpdftex). Roughly as
follows. Certainly Skim is internally aware of the file names (for
displaying in the window bar, for instance), and certainly respond
to NOTE_RENAME events. Perhaps Skim could define a node-deleted queue
(EVFILT_VNODE NOTE_DELETE) for the file, and let the action in respond to
the delete event be to check if a file with the same name exists
(known to Skim but not necessarily to the event itself), and if so
set up a new kqueue on that new node. I think it would help
coexisting with the script world of tex. Disclaimer: I know nothing
about cocoa programming.
>I wonder if it posssible to permanently patch simpdftex as suggested in
As far as I can see, that 'patch' essentially reverts to pre-2003
simpdftex, causing problems for all poll-based previewers (that's
still the majority): when tex (or gs) is allowed to write to the
tracked file over a long period of time there is a high risk that the
polling previewer reloads the file while it is in an unstable state,
leading to erratic behaviour like a blank display. (The 2003 patch
is clearly explained in the preamble of the simpdftex script.)
>If you can avoid using Skim's automatic reload feature, please do so.
>It is better (more reliable and more efficient) for the script/program
>running LaTeX tell Skim to reload the PDF only after typesetting is
>finished. This can be done using AppleScript or osascript from the
I fully agree. Only the program that writes the pdf knows the exact
optimal moment to refresh the display: as soon as the pdf generation
is complete, it can simply notify the previewer through an apple event.
(By the way it seems also that kqueue has been very buggy in OSX.
I don't know what the present status is.)
------------------------- 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