[OS X TeX] Emacs <-> TexShop
Roussanka Loukanova
rloukano at stp.lingfil.uu.se
Sat Apr 7 06:18:03 EDT 2007
Hi everybody,
I'm figuring out a way to say Chestit Velikden & Happy Easter:
Carbon Emacs <-> TeXShop/Preview interactions are very fine, i.e.,
almost, except the problem that Axel and myself discussed. A review of the
problem and a temporary solution:
The default View of the dvi/pdf output, following the command latex
from within Emacs, is with TeXShop (via the default command "open %o" from
AUCTeX/Emacs). Apparently, this runs each time the sequence dvips->pdf
(dvips + distiller), even in the presence of a pdf file; and, may be as a
consequence, TeXShop doesn't show the updated pdf file unless re-opened,
but then, doesn't re-open on the last viewed page. (All this is fine with
pdflatex command.)
I'm solving this, similarly to Alex, but by creating additional
AUCTeX/Emacs commands for simpdftex and Preview. Thus, for dvips
dependencies, I run the external commands simpdftex -> Preview (very
easily indeed, from the minibuffer's command line). This is somewhat
frustrating to me, since I would like to get TeXShop displaying the
right pdf file in the proper way.
It would be very nice if someone knows how to fix this Emacs <-> TeXShop
interaction: my guess is for some (Emacs/View-in-TeXShop) script in the
spirit:
"after latex do
if there is (newer) pdf, (re)display it,
otherwise dvi -> dvips -> pdf & dispaly it".
But I think that the *default* latex -> View-in-TeXShop should be in the
proper way.
Chestit Velikden!
Happy Easter!
Roussanka
On Fri, 23 Mar 2007, Axel E. Retif wrote:
> 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/
>
--
Roussanka
------------------------------------------------
Roussanka Loukanova
Computational Linguistics
Dept. of Linguistics and Philology
Uppsala University
P.Box 635, Uppsala 751 26, Sweden
Tel: +46 18 471 1342 (office)
+46 18 750 0340 (most of the time)
Email: rloukano at stp.lingfil.uu.se (the easiest way to reach me)
URL: http://stp.ling.uu.se/~rloukano/
--------------------------------------------------
------------------------- 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