[OS X TeX] Emacs Latex enh.

Enrico Franconi franconi at cs.man.ac.uk
Mon Nov 11 11:25:50 EST 2002

On November 11, Giulio Cozzi writes:
> Dear Friends
> I've copied some of the content of dot-emacs.el provided with the  
> latest distribution by Dr. Franconi.
> When I launch emacs from xfree (Fink supplied) what I obtain is an  
> error: "Symbol's value as a variable is void:darwinp"
> Any idea ?

Yes :-) There are some definitions in the wrong order. I attach a
correct dot-emacs.el

I will release shortly a new version where this and other minor bugs
will be corrected, thanks to the feedback I got in these days after
the release of version 2.0

If you have any suggestion for improvement, I'm ready to listen.

-- e.

Enrico Franconi                     - franconi at inf.unibz.it
Free University of Bozen-Bolzano    - http://www.inf.unibz.it/~franconi/
Faculty of Computer Science         - Phone: (+39) 0471-315-642
I-39100 Bozen-Bolzano BZ, Italy     - Fax:   (+39) 0471-315-649


;;; emacs-21 personal startup file

;;; dot emacs file, Enrico Franconi,  franconi at inf.unibz.it
;;; Time-stamp: <2002-11-07 07:08:40 franconi> 

;;; Do not customize the following parameters

(defun load-local-site-start (site-lisp-directory )
  "Load site-start.el from a given site-lisp directory"
  (let ((current-default-directory default-directory))
    (setq default-directory site-lisp-directory)
    (setq default-directory current-default-directory)
    (setq load-path (cons site-lisp-directory load-path))
    (load (concat site-lisp-directory "/site-start.el"))

;; Allow any emacs to load site-lisp files
(unless (boundp 'darwinp)
  (load-local-site-start "/Applications/Emacs.app/Contents/MacOS/share/emacs/site-lisp"))

;; Disallow annoying startup message
(setq inhibit-startup-message t)

;;; Customize LaTeX parameters

;; Directories containing the sites TeX macro files and style files
(setq TeX-macro-global '("/usr/local/teTeX/share/texmf/tex/"

;; A4 default paper
(setq TeX-a4-paper t)

;; List of available printers
(setq TeX-printer-list '(("brother")

;; Preferred view format: dvi, ps, pdf, pdfs
(setq TeX-view-format "pdfs")

;; PDF previewer
(setq pdf-previewer-program (if darwinp
				  "open -a 'Acrobat Reader 5.0'"

;; PS previewer
(setq ps-previewer-program (if darwinp
				 "open -a 'MacGhostViewX'"

;; DVI previewer
(setq dvi-previewer-program (if darwinp
				  "open -a 'MacDviX'"

;; dvipdf scalable converter
(setq dvipdf-scalable-program 
  (if darwinp

;; The command menu, completely customisable
(setq TeX-command-list
       (list "TeX" "tex '\\nonstopmode\\input %t'" 'TeX-run-TeX nil t)
       (list "TeX Interactive" "tex %t" 'TeX-run-interactive nil t)
       (list "LaTeX" "%l '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t) 
       (list "LaTeX Interactive" "%l %t" 'TeX-run-interactive nil t) 
       (list "LaTeX2e" "latex2e '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t)
       (list "pdfLaTeX" "pdflatex '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t)

       (if TeX-a4-paper
	   (list "Postscript" "dvips -ta4 %d -o %f " 'TeX-run-command t nil)
	 (list "Postscript" "dvips %d -o %f " 'TeX-run-command t nil))
       (list "PDF" "dvipdf %d %s.pdf" 'TeX-run-command t nil) 
       (list "PDF (scalable)" (concat dvipdf-scalable-program " %d %s.pdf")
	     'TeX-run-command t nil)

       (list "View" "%s" 'TeX-run-view-command nil nil)
       (list "Print" "%p %r " 'TeX-run-command t nil)
       (list "Queue" "%q" 'TeX-run-background nil nil)
       (list "Convert to HTML" "htlatex %t ; open %s.html" 'TeX-run-command t nil) 
       (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
       (list "Index" "makeindex %s" 'TeX-run-command nil t)
       (list "Check" "lacheck %s" 'TeX-run-compile nil t)
       (list "Spell" "<ignored>" 'TeX-run-ispell-on-document nil nil)
       (list "Other..." "" 'TeX-run-command t t)
       (list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
       (list "Makeinfo HTML" "makeinfo --html %t" 'TeX-run-compile nil t)
       (list "AmSTeX" "amstex '\\nonstopmode\\input %t'" 'TeX-run-TeX nil t)

;;; Customize window parameters

(when (and (boundp carbon-emacsp) carbon-emacsp)

  ;; courier 14 font and 54x80 window dimension


  (setq default-frame-alist '((width . 80) 
			      (height . 48)
			      (font . "fontset-courier")))

  (setq initial-frame-alist default-frame-alist)

Mac TeX info, resources, and news can be found at:
List archives can be found at:
See message headers for list info.

More information about the MacOSX-TeX mailing list