How to reload PDF in preview manually?

The official TeXShop Support Forum.

How to reload PDF in preview manually?

Postby elwood151 » Mon Jan 02, 2012 10:22 am

I'm using TeXShop 2.43 on MacOS X 10.6.8.
Is there a way to reload the PDF file in the preview window manually, when it has been changed on the disk by an AppleScript command or an already defined HotKey, so that the new version opens on the same page?
elwood151
 
Posts: 34
Joined: Wed Aug 08, 2007 6:46 am

Re: How to reload PDF in preview manually?

Postby Herbert Schulz » Mon Jan 02, 2012 4:10 pm

Howdy,

Not pretty but it should work... First Close the Preview Window (Cmd-W when it is open); click on the Source Window to select it or, alternatively, switch to the Source Window using Cmd-` (it may take more than one press); Switch to the Preview Window using Cmd-1 which re-opens the pdf in a new Preview Window.

Depending upon what you want to do you could also make an engine that post-processes the pdf after processing the original tex file.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: How to reload PDF in preview manually?

Postby elwood151 » Tue Jan 03, 2012 2:22 am

@Herbert:
thank you, this is indeed a very "un-pretty" solution.

the biggest drawback: if I close the pdf preview, switch to the source window and then hit Cmd+1, I get the PDF preview on page 1 again (and with another zoom setting than the one last time and with 1-page-continous instead of 2-page-view)

So this is a lot of clicking each time to return to the state where I was before. :(
elwood151
 
Posts: 34
Joined: Wed Aug 08, 2007 6:46 am

Re: How to reload PDF in preview manually?

Postby elwood151 » Tue Jan 03, 2012 2:24 am

p.s.

if at least there would be a way to jump directly (without involving the mouse) to the currently selected text passage in the source.. :(
elwood151
 
Posts: 34
Joined: Wed Aug 08, 2007 6:46 am

Re: How to reload PDF in preview manually?

Postby Herbert Schulz » Tue Jan 03, 2012 12:12 pm

Howdy,

What kind of post processing is being done to the pdf file?
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: How to reload PDF in preview manually?

Postby elwood151 » Tue Jan 03, 2012 4:01 pm

Hi Herbert,

I'm using self defined shell scripts for
* triggering pdflatex or latexmk and then
* extracting document information (page count, line count, etc.) to a text file,
so the pdf file itself is not changed after compiling, but the compilation is not done "inside" TeXShop (I'm launching those command from terminal.app, as I do not know how to configure TeXShop to use them only for this one document, as they are specific to it) and therefore TeXShop seems to not always recognize that the pdf has been changed.
elwood151
 
Posts: 34
Joined: Wed Aug 08, 2007 6:46 am

Re: How to reload PDF in preview manually?

Postby Herbert Schulz » Tue Jan 03, 2012 4:33 pm

Howdy,

Assuming the shell script takes the file.tex (including the .tex) as it's only argument and it's executable you can simply call it myscript.engine, place it in ~/Library/TeXShop/Engines and put the line

% !TEX TS-program = myscript

at the top of the root file. Then, using Typeset->Typeset (Cmd-T) it should all just happen. Please let me know if you have a problem.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: How to reload PDF in preview manually?

Postby Herbert Schulz » Tue Jan 03, 2012 4:36 pm

Howdy,

Sorry, I had to edit that line in the message above. It is now the correct

% !TEX TS-program = myscript

(that's TS-... not TS_... and a space on either side of the =).
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: How to reload PDF in preview manually?

Postby mars0i » Sat Jan 28, 2012 5:32 am

Elwood151, do you need to reload the PDF manually? You can set the previewer to watch the PDF file and reload it whenever it changes. In Preferences, Preview tab, check the box for "Automatic preview update".

Drawback: The previewer will grab the mouse focus. For example, if you were typing in an editor when the PDF reloads, you are now typing into TeXShop's previewer. (Anyone know how to turn this feature off?)
mars0i
 
Posts: 1
Joined: Sat Jan 28, 2012 5:21 am

Re: How to reload PDF in preview manually?

Postby elwood151 » Sat Jan 28, 2012 8:22 am

@marsOi

thanks for your comment.
I know the automatic preview update checkbox and I had it checked, but under certain circumstances it did not seem to work.
I'm having more other problems with TeXShop at the moment and I wonder if something in my setup might be corrupted, as I can not believe that TeXShop might be so unreliable.... :(

E. g. I can not display my pdf starting with the first page on the right to have the correct pairs of double pages displayed in preview (the right page is always on the left), no matter which one of the preference options I choose....

this is strange.
elwood151
 
Posts: 34
Joined: Wed Aug 08, 2007 6:46 am

Next

Return to TeXShop (engl.)

Who is online

Users browsing this forum: EddieGar, Oscar095, SabinaMa and 1 guest

cron