[OS X TeX] PDF-->PDFView and DVI-->TeXniscope under Auctex?

Chris Menzel cmenzel at tamu.edu
Wed Apr 18 18:04:30 EDT 2007

On Wednesday 18 April 2007, Robert H. Sloan wrote:
> 	Does anybody know the right settings to cause PDF to be previewed
> with PDFView but the odd thing that must be DVI previewed with
> TeXniscope?
> Putting
> (require 'tex-site)
> (add-hook 'TeX-mode-hook
> 	  (lambda ()
> 	    (add-to-list 'TeX-output-view-style
> 			 '("^pdf$" "."
> 			   "/Applications/PDFView.app/Contents/MacOS/gotoline.sh %n %
> (OutFullPath)")
> 			 )
> 	    (add-to-list 'TeX-expand-list
> 			 '("%(OutFullPath)" (lambda nil
> 					      (expand-file-name
> 					       (TeX-active-master (TeX-output-extension) t)
> 					       (TeX-master-directory))))))
> 		)
> in my .emacs gets me PDFView, and causes my TeX-output-view-style to
> become:
> TeX-output-view-style is a variable defined in `tex.el'.
> Its value is
> (("^dvi$" "^xdvi$" "open-x11 %(o?)xdvi %dS %d")
> ("^dvi$" "^TeXniscope$" "open -a TeXniscope.app %o")
> ("^pdf$" "." "open %o")
> ("^html?$" "." "open %o")
> ("^pdf$" "." "/Applications/PDFView.app/Contents/MacOS/gotoline.sh %n
> %(OutFullPath)"))
> But although I have TeXniscope in /Applications (and for that matter
> I have xdvi in /opt/local/bin), nothing happens when I click the dvi-
> preview button when I have my TeXing mode set to dvi rather than PDF.

First thing I'd try is editing the "TeX-output-view-style" variable and giving 
the full path to TeXniscope in the relevant "^dvi$" line, 
i.e., "open -a /Applications/TeXniscope.app".  Use "M-x 
customize-variable<Ret>".  (I'd also delete the other "^dvi$" line if you're 
not planning to use xdvi.)

Chris Menzel

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