preview in TexShop was: Re: [OS X TeX] FYI: Smultron

Axel E. Retif axretif at igo.com.mx
Fri Mar 23 06:54:33 EDT 2007


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/

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