[OS X TeX] Emacs <-> TexShop

Axel E. Retif axretif at igo.com.mx
Fri Mar 23 08:47:26 EDT 2007


On Mar 23, 2007, at 06:33, Roussanka Loukanova wrote:

> This problem has been lately discussed under the subject "preview  
> in TexShop was: Re: [OS X TeX] FYI: Smultron", but some people,
> incl. myself have been mentioning it now and then.
>
> It seems to me that it deserves a new tread and am slightly re- 
> formulating it here.
>
> I use Seiji Zenitani's Carbon Emacs with its latest default  
> commands for LaTeX and View, which for a given <file>.tex typeset  
> and view by the sequences:
>
> 1. latex -> View (open <file>.dvi)
>
> The <file>.pdf is viewed in TeXShop.
>
> 2. pdflatex -> View (open <file>.pdf)
>
> The <file>.pdf is viewed in Preview.

I think I know what's happening ---you use TeXShop as your DVI  
viewer, so each time you issue the command View in Emacs, even  
without a change in the DVI, Emacs goes all the way dvi->dvips->pdf,  
and your PDF has a new time stamp.

On the other hand, if the DVI really changes, TeXShop doesn't update  
the PDF because it is set to be a PDF viewer not a DVI viewer.

I bet that if you use pdflatex in Emacs *and* use TeXShop (not  
Preview) as your PDF viewer, TeXShop will update your PDF.

Best,

Axel


>
> I consider these two options very good, except the following  
> problem with TeXShop:
>
> 1. If TexShop had been left opened (behind emacs' window) while  
> typing and typesetting in emacs, then via the command View, TexShop  
> just pops-up to the front by displaying the older, instead of the  
> updated <file>.pdf (on the page it was).
>
> 2. If TexShop had been closed (e.g., by Cmd-W or Cmd-Q):
>
> a) If one typesets in emacs by using latex, then the command View  
> opens TeXShop, which displays the updated pdf on p.1, instead on  
> the last page viewed.
>
> b) TeXshop always creates a *new pdf version*, when re-opened via  
> Emacs' View command, after it had been closed (with or without  
> typesetting in Emacs).
>
> When <file>.tex and  <file>.dvi have the same time stamps
> (e.g., when there is no update of <file>.tex, typesetting has been  
> previously done and <file>.dvi is not removed), Emacs, with the key  
> combination {Ctrl-c Ctrl-c}, automatically detects that and does  
> not run the command latex, but invokes the default View command in  
> the emacs' mini-buffer. But TeXShop creates new <file>.pdf: this  
> means that the default opening of TeXShop runs dvi -> pdf or ex ->  
> pdf.
>
> These problems persist with the default AUCTeX commands; and with  
> added and removed my own AUCTeX external commands.
>
> I have in TeXShop Preferences
>
> Document -> Source Window Position -> Remember last position on  
> close (checked)
> Document -> On Startup -> Configure for External Editor (checked)
>
> Preview -> External Editor -> Automatic Preview Update (checked)
>
> Here are my time stamps from a test after issuing {Ctrl-c Ctrl-c},  
> which invokes View in the Emacs' mini-buffer and closing TeXShop  
> with Cmd-W.
>
> roussankas-computer:~/Documents/tests rosi$ ls -l test_view.*
> -rw-r--r--   1 rosi  rosi   1658 Mar 23 12:49 test_view.aux
> -rw-r--r--   1 rosi  rosi  95112 Mar 23 12:49 test_view.dvi
> -rw-r--r--   1 rosi  rosi  10320 Mar 23 12:49 test_view.log
> -rw-r--r--   1 rosi  rosi    126 Mar 23 12:49 test_view.out
> -rw-r--r--   1 rosi  rosi  92556 Mar 23 12:52 test_view.pdf
> -rw-r--r--   1 rosi  rosi  44660 Mar 23 08:43 test_view.tex
> roussankas-computer:~/Documents/tests rosi$ ls -l test_view.*
> -rw-r--r--   1 rosi  rosi   1658 Mar 23 12:49 test_view.aux
> -rw-r--r--   1 rosi  rosi  95112 Mar 23 12:49 test_view.dvi
> -rw-r--r--   1 rosi  rosi  10320 Mar 23 12:49 test_view.log
> -rw-r--r--   1 rosi  rosi    126 Mar 23 12:49 test_view.out
> -rw-r--r--   1 rosi  rosi  92556 Mar 23 13:16 test_view.pdf
> -rw-r--r--   1 rosi  rosi  44660 Mar 23 08:43 test_view.tex
>
>  Roussanka
>
> ------------------------- 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/
>
>
>


------------------------- 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 mailing list