Sorry for the delayed response.
I use Typeset & View so the changes I made to latex_watch.pl must then be irrelevant. Fyi, I never thought there was ever a problem with the refresh_viewer script. I always thought that the problem was that the script was being called from elsewhere with the wrong viewer supplied as a parameter. I could not track down where it's called from (I know very little about bundles) so my workaround was to just rewrite the script to open Skim regardless of what viewer it's given as a parameter. I mentioned this only because it pinpoints the code that is opening TeXShop, and hence might have been helpful information for debugging the issue, though that may now be unnecessary:
As suggested I reset to defaults and then installed the LaTeX bundle again. The Bundles -> LaTeX -> Preferences... command stopped functioning but TeXShop no longer opens when type setting. After several restarts the Preferences command has resumed functioning and the TeXShop issue remains fixed. This means that currently all my issues have been resolved. Thanks!
-Jim
As suggested I reset to defaults and then installed the LaTeX bundle
again. The Bundles -> LaTeX -> Preferences... command stopped functioning but TeXShop no longer opens when type setting. After several restarts the Preferences command has resumed functioning and the TeXShop issue remains fixed. This means that currently all my issues have been resolved. Thanks!
It seems I spoke too soon. TeXShop has now started to open again when I type set and view files. I don't know what I could have done to cause this so I'm not sure how to have you recreate this behavior. I have noticed that it is opening the .bib file from my project. I wonder if maybe the bibtex interface also refreshes the viewer somehow?
-Jim
On Mon, Jan 5, 2015 at 3:21 PM, Starx jstarx@gmail.com wrote:
Sorry for the delayed response.
I use Typeset & View so the changes I made to latex_watch.pl must then be irrelevant. Fyi, I never thought there was ever a problem with the refresh_viewer script. I always thought that the problem was that the script was being called from elsewhere with the wrong viewer supplied as a parameter. I could not track down where it's called from (I know very little about bundles) so my workaround was to just rewrite the script to open Skim regardless of what viewer it's given as a parameter. I mentioned this only because it pinpoints the code that is opening TeXShop, and hence might have been helpful information for debugging the issue, though that may now be unnecessary:
As suggested I reset to defaults and then installed the LaTeX bundle again. The Bundles -> LaTeX -> Preferences... command stopped functioning but TeXShop no longer opens when type setting. After several restarts the Preferences command has resumed functioning and the TeXShop issue remains fixed. This means that currently all my issues have been resolved. Thanks!
-Jim
Hi Jim,
On 06 Jan 2015, at 20:39 , Starx jstarx@gmail.com wrote:
It seems I spoke too soon. TeXShop has now started to open again when I type set and view files. I don't know what I could have done to cause this so I'm not sure how to have you recreate this behavior. I have noticed that it is opening the .bib file from my project. I wonder if maybe the bibtex interface also refreshes the viewer somehow?
by bibtex interface, you refer to the command “Create Bibliography”? Normally it should not not refresh the viewer.
I guess we can try to fix this step by step if that is okay with you. Could you please change `refresh_viewer.scpt` by adding a `display alert`:
... else if viewer is "TeXShop" then display alert "Refresh PDF in TeXShop" tell application "TeXShop" ...
If the refresh of the viewer is really caused by `texmate` then you should now get an alert dialog every time TeXShop opens after you used “Typeset & View (PDF)” more than once. If that is the case, then maybe the viewer is set incorrectly. Please check the selected PDF viewer by pasting the following command into “Terminal”:
defaults read com.macromates.textmate.preview latexViewer
The command should return the string `Skim`. Is this the case?
-Jim
Kind regards, René
Hi René, I tried your suggestions. I've added the snippet, both in addition and in replacement of the previous lines regarding TeXShop in refresh_viewer.scpt, and in both cases at the second and successive uses of "Typeset & View (PDF)", TeXShop opens with no alert dialog. For me the command
defaults read com.macromates.textmate.preview latexViewer
shows that I'm using Skim, which is my current viewer. I have the latest version of TeXShop (3.48.1) on my computer. In my case I had an extra LaTeX bundle in the Avian directory, but the behavior has persisted even after removing the bundle.
Cheers, Angelo
René Schwaiger wrote:
Hi Jim,
On 06 Jan 2015, at 20:39 , Starx jstarx@gmail.com wrote:
It seems I spoke too soon. TeXShop has now started to open again when I type set and view files. I don't know what I could have done to cause this so I'm not sure how to have you recreate this behavior. I have noticed that it is opening the .bib file from my project. I wonder if maybe the bibtex interface also refreshes the viewer somehow?
by bibtex interface, you refer to the command “Create Bibliography”? Normally it should not not refresh the viewer.
I guess we can try to fix this step by step if that is okay with you. Could you please change `refresh_viewer.scpt` by adding a `display alert`:
... else if viewer is "TeXShop" then display alert "Refresh PDF in TeXShop" tell application "TeXShop" ...
If the refresh of the viewer is really caused by `texmate` then you should now get an alert dialog every time TeXShop opens after you used “Typeset & View (PDF)” more than once. If that is the case, then maybe the viewer is set incorrectly. Please check the selected PDF viewer by pasting the following command into “Terminal”:
defaults read com.macromates.textmate.preview latexViewer
The command should return the string `Skim`. Is this the case?
-Jim
Kind regards, René
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Hi Angelo,
On 07 Jan 2015, at 11:18 , Angelo Varlotta angelovarlotta@gmail.com wrote:
Hi René, I tried your suggestions. I've added the snippet, both in addition and in replacement of the previous lines regarding TeXShop in refresh_viewer.scpt, and in both cases at the second and successive uses of "Typeset & View (PDF)", TeXShop opens with no alert dialog.
Jim mentioned that “TeXShop” does not open if he changes `refresh_viewer` in such a way that it always opens “Skim” regardless of the `viewer` argument. According to your description the code for refreshing the PDF in “TeXShop” is never called. Could you please make sure that this is the case by removing the lines that open “TeXShop”. After you made the changes, your copy of `refresh_viewer` should contain the following code:
on run {viewer, path_to_pdf} if viewer is "Skim" then tell application "Skim" revert (documents whose path is path_to_pdf as text) end tell end if end run
Does the problem still persist after that?
For me the command
defaults read com.macromates.textmate.preview latexViewer
shows that I'm using Skim, which is my current viewer. I have the latest version of TeXShop (3.48.1) on my computer. In my case I had an extra LaTeX bundle in the Avian directory, but the behavior has persisted even after removing the bundle.
Cheers, Angelo
Kind regards, René
Hi René, The code you mention below is actually the code I've kept in refresh_viewer.scpt. Set up this way, TeXShop doesn't launch. For the time being, this is the solution I've adopted.
René Schwaiger wrote:
Hi Angelo,
On 07 Jan 2015, at 11:18 , Angelo Varlotta angelovarlotta@gmail.com wrote:
Hi René, I tried your suggestions. I've added the snippet, both in addition and in replacement of the previous lines regarding TeXShop in refresh_viewer.scpt, and in both cases at the second and successive uses of "Typeset & View (PDF)", TeXShop opens with no alert dialog.
Jim mentioned that “TeXShop” does not open if he changes `refresh_viewer` in such a way that it always opens “Skim” regardless of the `viewer` argument. According to your description the code for refreshing the PDF in “TeXShop” is never called. Could you please make sure that this is the case by removing the lines that open “TeXShop”. After you made the changes, your copy of `refresh_viewer` should contain the following code:
on run {viewer, path_to_pdf} if viewer is "Skim" then tell application "Skim" revert (documents whose path is path_to_pdf as text) end tell end if end run
Does the problem still persist after that?
For me the command
defaults read com.macromates.textmate.preview latexViewer
shows that I'm using Skim, which is my current viewer. I have the latest version of TeXShop (3.48.1) on my computer. In my case I had an extra LaTeX bundle in the Avian directory, but the behavior has persisted even after removing the bundle.
Cheers, Angelo
Kind regards, René
Hi Angelo,
On 07 Jan 2015, at 17:04 , Angelo Varlotta angelovarlotta@gmail.com wrote:
Hi René, The code you mention below is actually the code I've kept in refresh_viewer.scpt. Set up this way, TeXShop doesn't launch. For the time being, this is the solution I've adopted.
I can not think of a situation where the alert dialog would not show up and the change mentioned in my last mail would still fix the issue :(.
Normally, the alert dialog must show up if the else branch is executed. In this branch we would refresh the PDF in “TeXShop”. A consequence of this should be, that if the alert dialog does not show up, then the code in the else-branch is not responsible for the problem. This in turn indicates that removing the else-branch should not solve the problem. Since it does solve the problem, I am totally clueless about the cause of the issue…
Kind regards, René