preview in TexShop was: Re: [OS X TeX] FYI: Smultron
Roussanka Loukanova
rloukano at stp.lingfil.uu.se
Fri Mar 23 07:29:05 EDT 2007
On Fri, 23 Mar 2007, Axel E. Retif wrote:
> On Mar 23, 2007, at 03:46, Roussanka Loukanova wrote:
>
>> On Thu, 22 Mar 2007, Axel E. Retif wrote:
>> ...
>>> [...]
>>>
>>> How strange! I just checked and it does for me. Just to be sure: in the
>>> ``Document'' tab of Preferences, I have checked ``Configure for External
>>> Editor'', and in the ``Preview'' tab ``Automatic Preview Update''.
>>>
>>> Then you have to quit TeXShop, typeset in Emacs and open the PDF again in
>>> TeXShop
>>
>> I've done this, and tested it many-many times and now again. TexShop always
>> pops-up:
>
> [...]
>
>> Which version of emacs do you use? And how did you configure Emacs to use
>> TeXShop as the default PDF viewer?
>
> Exactly the same you use: Seiji Zenitani's Carbon Emacs. As for the
> configuration, I use TeXniscope as my DVI viewer and TeXShop as the PDF
> viewer: in my .emacs
> 1) I load Prof. Enrico Franconi's Enhanced Carbon Emacs plug-in:
>
> http://web.inf.unibz.it/~franconi/enhanced-carbon-emacs/
I used to use these plug-in too, but then I couldn't get them +
Aquamacs + spellchecker and gave them up. I should try Enrico Franconi's
Enhanced Carbon Emacs plug-in with Carbon Emacs. But I think the problem
with Emacs <-> TexShop is independent and should be resolved somehow...
BTW, I also tried the combination pdflatex + TeXShop as viewer: on my
machine this combination also creates a <file>.pdf version twice, the 2nd
when TeXShop opens the <file>.pdf display. Try to check this on your
machine by:
1. run pdflatex from Emacs
2. check the time stamps of the relevant files, esp. of the <file>.pdf, by:
ls -l <file>.*
3. wait at least a couple of minutes
4. Issue the View command from Emacs, by {Ctrl-c, Ctrl-c}
5. check the time stamp of the <file>.pdf by:
ls -l <file>.*
I get each time, *new* <file>.pdf version when TeXShop is the viewer
(with both latex and pdflatex).
Roussanka
>
> 2) Then I set the viewers, the path for my ~/emacs directory and
> forward/inverse search for xdvi and TeXniscope:
>
> (setq pdf-previewer-program "open -a TeXShop") ;; I don't know if these
> two really work,
> (setq dvi-previewer-program "open -a texniscope") ;; but anyway, I have them
> here.
> (setq-default TeX-master nil) ;; In order to set the
> master per project
> (require 'tex-site)
> (add-to-list 'load-path (expand-file-name "~/emacs/"))
> (require 'xdvi-search)
> (require 'txs-search)
> (add-hook 'LaTeX-mode-hook
> '(lambda nil
> (define-key LaTeX-mode-map [f1] 'xdvi-jump-to-line)))
> (add-hook 'LaTeX-mode-hook
> '(lambda nil
> (define-key LaTeX-mode-map [f2] 'txs-jump-to-line)))
> (server-start)
>
> 3) And, finally, I borrowed an idea from Jan Anderssen
>
> http://www.arcknowledge.com/gmane.comp.tex.macosx/2004-09/msg00072.html
>
> to add commands in my .emacs file instead of tinkering with customizing
> AUCTeX:
>
> (require 'tex-site)
> (add-hook 'LaTeX-mode-hook
> (function (lambda ()
> (add-to-list 'TeX-expand-list '("%g" file "pdf" t))
> (add-to-list 'TeX-command-list '("pdfLaTeX" "pdflatex --shell-escape %t"
> TeX-run-interactive nil t))
> (add-to-list 'TeX-command-list '("PDFView" "open -a TeXShop.app %g"
> TeX-run-command t nil))
> (setq TeX-command-default "pdfLaTeX")
> (setq TeX-command-next "PDFView")
> (define-key LaTeX-mode-map [f3] 'do-pdflatex)
> (defun do-pdflatex ()
> "pdflatex con shell escape."
> (interactive)
> (TeX-command "pdfLaTeX" 'TeX-master-file))
> )))
>
> Best,
>
> Axel
------------------------- 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