diff --git a/aquamacs/doc/latex/changelog.tex b/aquamacs/doc/latex/changelog.tex index 2660b743ac89..cc44ed507ae5 100644 --- a/aquamacs/doc/latex/changelog.tex +++ b/aquamacs/doc/latex/changelog.tex @@ -76,6 +76,9 @@ \subsection{Changes--- 2.0 preview 6} \item {\tt .wiki} files now open in wikipedia-mode. +\item AUCTeX has ben updated to version 11.86. +Patch by Konrad Podzceck. + \item Aquamacs uses ``Python-mode'' by default now for Python source files. Users who prefer the original Emacs python package can switch by including {\tt (require 'python)} in their {\tt Preferences.el} file. Code by Barry Warsaw. @@ -101,8 +104,6 @@ \subsection{Changes--- 2.0 preview 6} % \subsection{Changes--- 1.x dev} -\emph{Interested in trying out the Emacs 23 Cocoa version of Aquamacs? As of Summer 2008, we're still working \emph{on} it, but we're also already working \emph{with} it. -\url{http://aquamacs.org/nightlies.shtml}} \begin{itemize} \item Auto Save files are now stored in ~/Library/Caches/Aquamacs Emacs. This way, they survive reboots such as after system crashes (kernel panics, etc.). diff --git a/aquamacs/src/site-lisp/auctex-config.el b/aquamacs/src/site-lisp/auctex-config.el index 89a8b3d2d9b4..7718568f5250 100644 --- a/aquamacs/src/site-lisp/auctex-config.el +++ b/aquamacs/src/site-lisp/auctex-config.el @@ -152,38 +152,6 @@ Only checks once - subsequent calls will not result in any action." ;; (setq count (1+ count)))) ;; count))) -(defvar aquamacs-tex-pdf-viewer "Skim" - "External viewer for `aquamacs-call-viewer' and `aquamacs-latex-crossref'. -Aquamacs defines an AUCTeX command called `Jump to PDF', -which calls this viewer.") - - -(defun aquamacs-call-viewer (line source) - "Display current output file as PDF at LINE (as in file SOURCE). -Calls `aquamacs-tex-pdf-viewer' to display the PDF file." - (let ((full-file-name - (expand-file-name - ;; as in TeX-view - ;; C-c C-c view uses %o (from TeX-expand-list), which - ;; is the same. - (TeX-active-master (TeX-output-extension)) - default-directory)) - (full-source-name - (expand-file-name - source - default-directory))) - (do-applescript - (format - " - set theSink to POSIX file \"%s\" - set theSource to POSIX file \"%s\" - tell application \"%s\" - activate - open theSink - tell front document to go to TeX line %d from theSource - end tell -" full-file-name full-source-name aquamacs-tex-pdf-viewer line)))) - (defun aquamacs-latex-crossref (ev) "Cross-reference in LaTeX" @@ -337,7 +305,7 @@ Use Tools --> Install Command Line Tools to update." ;; This is duplicated from AUCTeX, unfortunately (aquamacs-set-defaults - `((LaTeX-command "latex --file-line-error -synctex=1") + `(;; (LaTeX-command "latex --file-line-error -synctex=1") ;; Directories containing the sites TeX macro files and style files ;; AucTeX defines its own (TeX-macro-global), which serves the same function ;; (TeX-macro-global ,(aquamacs-latex-find-style-file-paths)) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/bib-cite.elc b/aquamacs/src/site-lisp/edit-modes/auctex/bib-cite.elc deleted file mode 100644 index 39178956df40..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/bib-cite.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context-en.el b/aquamacs/src/site-lisp/edit-modes/auctex/context-en.el index 5294854c8a11..c331cc82146c 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/context-en.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/context-en.el @@ -81,7 +81,7 @@ "blank" "block" "bodyfont" "bodyfontenvironment" "bottom" "bottomtexts" "buffer" "capitals" "caption" "captions" "color" "colors" "columns" "combinations" "combinedlist" "descriptions" - "enumerations" "externalfigure" "fillinlines" "fillinrules" "float" + "enumerations" "externalfigures" "fillinlines" "fillinrules" "float" "floats" "footer" "footertexts" "footnodedefinition" "footnotes" "framed" "framedtexts" "head" "header" "headertexts" "headnumber" "heads" "headtext" "hyphenmark" "indentations" "indenting" "inmargin" @@ -95,18 +95,27 @@ "tolerance" "top" "toptexts" "type" "typing" "underbar" "whitespace") "List of the names of ConTeXt en interface macro's that setup things.") +;; referencing in ConTeXt +(defvar ConTeXt-referencing-list-en + '("in" "at" "about" "pagereference" "textreference" "reference") + "List of ConTeXt en macro's that are used for referencing." +) + ;; lists some place macro's as well, should perhaps be under separate menu (defvar ConTeXt-other-macro-list-en - '("adaptlayout" "at" "combinepages" "copypages" + '("abbreviation" "adaptlayout" "at" "combinepages" "copypages" "externalfigure" "framed" "from" "input" "insertpages" "filterpages" "getbuffer" "goto" + "hideblocks" "keepblocks" "leftaligned" "midaligned" "obeyspaces" - "page" "placeexternalfigure" "placefigure" "placelogos" "placetable" - "protect" + "page" + "placecontent" "placeexternalfigure" "placefigure" "placelogos" "placetable" + "processblocks" "protect" "raggedcenter" "rightaligned" "rotate" - "scale" "showexternalfigures" "slicepages" - "useexternalfigure" "unprotect" "url" "usemodule") + "scale" "selectblocks" "showexternalfigures" "slicepages" + "useexternalfigure" "unprotect" "url" "useblocks" "usemodule" "useURL" + "version") "List of ConTeXt en interface macro's that are not an environment nor a setup.") (defun ConTeXt-define-command-en (what) @@ -164,7 +173,7 @@ (defun ConTeXt-en-mode-initialization () "ConTeXt english interface specific initialization." - (mapcar 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en)) + (mapc 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en)) (TeX-add-symbols '("but" ConTeXt-arg-define-ref (TeX-arg-literal " ")) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context-en.elc b/aquamacs/src/site-lisp/edit-modes/auctex/context-en.elc deleted file mode 100644 index d39974fbe9ad..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/context-en.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.el b/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.el index daaafa23708a..9369d0ee37fd 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.el @@ -147,7 +147,7 @@ (defun ConTeXt-nl-mode-initialization () "ConTeXt dutch interface specific initialization." - (mapcar 'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl)) + (mapc 'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl)) (TeX-add-symbols '("but" ConTeXt-arg-define-ref (TeX-arg-literal " ")) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.elc b/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.elc deleted file mode 100644 index 879512b9e620..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/context-nl.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context.el b/aquamacs/src/site-lisp/edit-modes/auctex/context.el index 115f3241b3cd..f7042a69fb14 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/context.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/context.el @@ -1,6 +1,6 @@ ;;; context.el --- Support for ConTeXt documents. -;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. ;; Maintainer: Berend de Boer ;; Keywords: tex @@ -76,7 +76,7 @@ ;; others -(setq ConTeXt-known-interfaces '("cz" "de" "en" "it" "nl" "ro" "uk")) +(defvar ConTeXt-known-interfaces '("cz" "de" "en" "it" "nl" "ro" "uk")) (defcustom ConTeXt-default-interface "en" "Default interface to be used when running ConTeXt." @@ -145,6 +145,23 @@ (ConTeXt-arg-setup nil)) +;; Referencing ConTeXt macro's + +(defvar ConTeXt-referencing-list () + "Calls ConTeXt-XX-other-macro-list where XX is the current interface.") + +(defun ConTeXt-referencing-command (what) + "The ConTeXt macro to call WHAT is itself, no interface specific calls." + what) + +(defun ConTeXt-insert-referencing (what) + "Insert the ConTeXt referencing SETUP." + (insert TeX-esc (ConTeXt-referencing-command what)) + (newline) + (indent-according-to-mode) + (ConTeXt-arg-setup nil)) + + ;; Other ConTeXt macro's (defvar ConTeXt-other-macro-list () @@ -398,6 +415,7 @@ To get a full featured `ConTeXt-section' command, insert ConTeXt-section-ref)) in your .emacs file." + :group 'ConTeXt-macro :type 'hook :options '(ConTeXt-section-heading @@ -509,7 +527,7 @@ inserted after the sectioning command." (setq ConTeXt-menu-changed t)) ;; (defvar ConTeXt-environment-list () -;; "ConTeXt-environment-list-XX where XX is the current interface.") +;; "ConTeXt-environment-list-XX where XX is the current interface.") (defvar ConTeXt-environment-history nil) @@ -522,7 +540,7 @@ inserted after the sectioning command." "start") (t ;; this should not happen - (error "Unknown interface: " ConTeXt-current-interface)))) + (error "Unknown interface: %s" ConTeXt-current-interface)))) (defun ConTeXt-environment-stop-name () "Return the \\stop translated to the language in current interface." @@ -533,7 +551,7 @@ inserted after the sectioning command." "stop") (t ;; this should not happen - (error "Unknown interface: " ConTeXt-current-interface)))) + (error "Unknown interface: %s" ConTeXt-current-interface)))) (defun ConTeXt-environment (arg) @@ -733,7 +751,7 @@ An entry looks like: (\"environment\" . function)") (defun ConTeXt-last-unended-start () "Leave point at the beginning of the last `\\start...' that is unstopped looking from the current cursor." (while (and (re-search-backward "\\\\start[a-zA-Z]*\\|\\\\stop[a-zA-Z]*") - (looking-at "\\\\stop[a-zA-Z]*")) + (looking-at "\\\\stop[a-zA-Z]*")) (ConTeXt-last-unended-start))) (defun ConTeXt-mark-environment (&optional inner) @@ -1246,6 +1264,17 @@ else. There might be text before point." "Insert SETUP from menu." (ConTeXt-insert-setup setup)) +;; ConTeXt referencing macros +(defvar ConTeXt-referencing-menu-name "Referencing") + +(defun ConTeXt-referencing-menu-entry (entry) + "Create an entry for the referencing menu." + (vector entry (list 'ConTeXt-referencing-menu entry))) + +(defun ConTeXt-referencing-menu (referencing) + "Insert REFERENCING from menu." + (ConTeXt-insert-referencing referencing)) + ;; ConTeXt other macros (defvar ConTeXt-other-macro-menu-name "Other macro") @@ -1399,7 +1428,7 @@ else. There might be text before point." (TeX-update-style) (setq ConTeXt-menu-changed nil) (message "Updating section menu...") - (mapcar 'ConTeXt-section-enable ConTeXt-section-list) + (mapc 'ConTeXt-section-enable ConTeXt-section-list) (message "Updating environment menu...") (easy-menu-change '("ConTeXt") ConTeXt-environment-menu-name (LaTeX-split-long-menu @@ -1420,6 +1449,11 @@ else. There might be text before point." (LaTeX-split-long-menu (mapcar 'ConTeXt-setup-menu-entry ConTeXt-setup-list))) + (message "Updating referencing menu...") + (easy-menu-change '("ConTeXt") ConTeXt-referencing-menu-name + (LaTeX-split-long-menu + (mapcar 'ConTeXt-referencing-menu-entry + ConTeXt-referencing-list))) (message "Updating other macro's menu...") (easy-menu-change '("ConTeXt") ConTeXt-other-macro-menu-name (LaTeX-split-long-menu @@ -1452,16 +1486,16 @@ else. There might be text before point." (defun ConTeXt-expand-options () "Expand options for texexec command." (concat - (and TeX-PDF-mode "--pdf ") - (if TeX-Omega-mode - (and ConTeXt-Omega-engine - (format "--tex=%s " ConTeXt-Omega-engine)) - (and ConTeXt-engine - (format "--tex=%s " ConTeXt-engine))) + (let ((engine (nth 4 (assq TeX-engine (TeX-engine-alist))))) + (when engine + (format "--engine=%s " engine))) (unless (eq ConTeXt-current-interface "en") (format "--interface=%s " ConTeXt-current-interface)) - (when TeX-source-specials-mode - (format "--passon=\"%s\" " TeX-source-specials-tex-flags)) + (when TeX-source-correlate-mode + (format "--passon=\"%s\" " + (if (eq TeX-source-correlate-method-active 'synctex) + TeX-synctex-tex-flags + TeX-source-specials-tex-flags))) (unless TeX-interactive-mode ConTeXt-texexec-option-nonstop))) @@ -1471,9 +1505,9 @@ else. There might be text before point." ;; They are mapped to interface specific variables (defvar ConTeXt-language-variable-list - '(ConTeXt-define-list ConTeXt-setup-list ConTeXt-other-macro-list - ConTeXt-project-structure-list - ConTeXt-section-block-list ConTeXt-section-list + '(ConTeXt-define-list ConTeXt-setup-list ConTeXt-referencing-list ConTeXt-other-macro-list + ConTeXt-project-structure-list + ConTeXt-section-block-list ConTeXt-section-list ConTeXt-text ConTeXt-item-list)) (defcustom ConTeXt-clean-intermediate-suffixes diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/context.elc b/aquamacs/src/site-lisp/edit-modes/auctex/context.elc deleted file mode 100644 index 1156f48a9a5d..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/context.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.el b/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.el index 038157789821..66f24ead9800 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.el @@ -446,7 +446,11 @@ and `font-latex-make-user-keywords' and not intended for general use." ;; Note: The functions are byte-compiled at the end of font-latex.el. ;; FIXME: Is the cond-clause possible inside of the defun? - (cond ((eq type 'command) + + ;; In an earlier version of font-latex the type could be a list like + ;; (command 1). This indicated a macro with one argument. Provide + ;; a match function in this case but don't actually support it. + (cond ((or (eq type 'command) (listp type)) (eval `(defun ,(intern (concat prefix name)) (limit) ,(concat "Fontify `" prefix name "' up to LIMIT. @@ -494,7 +498,10 @@ construct to be highlighted. Currently the symbols 'command, This is a helper function for `font-latex-make-built-in-keywords' and `font-latex-make-user-keywords' and not intended for general use." - (cond ((eq type 'command) + ;; In an earlier version of font-latex the type could be a list like + ;; (command 1). This indicated a macro with one argument. Provide + ;; a matcher in this case but don't actually support it. + (cond ((or (eq type 'command) (listp type)) `(,(intern (concat prefix name)) (0 (font-latex-matched-face 0) append t) (1 (font-latex-matched-face 1) append t) @@ -528,16 +535,15 @@ use." ',keywords ,(concat "Buffer-local keywords to add to `" prefix name "-keywords'. -This must be a list of keyword strings \(not regular expressions\) omitting -the leading backslash. It will get transformed into a regexp using -`" prefix name "-make'. This variable is not for end users; they -should customize `" prefix name "-keywords' instead. It is for -authors of Lisp files that get loaded when LaTeX style files are used in the -current buffer. They should add keywords to this list and rebuild the -fontification regexp like so: - (add-to-list '" prefix name "-keywords-local \"setstuff\") - (" prefix name "-make) +This must be a list where each element is a list consisting of a +keyword string \(not a regular expression\) omitting the leading +backslash and a format specifier as. The options for the format +specifier are described in the doc string of +`font-latex-user-keyword-classes'. + +This is an internal variable which should not be set directly. +Use `font-latex-add-keywords' instead. Generated by `font-latex-make-built-in-keywords'."))) (eval `(make-variable-buffer-local @@ -576,15 +582,27 @@ Generated by `font-latex-make-built-in-keywords'.") ;; defcustom font-latex-match-*-keywords (eval `(defcustom ,(intern (concat prefix name "-keywords")) nil - ,(concat "List of keyword strings for " name " face. -Each string has to be the name of a macro omitting the leading backslash. - -Setting this variable directly does not take effect; -restart Emacs. + ,(concat "List of keywords " + (when (eq type 'command) "and formats ") + "for " name " face.\n" + (if (eq type 'command) + "\ +Each element has to be a list consisting of the name of a macro +omitting the leading backslash and a format specifier as +described in the doc string of `font-latex-user-keyword-classes'." + "\ +Each element has to be the name of a macro as a string, omitting +the leading backslash.") + "\n\n\ +Setting this variable directly does not take effect; restart +Emacs. Generated by `font-latex-make-built-in-keywords'.") - :type '(repeat (list (string :tag "Keyword") - (string :tag "Format"))) + :type '(repeat (string :tag "Keyword")) + :type '(repeat ,(if (eq type 'command) + '(list (string :tag "Keyword") + (string :tag "Format")) + '(string :tag "Keyword"))) :set (lambda (symbol value) (set-default symbol value) (funcall ',(intern (concat prefix name "-make")))) @@ -1059,6 +1077,29 @@ returned. All specified functions will be called and the region extended backwards to the minimum over their return values.") +(defvar font-latex-syntax-alist + ;; Use word syntax for @ because we use \> for matching macros and + ;; we don't want \foo@bar to be found if we search for \foo. + '((?\( . ".") (?\) . ".") (?$ . "\"") (?@ . "w")) + "List of specifiers for the syntax alist of `font-lock-defaults'.") + +(defun font-latex-add-to-syntax-alist (list) + "Activate syntactic font locking for the entries in LIST. +The entries are added to `font-latex-syntax-alist' and eventually +end up in `font-lock-defaults'. Each entry in LIST should be a +cons pair as expected by `font-lock-defaults'. The function also +triggers Font Lock to recognize the change." + (make-local-variable 'font-latex-syntax-alist) + (nconc font-latex-syntax-alist list) +;; FIXME: Are there situations where we need to alter `font-lock-defaults' +;; directly? +;; (dolist (entry list) +;; (setcar (cdddr font-lock-defaults) +;; (cons entry (cadddr font-lock-defaults)))) + ;; Tell font-lock about the update. + (setq font-lock-set-defaults nil) + (font-lock-set-defaults)) + ;;;###autoload (defun font-latex-setup () "Setup this buffer for LaTeX font-lock. Usually called from a hook." @@ -1068,17 +1109,17 @@ backwards to the minimum over their return values.") (when (fboundp 'built-in-face-specifiers) ;; Cool patch from Christoph Wedler... (let (instance) - (mapcar (lambda (property) - (setq instance - (face-property-instance 'font-latex-math-face property - nil 0 t)) - (if (numberp instance) - (setq instance - (face-property-instance 'default property nil 0))) - (or (numberp instance) - (set-face-property 'font-lock-string-face property - instance (current-buffer)))) - (built-in-face-specifiers)))) + (mapc (lambda (property) + (setq instance + (face-property-instance 'font-latex-math-face property + nil 0 t)) + (if (numberp instance) + (setq instance + (face-property-instance 'default property nil 0))) + (or (numberp instance) + (set-face-property 'font-lock-string-face property + instance (current-buffer)))) + (built-in-face-specifiers)))) ;; Activate multi-line fontification facilities if available. (when (boundp 'font-lock-multiline) @@ -1101,10 +1142,8 @@ backwards to the minimum over their return values.") ;; `VirTeX-common-initialization' and place it in the different ;; `xxx-mode' calls instead, but _after_ `major-mode' is set. (let ((defaults - '((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2) - ;; Use word syntax for @ because we use \> for matching macros - ;; and we don't want \foo@bar to be found if we search for \foo. - nil nil ((?\( . ".") (?\) . ".") (?$ . "\"") (?@ . "w")) nil)) + `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2) + nil nil ,font-latex-syntax-alist nil)) (variables '((font-lock-comment-start-regexp . "%") (font-lock-mark-block-function . mark-paragraph) @@ -1134,8 +1173,8 @@ backwards to the minimum over their return values.") (progn ;; XEmacs does not set these variables via `font-lock-defaults' ;; but requires them to be set explicitely. - (mapcar (lambda (alist) - (set (car alist) (cdr alist))) variables) + (mapc (lambda (alist) + (set (car alist) (cdr alist))) variables) ;; Has to be set to t as otherwise syntax properties will not be ;; be picked up during fontification. (set (make-local-variable 'lookup-syntax-properties) t)) @@ -1247,16 +1286,7 @@ ignored during the search." (condition-case nil (progn (goto-char (with-syntax-table - (let ((table (TeX-search-syntax-table))) - ;; Give `openchar' and `closechar' open paren and - ;; close paren syntax respectively. - (modify-syntax-entry - openchar (concat "(" (char-to-string closechar)) - table) - (modify-syntax-entry - closechar (concat ")" (char-to-string openchar)) - table) - table) + (TeX-search-syntax-table openchar closechar) (scan-sexps (point) 1))) ;; No error code. See if closechar is unquoted (save-excursion @@ -1562,16 +1592,18 @@ Used for patterns like: (while (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t) (unless (save-excursion (goto-char (match-beginning 0)) - (eq (preceding-char) ?\\)) ; \\[ is not a math environment + ;; \\[ does not start a math environment + (/= (mod (skip-chars-backward "\\\\") 2) 0)) (let ((beg (match-beginning 0)) (open-tag (if (match-beginning 1) "\\(" "\\[")) (close-tag (if (match-beginning 1) "\\)" "\\]"))) ;; Search for both opening and closing tags in order to be ;; able to avoid erroneously matching stuff like "\(foo \(bar\)". - (if (and (re-search-forward (concat (regexp-quote open-tag) "\\|" - (regexp-quote close-tag)) + (if (and (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*\\(" + (regexp-quote open-tag) "\\|" + (regexp-quote close-tag) "\\)") limit 'move) - (string= (match-string 0) close-tag)) + (string= (match-string 1) close-tag)) ;; Found closing tag. (progn (font-latex-put-multiline-property-maybe beg (point)) @@ -1590,8 +1622,13 @@ END marks boundaries for searching for environment ends." (goto-char end) (catch 'extend (while (re-search-backward "\\(\\\\)\\)\\|\\(\\\\]\\)" beg t) - (when (and (search-backward (if (match-beginning 1) "\\(" "\\[") - (- beg font-latex-multiline-boundary) t) + (when (and (zerop (mod (skip-chars-backward "\\\\") 2)) + (re-search-backward + (concat "[^\\]\\(?:\\\\\\\\\\)*\\(" + (regexp-quote (if (match-beginning 1) "\\(" "\\[")) + "\\)") + (- beg font-latex-multiline-boundary) t) + (goto-char (match-beginning 1)) (< (point) beg)) (throw 'extend (point)))) nil))) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.elc deleted file mode 100644 index a2bdcc259b5a..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/font-latex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/latex.el b/aquamacs/src/site-lisp/edit-modes/auctex/latex.el index 52a7ca1d2e2b..23297a67c405 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/latex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/latex.el @@ -1,7 +1,7 @@ ;;; latex.el --- Support for LaTeX documents. -;; Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, -;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2003, +;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex @@ -612,12 +612,16 @@ With prefix-argument, reopen environment afterwards." marker)) (move-marker marker nil))))) +(defvar LaTeX-after-insert-env-hooks nil + "List of functions to be run at the end of `LaTeX-insert-environment'. +Each function is called with three arguments: the name of the +environment just inserted, the buffer position just before +\\begin and the position just before \\end.") + (defun LaTeX-insert-environment (environment &optional extra) "Insert LaTeX ENVIRONMENT with optional argument EXTRA." (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point))))) - (macrocode-p (and (eq major-mode 'doctex-mode) - (string-match "\\`macrocode\\*?\\'" environment))) - prefix content-start) + prefix content-start env-start env-end) (when (and active-mark (< (mark) (point))) (exchange-point-and-mark)) ;; Compute the prefix. (when (and LaTeX-insert-into-comments (TeX-in-commented-line)) @@ -663,7 +667,8 @@ With prefix-argument, reopen environment afterwards." (newline) (when prefix (insert prefix)))))) ;; Now insert the environment. - (if macrocode-p (insert "%") (when prefix (insert prefix))) + (when prefix (insert prefix)) + (setq env-start (point)) (insert TeX-esc "begin" TeX-grop environment TeX-grcl) (indent-according-to-mode) (when extra (insert extra)) @@ -673,7 +678,8 @@ With prefix-argument, reopen environment afterwards." (when prefix (insert prefix)) (newline)) (when active-mark (goto-char (mark))) - (if macrocode-p (insert "%") (when prefix (insert prefix))) + (when prefix (insert prefix)) + (setq env-end (point)) (insert TeX-esc "end" TeX-grop environment TeX-grcl) (end-of-line 0) (if active-mark @@ -682,8 +688,10 @@ With prefix-argument, reopen environment afterwards." (LaTeX-fill-region content-start (line-beginning-position 2))) (set-mark content-start)) (indent-according-to-mode)) - (save-excursion (beginning-of-line 2) (indent-according-to-mode))) - (TeX-math-input-method-off)) + (save-excursion (beginning-of-line 2) (indent-according-to-mode)) + (TeX-math-input-method-off) + (run-hook-with-args 'LaTeX-after-insert-env-hooks + environment env-start env-end))) (defun LaTeX-modify-environment (environment) "Modify current ENVIRONMENT." @@ -720,33 +728,21 @@ work analogously." (let* ((in-comment (TeX-in-commented-line)) (comment-prefix (and in-comment (TeX-comment-prefix)))) (save-excursion - (while (and - (/= arg 0) - (re-search-backward - (concat (regexp-quote TeX-esc) "begin" (regexp-quote TeX-grop) - "\\|" - (regexp-quote TeX-esc) "end" (regexp-quote TeX-grop)) - nil t 1) - (or (and LaTeX-syntactic-comments + (while (and (/= arg 0) + (re-search-backward + "\\\\\\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *}" nil t)) + (when (or (and LaTeX-syntactic-comments (eq in-comment (TeX-in-commented-line)) - ;; If we are in a commented line, check if the - ;; prefix matches the one we started out with. (or (not in-comment) + ;; Consider only matching prefixes in the + ;; commented case. (string= comment-prefix (TeX-comment-prefix)))) (and (not LaTeX-syntactic-comments) - (not (TeX-in-commented-line))))) - (cond ((looking-at (concat "[ \t]*" (regexp-quote TeX-esc) - "end" (regexp-quote TeX-grop))) - (setq arg (1+ arg))) - (t - (setq arg (1- arg))))) + (not (TeX-in-commented-line)))) + (setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg))))) (if (/= arg 0) "document" - (search-forward TeX-grop) - (let ((beg (point))) - (search-forward TeX-grcl) - (backward-char 1) - (buffer-substring-no-properties beg (point))))))) + (match-string-no-properties 2))))) (defun docTeX-in-macrocode-p () "Determine if point is inside a macrocode environment." @@ -769,7 +765,6 @@ To insert a hook here, you must insert it in the appropiate style file.") "Create new LaTeX document. The compatibility argument IGNORE is ignored." (TeX-insert-macro "documentclass") - (LaTeX-newline) (LaTeX-newline) (LaTeX-newline) @@ -861,6 +856,10 @@ If nil, act like the empty string is given, but do not prompt." "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) (delete-region (point) (line-end-position))) (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (TeX-deactivate-mark) (LaTeX-insert-item) ;; The inserted \item may have outdented the first line to the ;; right. Fill it, if appropriate. @@ -1097,6 +1096,14 @@ Just like array and tabular." TeX-grcl)) (delete-horizontal-space)) +(defun LaTeX-env-args (environment &rest args) + "Insert ENVIRONMENT and arguments defined by ARGS." + (LaTeX-insert-environment environment) + (let ((pos (point-marker))) + (end-of-line 0) + (TeX-parse-arguments args) + (goto-char pos))) + ;;; Item hooks (defvar LaTeX-item-list nil @@ -1108,7 +1115,10 @@ The cdr is the name of the function, used to insert this kind of items.") You may use `LaTeX-item-list' to change the routines used to insert the item." (interactive "*") (let ((environment (LaTeX-current-environment))) - (LaTeX-newline) + (when (and (TeX-active-mark) + (> (point) (mark))) + (exchange-point-and-mark)) + (unless (bolp) (LaTeX-newline)) (if (assoc environment LaTeX-item-list) (funcall (cdr (assoc environment LaTeX-item-list))) (TeX-insert-macro "item")) @@ -1304,49 +1314,49 @@ The input string may include LaTeX comments and newlines." (add-to-list 'TeX-auto-file "latex2")))))) ;; Cleanup optional arguments - (mapcar (lambda (entry) - (add-to-list 'TeX-auto-symbol - (list (nth 0 entry) - (string-to-int (nth 1 entry))))) - LaTeX-auto-arguments) + (mapc (lambda (entry) + (add-to-list 'TeX-auto-symbol + (list (nth 0 entry) + (string-to-number (nth 1 entry))))) + LaTeX-auto-arguments) ;; Cleanup default optional arguments - (mapcar (lambda (entry) - (add-to-list 'TeX-auto-symbol - (list (nth 0 entry) - (vector "argument") - (1- (string-to-int (nth 1 entry)))))) - LaTeX-auto-optional) + (mapc (lambda (entry) + (add-to-list 'TeX-auto-symbol + (list (nth 0 entry) + (vector "argument") + (1- (string-to-number (nth 1 entry)))))) + LaTeX-auto-optional) ;; Cleanup environments arguments - (mapcar (lambda (entry) - (add-to-list 'LaTeX-auto-environment - (list (nth 0 entry) - (string-to-int (nth 1 entry))))) - LaTeX-auto-env-args) + (mapc (lambda (entry) + (add-to-list 'LaTeX-auto-environment + (list (nth 0 entry) + (string-to-number (nth 1 entry))))) + LaTeX-auto-env-args) ;; Cleanup use of def to add environments ;; NOTE: This uses an O(N^2) algorithm, while an O(N log N) ;; algorithm is possible. - (mapcar (lambda (symbol) - (if (not (TeX-member symbol TeX-auto-symbol 'equal)) - ;; No matching symbol, insert in list - (add-to-list 'TeX-auto-symbol (concat "end" symbol)) - ;; Matching symbol found, remove from list - (if (equal (car TeX-auto-symbol) symbol) - ;; Is it the first symbol? - (setq TeX-auto-symbol (cdr TeX-auto-symbol)) - ;; Nope! Travel the list - (let ((list TeX-auto-symbol)) - (while (consp (cdr list)) - ;; Until we find it. - (if (equal (car (cdr list)) symbol) - ;; Then remove it. - (setcdr list (cdr (cdr list)))) - (setq list (cdr list))))) - ;; and add the symbol as an environment. - (add-to-list 'LaTeX-auto-environment symbol))) - LaTeX-auto-end-symbol)) + (mapc (lambda (symbol) + (if (not (TeX-member symbol TeX-auto-symbol 'equal)) + ;; No matching symbol, insert in list + (add-to-list 'TeX-auto-symbol (concat "end" symbol)) + ;; Matching symbol found, remove from list + (if (equal (car TeX-auto-symbol) symbol) + ;; Is it the first symbol? + (setq TeX-auto-symbol (cdr TeX-auto-symbol)) + ;; Nope! Travel the list + (let ((list TeX-auto-symbol)) + (while (consp (cdr list)) + ;; Until we find it. + (if (equal (car (cdr list)) symbol) + ;; Then remove it. + (setcdr list (cdr (cdr list)))) + (setq list (cdr list))))) + ;; and add the symbol as an environment. + (add-to-list 'LaTeX-auto-environment symbol))) + LaTeX-auto-end-symbol)) (add-hook 'TeX-auto-cleanup-hook 'LaTeX-auto-cleanup) @@ -1403,22 +1413,28 @@ It will setup BibTeX to store keys in an auto file." ;;; Macro Argument Hooks -;; FIXME: Make doc-strings of the following functions checkdoc clean. -;; Especially the "optional" argument. -- rs - (defun TeX-arg-conditional (optional expr then else) "Implement if EXPR THEN ELSE. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. + If EXPR evaluate to true, parse THEN as an argument list, else parse ELSE as an argument list." (TeX-parse-arguments (if (eval expr) then else))) (defun TeX-arg-eval (optional &rest args) - "Evaluate args and insert value in buffer." + "Evaluate ARGS and insert value in buffer. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." (TeX-argument-insert (eval args) optional)) (defun TeX-arg-label (optional &optional prompt definition) - "Prompt for a label completing with known labels." + "Prompt for a label completing with known labels. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen label to the +list of defined labels." (let ((label (completing-read (TeX-argument-prompt optional prompt "Key") (LaTeX-label-list)))) (if (and definition (not (string-equal "" label))) @@ -1428,7 +1444,12 @@ ELSE as an argument list." (defalias 'TeX-arg-ref 'TeX-arg-label) (defun TeX-arg-index-tag (optional &optional prompt &rest args) - "Prompt for an index tag. This is the name of an index, not the entry." + "Prompt for an index tag. +This is the name of an index, not the entry. + +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. ARGS is unused." (let (tag) (setq prompt (concat (if optional "(Optional) " "") (if prompt prompt "Index tag") @@ -1437,7 +1458,10 @@ ELSE as an argument list." (TeX-argument-insert tag optional))) (defun TeX-arg-index (optional &optional prompt &rest args) - "Prompt for an index entry completing with known entries." + "Prompt for an index entry completing with known entries. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. ARGS is unused." (let ((entry (completing-read (TeX-argument-prompt optional prompt "Key") (LaTeX-index-entry-list)))) (if (and (not (string-equal "" entry)) @@ -1448,7 +1472,11 @@ ELSE as an argument list." (defalias 'TeX-arg-define-index 'TeX-arg-index) (defun TeX-arg-macro (optional &optional prompt definition) - "Prompt for a TeX macro with completion." + "Prompt for a TeX macro with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen macro to the +list of defined macros." (let ((macro (completing-read (TeX-argument-prompt optional prompt (concat "Macro: " TeX-esc) @@ -1459,7 +1487,11 @@ ELSE as an argument list." (TeX-argument-insert macro optional TeX-esc))) (defun TeX-arg-environment (optional &optional prompt definition) - "Prompt for a LaTeX environment with completion." + "Prompt for a LaTeX environment with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen environment to +the list of defined environments." (let ((environment (completing-read (TeX-argument-prompt optional prompt "Environment") (TeX-symbol-list)))) @@ -1468,8 +1500,12 @@ ELSE as an argument list." (TeX-argument-insert environment optional))) +;; Why is DEFINITION unused? (defun TeX-arg-cite (optional &optional prompt definition) - "Prompt for a BibTeX citation with completion." + "Prompt for a BibTeX citation with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. DEFINITION is unused." (setq prompt (concat (if optional "(Optional) " "") (if prompt prompt "Add key") ": (default none) ")) @@ -1477,15 +1513,23 @@ ELSE as an argument list." (apply 'LaTeX-add-bibitems items) (TeX-argument-insert (mapconcat 'identity items ",") optional optional))) +;; Why is DEFINITION unused? (defun TeX-arg-counter (optional &optional prompt definition) - "Prompt for a LaTeX counter." + "Prompt for a LaTeX counter. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. DEFINITION is unused." ;; Completion not implemented yet. (TeX-argument-insert (read-string (TeX-argument-prompt optional prompt "Counter")) optional)) +;; Why is DEFINITION unused? (defun TeX-arg-savebox (optional &optional prompt definition) - "Prompt for a LaTeX savebox." + "Prompt for a LaTeX savebox. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. DEFINITION is unused." ;; Completion not implemented yet. (TeX-argument-insert (read-string (TeX-argument-prompt optional prompt @@ -1494,34 +1538,55 @@ ELSE as an argument list." optional TeX-esc)) (defun TeX-arg-file (optional &optional prompt) - "Prompt for a filename in the current directory." + "Prompt for a filename in the current directory. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-argument-insert (read-file-name (TeX-argument-prompt optional prompt "File") "" "" nil) optional)) (defun TeX-arg-define-label (optional &optional prompt) - "Prompt for a label completing with known labels." + "Prompt for a label completing with known labels. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-label optional prompt t)) (defun TeX-arg-define-macro (optional &optional prompt) - "Prompt for a TeX macro with completion." + "Prompt for a TeX macro with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-macro optional prompt t)) (defun TeX-arg-define-environment (optional &optional prompt) - "Prompt for a LaTeX environment with completion." + "Prompt for a LaTeX environment with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-environment optional prompt t)) (defun TeX-arg-define-cite (optional &optional prompt) - "Prompt for a BibTeX citation." + "Prompt for a BibTeX citation. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-cite optional prompt t)) (defun TeX-arg-define-counter (optional &optional prompt) - "Prompt for a LaTeX counter." + "Prompt for a LaTeX counter. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-counter optional prompt t)) (defun TeX-arg-define-savebox (optional &optional prompt) - "Prompt for a LaTeX savebox." + "Prompt for a LaTeX savebox. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-arg-savebox optional prompt t)) (defcustom LaTeX-style-list '(("amsart") @@ -1545,7 +1610,8 @@ ELSE as an argument list." :type '(repeat (group (string :format "%v")))) (defun TeX-arg-document (optional &optional ignore) - "Insert arguments to documentclass." + "Insert arguments to documentclass. +OPTIONAL and IGNORE are ignored." (let ((style (completing-read (concat "Document class: (default " LaTeX-default-style ") ") LaTeX-style-list)) @@ -1568,7 +1634,8 @@ ELSE as an argument list." (TeX-update-style)) (defun LaTeX-arg-usepackage (optional) - "Insert arguments to usepackage." + "Insert arguments to usepackage. +OPTIONAL is ignored." (let ((TeX-file-extensions '("sty"))) (TeX-arg-input-file nil "Package") (save-excursion @@ -1601,7 +1668,7 @@ ELSE as an argument list." ;; in the style list can come from documentclass options and ;; does not necessarily mean that the babel-related ;; extensions should be activated. - (mapcar 'TeX-run-style-hooks (LaTeX-listify-package-options options)) + (mapc 'TeX-run-style-hooks (LaTeX-listify-package-options options)) (TeX-argument-insert options t)))))) (defvar TeX-global-input-files nil @@ -1610,11 +1677,12 @@ ELSE as an argument list." Initialized once at the first time you prompt for an input file. May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") -(defun TeX-arg-input-file (optionel &optional prompt local) +(defun TeX-arg-input-file (optional &optional prompt local) "Prompt for a tex or sty file. - -First optional argument is the prompt, the second is a flag. -If the flag is set, only complete with local files." +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. PROMPT is the prompt, +LOCAL is a flag. If the flag is set, only complete with local +files." (unless (or TeX-global-input-files local) (message "Searching for files...") (setq TeX-global-input-files @@ -1623,7 +1691,7 @@ If the flag is set, only complete with local files." TeX-file-extensions t t)))) (let ((file (if TeX-check-path (completing-read - (TeX-argument-prompt optionel prompt "File") + (TeX-argument-prompt optional prompt "File") (TeX-delete-dups-by-car (append (mapcar 'list (TeX-search-files '("./") @@ -1632,12 +1700,12 @@ If the flag is set, only complete with local files." (unless local TeX-global-input-files)))) (read-file-name - (TeX-argument-prompt optionel prompt "File"))))) + (TeX-argument-prompt optional prompt "File"))))) (if (null file) (setq file "")) (if (not (string-equal "" file)) (TeX-run-style-hooks file)) - (TeX-argument-insert file optionel))) + (TeX-argument-insert file optional))) (defvar BibTeX-global-style-files nil "Association list of BibTeX style files. @@ -1646,7 +1714,10 @@ Initialized once at the first time you prompt for an input file. May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") (defun TeX-arg-bibstyle (optional &optional prompt) - "Prompt for a BibTeX style file." + "Prompt for a BibTeX style file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (message "Searching for BibTeX styles...") (or BibTeX-global-style-files (setq BibTeX-global-style-files @@ -1671,7 +1742,10 @@ Initialized once at the first time you prompt for an BibTeX file. May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") (defun TeX-arg-bibliography (optional &optional prompt) - "Prompt for a BibTeX database file." + "Prompt for a BibTeX database file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (message "Searching for BibTeX files...") (or BibTeX-global-files (setq BibTeX-global-files @@ -1689,7 +1763,10 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") (TeX-argument-insert (mapconcat 'identity styles ",") optional))) (defun TeX-arg-corner (optional &optional prompt) - "Prompt for a LaTeX side or corner position with completion." + "Prompt for a LaTeX side or corner position with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-argument-insert (completing-read (TeX-argument-prompt optional prompt "Position") '(("") ("l") ("r") ("t") ("b") ("tl") ("tr") ("bl") ("br")) @@ -1697,7 +1774,10 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") optional)) (defun TeX-arg-lr (optional &optional prompt) - "Prompt for a LaTeX side with completion." + "Prompt for a LaTeX side with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-argument-insert (completing-read (TeX-argument-prompt optional prompt "Position") '(("") ("l") ("r")) @@ -1705,7 +1785,10 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") optional)) (defun TeX-arg-tb (optional &optional prompt) - "Prompt for a LaTeX side with completion." + "Prompt for a LaTeX side with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-argument-insert (completing-read (TeX-argument-prompt optional prompt "Position") '(("") ("t") ("b")) @@ -1713,7 +1796,10 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") optional)) (defun TeX-arg-pagestyle (optional &optional prompt) - "Prompt for a LaTeX pagestyle with completion." + "Prompt for a LaTeX pagestyle with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (TeX-argument-insert (completing-read (TeX-argument-prompt optional prompt "Pagestyle") '(("plain") ("empty") ("headings") ("myheadings"))) @@ -1725,7 +1811,9 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") :type 'character) (defun TeX-arg-verb (optional &optional ignore) - "Prompt for delimiter and text." + "Prompt for delimiter and text. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. IGNORE is ignored." (let ((del (read-quoted-char (concat "Delimiter: (default " (char-to-string LaTeX-default-verb-delimiter) ") ")))) @@ -1742,16 +1830,23 @@ May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") "Insert a pair of number, prompted by FIRST and SECOND. The numbers are surounded by parenthesizes and separated with a -comma." +comma. + +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." (insert "(" (read-string (concat first ": ")) "," (read-string (concat second ": ")) ")")) (defun TeX-arg-size (optional) - "Insert width and height as a pair." + "Insert width and height as a pair. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." (TeX-arg-pair optional "Width" "Height")) (defun TeX-arg-coordinate (optional) - "Insert x and y coordinate as a pair." + "Insert x and y coordinate as a pair. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." (TeX-arg-pair optional "X position" "Y position")) (defconst TeX-braces-default-association @@ -1794,6 +1889,10 @@ the cdr is the brace used with \\right.") "List of symbols which can follow the \\left or \\right command.") (defun TeX-arg-insert-braces (optional &optional prompt) + "Prompt for a brace for \\left and insert the corresponding \\right. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." (save-excursion (backward-word 1) (backward-char) @@ -1822,6 +1921,20 @@ the cdr is the brace used with \\right.") TeX-left-right-braces))) (indent-according-to-mode))))) +(defun TeX-arg-key-val (optional key-val-alist) + "Prompt for keys and values in KEY-VAL-ALIST. +Insert the given value as a TeX macro argument. If OPTIONAL is +non-nil, insert it as an optional argument. KEY-VAL-ALIST is an +alist. The car of each element should be a string representing a +key and the optional cdr should be a list with strings to be used +as values for the key." + (let ((options (multi-prompt-key-value + (TeX-argument-prompt optional "Options (k=v)" nil) + (if (symbolp key-val-alist) + (eval key-val-alist) + key-val-alist)))) + (TeX-argument-insert options optional))) + ;;; Verbatim constructs @@ -1917,15 +2030,17 @@ non-parenthetical delimiters, like \\verb+foo+, are recognized." (save-excursion (let ((orig (point)) (verbatim-regexp (regexp-opt (LaTeX-verbatim-macros-with-delims) t))) + ;; Search backwards for the macro start, unless we are facing one (unless (looking-at (concat (regexp-quote TeX-esc) verbatim-regexp)) (catch 'found (while (progn (skip-chars-backward (concat "^\n" (regexp-quote TeX-esc)) (line-beginning-position)) (when (looking-at verbatim-regexp) (throw 'found nil)) - (forward-char -1) + (or (bobp) (forward-char -1)) (/= (point) (line-beginning-position)))))) - (unless (= (point) (line-beginning-position)) + ;; Search forward for the macro end, unless we failed to find a start + (unless (bolp) (let ((beg (1- (point)))) (goto-char (1+ (match-end 0))) (skip-chars-forward (concat "^" (buffer-substring-no-properties @@ -2744,8 +2859,8 @@ space does not end a sentence, so don't break a line there." (unless (or (bolp) ;; Comment starters and whitespace. (TeX-looking-at-backward - (concat "^\\([ \t]*" TeX-comment-start-regexp - "+\\)+[ \t]*") + (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)*" + "[ \t]*") (line-beginning-position))) (LaTeX-fill-newline))))) ;; Leave point after final newline. @@ -3336,17 +3451,25 @@ environment in commented regions with the same comment prefix." (or (= level 0) (error "Can't locate beginning of current environment")))) -(defun LaTeX-mark-environment () +(defun LaTeX-mark-environment (&optional count) "Set mark to end of current environment and point to the matching begin. -Will not work properly if there are unbalanced begin-end pairs in -comments and verbatim environments" - (interactive) - (let ((cur (point))) - (LaTeX-find-matching-end) - (beginning-of-line 2) - (set-mark (point)) - (goto-char cur) - (LaTeX-find-matching-begin) +If prefix argument COUNT is given, mark the respective number of +enclosing environments. The command will not work properly if +there are unbalanced begin-end pairs in comments and verbatim +environments." + (interactive "p") + (setq count (if count (abs count) 1)) + (let ((cur (point)) beg end) + ;; Only change point and mark after beginning and end were found. + ;; Point should not end up in the middle of nowhere if the search fails. + (save-excursion + (dotimes (c count) (LaTeX-find-matching-end)) + (setq end (line-beginning-position 2)) + (goto-char cur) + (dotimes (c count) (LaTeX-find-matching-begin)) + (setq beg (point))) + (set-mark end) + (goto-char beg) (TeX-activate-region))) (defun LaTeX-fill-environment (justify) @@ -3417,11 +3540,9 @@ value of NO-SUBSECTIONS." (defun LaTeX-paragraph-commands-regexp-make () "Return a regular expression matching defined paragraph commands." - (concat (regexp-quote TeX-esc) - (regexp-opt LaTeX-paragraph-commands-internal t))) - -(defvar LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make) - "Regular expression matching LaTeX macros that should have their own line.") + (concat (regexp-quote TeX-esc) "\\(" + (regexp-opt (append LaTeX-paragraph-commands + LaTeX-paragraph-commands-internal)) "\\)")) (defcustom LaTeX-paragraph-commands nil "List of LaTeX macros that should have their own line. @@ -3433,6 +3554,9 @@ The list should contain macro names without the leading backslash." (setq LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make)))) +(defvar LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make) + "Regular expression matching LaTeX macros that should have their own line.") + (defun LaTeX-set-paragraph-start () "Set `paragraph-start'." (setq paragraph-start @@ -3590,14 +3714,16 @@ This function makes sure that any comment starters found inside of verbatim constructs are not considered." (setq limit (or limit (point-max))) (save-excursion - (catch 'found - (while (progn - (when (and (TeX-re-search-forward-unescaped - TeX-comment-start-regexp limit 'move) - (not (LaTeX-verbatim-p))) - (throw 'found t)) - (< (point) limit)))) - (unless (= (point) limit) (match-beginning 0)))) + (let (start) + (catch 'found + (while (progn + (when (and (TeX-re-search-forward-unescaped + TeX-comment-start-regexp limit 'move) + (not (LaTeX-verbatim-p))) + (setq start (match-beginning 0)) + (throw 'found t)) + (< (point) limit)))) + start))) ;;; Math Minor Mode @@ -3609,7 +3735,7 @@ of verbatim constructs are not considered." (defcustom LaTeX-math-list nil "Alist of your personal LaTeX math symbols. -Each entry should be a list with upto four elements, KEY, VALUE, +Each entry should be a list with up to four elements, KEY, VALUE, MENU and CHARACTER. KEY is the key (after `LaTeX-math-abbrev-prefix') to be redefined @@ -4491,7 +4617,7 @@ The argument IGNORED is not used in any way." (or LaTeX-section-menu (progn (setq LaTeX-section-list-changed nil) - (mapcar 'LaTeX-section-enable LaTeX-section-list) + (mapc 'LaTeX-section-enable LaTeX-section-list) (setq LaTeX-section-menu (mapcar 'LaTeX-section-menu-entry LaTeX-section-list))))) @@ -4725,6 +4851,8 @@ If prefix argument FORCE is non-nil, always insert a regular hyphen." (h-after-h (call-interactively 'self-insert-command)) (t (insert hyphen)))))) +;; Cater for Delete Selection mode +(put 'LaTeX-babel-insert-hyphen 'delete-selection t) (defcustom LaTeX-enable-toolbar t "Enable LaTeX tool bar." @@ -4820,7 +4948,7 @@ runs the hooks in `docTeX-mode-hook'." ;; Make filling and indentation aware of DocStrip guards. (setq paragraph-start (concat paragraph-start "\\|%<") paragraph-separate (concat paragraph-separate "\\|%<") - TeX-comment-start-regexp "%\\(?:<[^>]+>\\)?") + TeX-comment-start-regexp "\\(?:%\\(?:<[^>]+>\\)?\\)") (setq TeX-base-mode-name "docTeX") (TeX-set-mode-name) (funcall TeX-install-font-lock)) @@ -4920,6 +5048,7 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." "\\$\\$" ; Plain TeX display math "\\|$\\)")) + (setq TeX-verbatim-p-function 'LaTeX-verbatim-p) (setq TeX-search-forward-comment-start-function 'LaTeX-search-forward-comment-start) @@ -5316,7 +5445,7 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." (setq optlist (cdr optlist))) ;;(message (format "%S %S" 2eoptlist 2epackages)) (goto-char docline) - (next-line 1) + (forward-line 1) (insert "\\documentclass") (if 2eoptlist (insert "[" diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/latex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/latex.elc deleted file mode 100644 index 6bc7d158afbd..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/latex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/latex/preview.sty b/aquamacs/src/site-lisp/edit-modes/auctex/latex/preview.sty index 7a59afab517b..30402981d457 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/latex/preview.sty +++ b/aquamacs/src/site-lisp/edit-modes/auctex/latex/preview.sty @@ -26,12 +26,12 @@ \NeedsTeXFormat{LaTeX2e} \def\reserved@a #1#2$#3: #4${\xdef#1{\reserved@c #2#4 $}} \def\reserved@c #1 #2${#1} \begingroup \catcode`\_=12 -\reserved@a\pr@version $Name: release_11_85 $ \ifx\pr@version\@empty -\reserved@a\pr@version CVS-$Revision: 1.124 $ \endgroup \else +\reserved@a\pr@version $Name: release_11_86 $ \ifx\pr@version\@empty +\reserved@a\pr@version CVS-$Revision: 1.126 $ \endgroup \else \def\next release_{} \lccode`\_=`. \edef\next{\lowercase{\endgroup \def\noexpand\pr@version{\expandafter\next\pr@version}}} \next \fi -\reserved@a\next $Date: 2008/02/03 14:53:31 $ +\reserved@a\next $Date: 2010/02/14 16:19:00 $ \edef\next{\noexpand\ProvidesPackage{preview}% [\next\space \pr@version\space (AUCTeX/preview-latex)]} \next @@ -77,6 +77,8 @@ store}bind def end}}}} \DeclareOption{pdftex}{% \let\pr@graphicstype\tw@} +\DeclareOption{xetex}{% + \let\pr@graphicstype\thr@@} \begingroup \catcode`\*=11 \@firstofone{\endgroup @@ -271,8 +273,10 @@ Please complain to your document class author}% }% \pr@ship@end {\let\protect\noexpand - \voffset=-\ht\pr@box - \hoffset=\z@ + \ifx\pr@offset@override\@undefined + \voffset=-\ht\pr@box + \hoffset=\z@ + \fi \c@page=\pr@snippet \pr@shipout \ifpr@fixbb\hbox{% @@ -366,7 +370,13 @@ Please complain to your document class author}% \let\output\pr@output \def\pr@typeinfos{\typeout{Preview: Fontsize \f@size pt}% \ifnum\mag=\@m\else\typeout{Preview: Magnification \number\mag}\fi - \ifx\pdfoutput\@undefined \else + \ifx\pdfoutput\@undefined + \ifx\XeTeXversion\@undefined \else + % FIXME: The message should not be emitted if XeTeX does not produce + % PDF. There does not seem to be a primitive for that, though. + \typeout{Preview: PDFoutput 1}% + \fi + \else \ifx\pdfoutput\relax \else \ifnum\pdfoutput>\z@ \typeout{Preview: PDFoutput 1}% diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/latex/prtightpage.def b/aquamacs/src/site-lisp/edit-modes/auctex/latex/prtightpage.def index 0be40a462a54..31516bed9266 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/latex/prtightpage.def +++ b/aquamacs/src/site-lisp/edit-modes/auctex/latex/prtightpage.def @@ -37,11 +37,15 @@ \advance\count@\@ne\ifnum\count@<5 \afterassignment\pr@nextbb\dimen@=\fi} \ifnum\pr@graphicstype=\z@ - \ifcase \ifx\pdfoutput\@undefined \@ne\fi - \ifx\pdfoutput\relax \@ne\fi - \ifnum\pdfoutput>\z@ \tw@\fi \@ne \or - \ExecuteOptions{dvips}\relax \or - \ExecuteOptions{pdftex}\relax\fi\fi + \ifcase + \ifx\XeTeXversion\@undefined + \ifx\pdfoutput\@undefined \@ne\fi + \ifx\pdfoutput\relax \@ne\fi + \ifnum\pdfoutput>\z@ \tw@\fi \@ne + \else \thr@@\fi + \or \ExecuteOptions{dvips}\relax + \or \ExecuteOptions{pdftex}\relax + \or \ExecuteOptions{xetex}\relax\fi\fi \global\let\pr@bbadjust\@empty \pr@addto@front\pr@ship@end{\begingroup \let\next\@gobble @@ -81,6 +85,28 @@ \advance\dimen@\pr@bb@iii \global\pdfpagewidth\dimen@ \global\pdfhorigin-\pr@bb@i}} +\or + \g@addto@macro\pr@ship@end{\dimen@\ht\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@\pr@bb@iv + \dimen@ii=\dimen@ + \voffset=-1in + \advance\voffset\dimen@ + \advance\voffset-\ht\pr@box + \dimen@\dp\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@-\pr@bb@ii + \advance\dimen@\dimen@ii + \global\pdfpageheight\dimen@ + \global\paperheight\dimen@ + \dimen@\wd\pr@box + \ifdim\dimen@<\z@ \dimen@=\z@\fi + \advance\dimen@-\pr@bb@i + \advance\dimen@\pr@bb@iii + \global\pdfpagewidth\dimen@ + \hoffset=-1in + \advance\hoffset-\pr@bb@i + \let\pr@offset@override\@empty} \fi \ifnum\pr@graphicstype=\@ne \preview@delay{\AtBeginDvi{% diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/multi-prompt.el b/aquamacs/src/site-lisp/edit-modes/auctex/multi-prompt.el old mode 100644 new mode 100755 diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/multi-prompt.elc b/aquamacs/src/site-lisp/edit-modes/auctex/multi-prompt.elc deleted file mode 100644 index c389d08c2f16..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/multi-prompt.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el b/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el new file mode 100644 index 000000000000..6c365d3424e4 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el @@ -0,0 +1,311 @@ +;;; plain-tex.el --- Support for plain TeX documents. + +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides support for plain TeX in AUCTeX. + +;;; Code: + +(require 'tex) +(require 'tex-buf) + +;;; Tool bar + +(defcustom plain-TeX-enable-toolbar t + "Enable TeX tool bar in plain TeX mode." + :group 'TeX-tool-bar + :type 'boolean) + +(defun plain-TeX-maybe-install-toolbar () + "Conditionally install tool bar buttons for plain TeX mode. +Install tool bar if `plain-TeX-enable-toolbar' is non-nil." + (when plain-TeX-enable-toolbar + ;; Defined in `tex-bar.el': + (TeX-install-toolbar))) + + +;;; Keymap and menu + +(defvar plain-TeX-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + map) + "Keymap used in plain TeX mode.") + +(defvar plain-TeX-menu-entries + (TeX-menu-with-help + `(["Macro..." TeX-insert-macro + :help "Insert a macro and possibly arguments"] + ["Complete" TeX-complete-symbol + :help "Complete the current macro"] + "-" + ("Insert Font" + ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] + ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] + ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] + ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] + ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] + ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] + ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] + ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] + ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]) + ("Replace Font" + ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] + ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] + ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] + ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] + ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] + ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] + ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] + ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] + ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ["Comment or Uncomment Region" TeX-comment-or-uncomment-region + :help "Comment or uncomment the currently selected region"] + ["Comment or Uncomment Paragraph" TeX-comment-or-uncomment-paragraph + :help "Comment or uncomment the paragraph containing point"] + ,TeX-fold-menu + "-" . ,TeX-common-menu-entries))) + +(easy-menu-define plain-TeX-mode-command-menu + plain-TeX-mode-map + "Command menu used in TeX mode." + (TeX-mode-specific-command-menu 'plain-tex-mode)) + +(easy-menu-define plain-TeX-mode-menu + plain-TeX-mode-map + "Menu used in plain TeX mode." + (cons "TeX" plain-TeX-menu-entries)) + + +;;; The mode + +(defcustom plain-TeX-mode-hook nil + "A hook run in plain TeX mode buffers." + :type 'hook + :group 'TeX-misc) + +;;;###autoload +(defun TeX-plain-tex-mode () + "Major mode in AUCTeX for editing plain TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{plain-TeX-mode-map} + +Entering `plain-tex-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of plain-TeX-mode-hook." + (interactive) + (plain-TeX-common-initialization) + (setq major-mode 'plain-tex-mode) + (use-local-map plain-TeX-mode-map) + (easy-menu-add plain-TeX-mode-menu plain-TeX-mode-map) + (easy-menu-add plain-TeX-mode-command-menu plain-TeX-mode-map) + (setq TeX-base-mode-name "TeX") + (setq TeX-command-default "TeX") + (setq TeX-sentinel-default-function 'TeX-TeX-sentinel) + (add-hook 'tool-bar-mode-on-hook 'plain-TeX-maybe-install-toolbar nil t) + (when (if (featurep 'xemacs) + (featurep 'toolbar) + (and (boundp 'tool-bar-mode) tool-bar-mode)) + (plain-TeX-maybe-install-toolbar)) + (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook) + (TeX-set-mode-name)) + +(defun plain-TeX-common-initialization () + "Common initialization for plain TeX like modes." + (VirTeX-common-initialization) + (set-syntax-table TeX-mode-syntax-table) + (setq paragraph-start + (concat + "\\(^[ \t]*$" + "\\|" (regexp-quote TeX-esc) "par\\|" + "^[ \t]*" + (regexp-quote TeX-esc) + "\\(" + "begin\\|end\\|part\\|chapter\\|" + "section\\|subsection\\|subsubsection\\|" + "paragraph\\|include\\|includeonly\\|" + "tableofcontents\\|appendix\\|label\\|caption\\|" + "\\[\\|\\]" ; display math delimitors + "\\)" + "\\|" + "^[ \t]*\\$\\$" ; display math delimitor + "\\)" )) + (setq paragraph-separate + (concat + "[ \t]*" + "\\(" + (regexp-quote TeX-esc) "par\\|" + "%\\|" + "$\\|" + "\\$\\$\\|" + (regexp-quote TeX-esc) + "\\(" + "begin\\|end\\|label\\|caption\\|part\\|chapter\\|" + "section\\|subsection\\|subsubsection\\|" + "paragraph\\|include\\|includeonly\\|" + "tableofcontents\\|appendix\\|" (regexp-quote TeX-esc) + "\\)" + "\\)")) + (setq TeX-header-end (regexp-quote "%**end of header")) + (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye"))) + (TeX-add-symbols + ;; From the TeX Book, Appendix B + ;; + ;; XXX: This should be refined and extended by somebody who is + ;; familiar with plain TeX. + "dag" + "ddag" + "copyright" + "TeX" + "dots" + "break" + "nobreak" + "allowbreak" + "hbox" + "slash" + "enskip" + "quad" + "qquad" + "enspace" + "thinspace" + "negthinspace" + "smallskip" + "medskip" + "bigskip" + "eject" + "supereject" + "goodbreak" + "filbreak" + "smallbreak" + "medbreak" + "bigbreak" + "hrulefill" + "dotfill" + "rightarrowfill" + "leftarrowfill" + "upbracefill" + "downbracefill" + "halign" + "valign" + "omit" + "span" + "multispan" + "centerline" + "rightline" + "leftline" + "line" + "par" + "noindent" + "frenchspacing" + "nonfrenchspacing" + "llap" + "rlap" + "raggedright" + "ttraggedright" + "raggedbottom" + "normalbottom" + "obeylines" + "obeyspaces" + "hsize" + "vsize" + "hoffset" + "voffset" + "tolerance" + "looseness" + "parindent" + "baselineskip" + "parskip") + (TeX-run-style-hooks "TEX")) + + +;;; Miscellaneous + +(defcustom plain-TeX-clean-intermediate-suffixes + TeX-clean-default-intermediate-suffixes + "List of regexps matching suffixes of intermediate files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom plain-TeX-clean-output-suffixes TeX-clean-default-output-suffixes + "List of regexps matching suffixes of output files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." + :type '(repeat regexp) + :group 'TeX-command) + + +;;; AmSTeX + +(defvar AmSTeX-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + map) + "Keymap used in `AmSTeX-mode'.") + +;; Menu for AmSTeX mode +(easy-menu-define AmSTeX-mode-command-menu + AmSTeX-mode-map + "Command menu used in AmsTeX mode." + (TeX-mode-specific-command-menu 'ams-tex-mode)) + +(easy-menu-define AmSTeX-mode-menu + AmSTeX-mode-map + "Menu used in AMS-TeX mode." + (cons "AmS-TeX" plain-TeX-menu-entries)) + +;;;###autoload +(defun ams-tex-mode () + "Major mode in AUCTeX for editing AmS-TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{AmSTeX-mode-map} + +Entering AmS-tex-mode calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `AmS-TeX-mode-hook'." + (interactive) + (plain-TeX-common-initialization) + (setq major-mode 'ams-tex-mode) + (use-local-map AmSTeX-mode-map) + + ;; Menu + (easy-menu-add AmSTeX-mode-menu AmSTeX-mode-map) + (easy-menu-add AmSTeX-mode-command-menu AmSTeX-mode-map) + + (setq TeX-base-mode-name "AmS-TeX") + (setq TeX-command-default "AmSTeX") + (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'AmS-TeX-mode-hook) + (TeX-set-mode-name)) + +(provide 'plain-tex) + +;;; plain-tex.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/preview.el b/aquamacs/src/site-lisp/edit-modes/auctex/preview.el index b6ab90e3e25c..a2a17d318bcf 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/preview.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/preview.el @@ -1,6 +1,6 @@ ;;; preview.el --- embed preview LaTeX images in source buffer -;; Copyright (C) 2001, 02, 03, 04, 05, +;; Copyright (C) 2001, 2002, 2003, 2004, 2005, ;; 2006 Free Software Foundation, Inc. ;; Author: David Kastrup @@ -23,7 +23,7 @@ ;;; Commentary: -;; $Id: preview.el,v 1.282 2008/02/03 14:53:31 angeli Exp $ +;; $Id: preview.el,v 1.284 2009/06/18 19:20:46 angeli Exp $ ;; ;; This style is for the "seamless" embedding of generated images ;; into LaTeX source code. Please see the README and INSTALL files @@ -1839,7 +1839,7 @@ BUFFER-MISC is the appropriate data to be used." (defcustom preview-auto-cache-preamble 'ask "*Whether to generate a preamble cache format automatically. -Possible values are NIL, T, and 'ask." +Possible values are nil, t, and `ask'." :group 'preview-latex :type '(choice (const :tag "Cache" t) (const :tag "Don't cache" nil) @@ -2485,7 +2485,7 @@ to add the preview functionality." (easy-menu-define preview-menu LaTeX-mode-map "This is the menu for preview-latex." '("Preview" - ["Generate previews" nil :active nil] + "Generate previews" ["(or toggle) at point" preview-at-point] ["for environment" preview-environment] ["for section" preview-section] @@ -2493,14 +2493,14 @@ to add the preview functionality." ["for buffer" preview-buffer] ["for document" preview-document] "---" - ["Remove previews" nil :active nil] + "Remove previews" ["at point" preview-clearout-at-point] ["from section" preview-clearout-section] ["from region" preview-clearout (preview-mark-active)] ["from buffer" preview-clearout-buffer] ["from document" preview-clearout-document] "---" - ["Turn preamble cache" nil :active nil] + "Turn preamble cache" ["on" preview-cache-preamble] ["off" preview-cache-preamble-off] "---" @@ -3098,7 +3098,7 @@ If FAST is set, do a fast conversion." (TeX-command-expand preview-pdf2dsc-command (car file)) (setq tempdir TeX-active-tempdir - pdfsource (TeX-master-file "pdf"))))) + pdfsource (funcall `,(car file) "pdf"))))) (name "Preview-PDF2DSC")) (setq TeX-active-tempdir tempdir) (setq preview-ps-file (preview-attach-filename @@ -3511,8 +3511,8 @@ internal parameters, STR may be a log to insert into the current log." (preview-reraise-error process))))) (defconst preview-version (eval-when-compile - (let ((name "$Name: release_11_85 $") - (rev "$Revision: 1.282 $")) + (let ((name "$Name: release_11_86 $") + (rev "$Revision: 1.284 $")) (or (when (string-match "\\`[$]Name: *release_\\([^ ]+\\) *[$]\\'" name) (setq name (match-string 1 name)) (while (string-match "_" name) @@ -3526,7 +3526,7 @@ If not a regular release, CVS revision of `preview.el'.") (defconst preview-release-date (eval-when-compile - (let ((date "$Date: 2008/02/03 14:53:31 $")) + (let ((date "$Date: 2009/06/18 19:20:46 $")) (string-match "\\`[$]Date: *\\([0-9]+\\)/\\([0-9]+\\)/\\([0-9]+\\)" date) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/preview.elc b/aquamacs/src/site-lisp/edit-modes/auctex/preview.elc deleted file mode 100644 index 2192ab44968f..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/preview.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.el b/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.el index fe484d5487d6..9f407360c066 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.el @@ -385,9 +385,8 @@ run buffer. A noop for Emacs." (unless preview-tb-icon (setq preview-tb-icon (preview-filter-specs preview-tb-icon-specs))) (when preview-tb-icon - ;; keep icon in tool-bar-map to allow for user customization in NS - (define-key-after tool-bar-map [preview] - `(menu-item "Preview Here" preview-at-point + (define-key LaTeX-mode-map [tool-bar preview] + `(menu-item "Preview at point" preview-at-point :image ,preview-tb-icon :help "Preview on/off at point"))) (when buffer-file-name diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.elc b/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.elc deleted file mode 100644 index 3b059b712bde..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/prv-emacs.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/.nosearch b/aquamacs/src/site-lisp/edit-modes/auctex/style/.nosearch deleted file mode 100644 index aa31332e84d7..000000000000 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/.nosearch +++ /dev/null @@ -1 +0,0 @@ -;; AUCTeX style/ and auto/ directories should not appear in load path. diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/CJK.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/CJK.el new file mode 100644 index 000000000000..fa285bdd3549 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/CJK.el @@ -0,0 +1,93 @@ +;;; CJK.el --- AUCTeX style for the CJK package. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the CJK package, version 4.8.0 +;; (22-May-2008). + +;;; Code: + +(defvar LaTeX-CJK-package-options + '("lowercase" "global" "local" "active" "encapsulated") + "Package options for the CJK package.") + +(defvar LaTeX-CJK-enc-list + '("Bg5" "Bg5+" "HK" "GB" "GBt" "GBK" "JIS" "JIS2" "SJIS" "KS" "UTF8" "CNS1" + "CNS2" "CNS3" "CNS4" "CNS5" "CNS6" "CNS7" "CEFX" "CEFY") + "List of encodings supported by the CJK package.") + +(defun LaTeX-env-CJK (env) + "Prompt for the arguments of ENV and insert it. +The function can be used for CJK and CJK* environments." + (LaTeX-insert-environment + env + (concat + (let ((font-enc (read-string "(Optional) Font encoding: "))) + (unless (zerop (length font-enc)) (format "[%s]" font-enc))) + (format "{%s}" (completing-read "Encoding: " + (mapcar 'list LaTeX-CJK-enc-list))) + (format "{%s}" (read-string "Font family: "))))) + +(TeX-add-style-hook + "CJK" + (lambda () + ;; New symbols + (TeX-add-symbols + '("CJKencfamily" ["Font encoding"] "Encoding" "Font family") + '("CJKchar" ["Encoding"] "First byte" "Second byte") + '("CJKcaption" 1) + '("CJKfamily" 1) + '("CJKfontenc" "Encoding" "Font encoding") + '("CJKenc" 1) + '("Unicode" "First byte" "Second byte") + '("CJKsymbols" 2) + '("CJKsymbol" 1) + "CJKbold" + "CJKnormal" + "CJKboldshift" + "CJKCJKchar" + "CJKhangulchar" + "CJKlatinchar" + "CJKhwkatakana" + "CJKnohwkatakana" + "CJKglue" + "CJKtolerance" + "CJKtilde" + "nbs" + "standardtilde" + "CJKspace" + "CJKnospace" + "CJKindent" + '("CJKaddEncHook" 2) + "CJKkern" + "CJKverbatim") + ;; New environments + (LaTeX-add-environments + '("CJK" LaTeX-env-CJK) + '("CJK*" LaTeX-env-CJK)))) + +;;; CJK.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/CJKutf8.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/CJKutf8.el new file mode 100644 index 000000000000..ea3c2e3d41e3 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/CJKutf8.el @@ -0,0 +1,38 @@ +;;; CJKutf8.el --- AUCTeX style for the CJKutf8 package. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the CJKutf8 package. + +;;; Code: + +(TeX-add-style-hook + "CJKutf8" + (lambda () + (TeX-run-style-hooks "CJK"))) + +;;; CJKutf8.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/MinionPro.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/MinionPro.elc deleted file mode 100644 index 312903bbb64b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/MinionPro.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/alltt.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/alltt.elc deleted file mode 100644 index 0024e67d8e0f..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/alltt.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/alphanum.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/alphanum.elc deleted file mode 100644 index cdcffbb54ec8..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/alphanum.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsart.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsart.elc deleted file mode 100644 index fe8c777cb78e..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsart.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbook.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbook.elc deleted file mode 100644 index 33fe67e05db5..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbook.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbsy.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbsy.elc deleted file mode 100644 index 17ddb96e27cf..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsbsy.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsmath.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsmath.elc deleted file mode 100644 index 850ec4d2cd34..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsmath.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsopn.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsopn.elc deleted file mode 100644 index ad87a5cfa78b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsopn.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amstex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amstex.elc deleted file mode 100644 index 95b8318de3fb..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amstex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amstext.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amstext.elc deleted file mode 100644 index 6f800c3af950..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amstext.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsthm.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/amsthm.elc deleted file mode 100644 index 9c0e2df2c36b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/amsthm.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/article.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/article.el index 528468f51fb7..937fa4734a89 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/article.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/article.el @@ -1,6 +1,6 @@ ;;; article.el - Special code for article style. -;; $Id: article.el,v 1.5 2008/02/25 18:02:08 davidswelt Exp $ +;; $Id: article.el,v 1.4 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/article.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/article.elc deleted file mode 100644 index 947f326b41ea..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/article.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/austrian.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/austrian.el new file mode 100644 index 000000000000..13f28a863e16 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/austrian.el @@ -0,0 +1,39 @@ +;;; austrian.el --- AUCTeX style for the `austrian' babel option. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Austrian text in connection with the +;; `austrian' babel option. + +;;; Code: + +(TeX-add-style-hook + "austrian" + (lambda () + (TeX-run-style-hooks "german"))) + +;;; austrian.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/babel.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/babel.el old mode 100644 new mode 100755 diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/babel.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/babel.elc deleted file mode 100644 index 645ac4058144..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/babel.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.el index 6e5967dd7bb2..7b911cd4b776 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.el @@ -1,6 +1,6 @@ ;;; beamer.el --- AUCTeX style for the latex-beamer class -;; Copyright (C) 2003, 2004, 2005 Free Software Foundation +;; Copyright (C) 2003, 2004, 2005,2008 Free Software Foundation ;; Author: Thomas Baumann ;; Created: 2003-12-20 @@ -29,9 +29,33 @@ ;;; Code: +(defun LaTeX-beamer-after-insert-env (env start end) + "Do beamer-specific stuff after the insertion of an environment." + ;; Add `fragile' as an optional argument to the frame environment if + ;; a verbatim environment is inserted. + (when (and (TeX-member env (LaTeX-verbatim-environments) 'string-equal) + (save-excursion + (goto-char start) + (string-equal (LaTeX-current-environment) "frame"))) + (save-excursion + (when (re-search-backward "\\\\begin[ \t]*{frame}" nil t) + (let ((end-of-begin (match-end 0))) + (goto-char end-of-begin) + (while (forward-comment 1)) + (if (eq (char-after) (string-to-char LaTeX-optop)) + (progn + (forward-char) + (insert "fragile") + (unless (looking-at (concat "[ \t]*" LaTeX-optcl)) + (insert ","))) + (goto-char end-of-begin) + (insert "[fragile]"))))))) + (TeX-add-style-hook "beamer" (lambda () + (add-hook 'LaTeX-after-insert-env-hooks 'LaTeX-beamer-after-insert-env nil t) + (unless LaTeX-beamer-section-labels-flag (make-local-variable 'LaTeX-section-hook) (setq LaTeX-section-hook @@ -101,7 +125,7 @@ "columnsonlytextwidth" '("exampleblock" 1) '("frame" (lambda (env &rest ignore) - (let ((title (read-input "(Optional) Title: "))) + (let ((title (read-string "(Optional) Title: "))) (LaTeX-insert-environment env) (unless (zerop (length title)) (save-excursion @@ -116,32 +140,45 @@ '("onlyenv" (lambda (env &rest ignore) (LaTeX-insert-environment env - (let ((overlay (read-input "(Optional) Overlay: "))) + (let ((overlay (read-string "(Optional) Overlay: "))) (unless (zerop (length overlay)) (format "<%s>" overlay)))))) '("overlayarea" "Area width" "Area height") '("overprint" (lambda (env &rest ignore) (LaTeX-insert-environment env - (let ((width (read-input "(Optional) Area width: "))) + (let ((width (read-string "(Optional) Area width: "))) (unless (zerop (length width)) - (format "[%s]" width))))))) + (format "[%s]" width)))))) + "semiverbatim") + + (make-local-variable 'LaTeX-indent-environment-list) + (add-to-list 'LaTeX-indent-environment-list + '("semiverbatim" current-indentation)) + (make-local-variable 'LaTeX-verbatim-regexp) + (setq LaTeX-verbatim-regexp (concat LaTeX-verbatim-regexp "\\|semiverbatim")) + (add-to-list 'LaTeX-verbatim-environments-local "semiverbatim") ;; Fontification (when (and (featurep 'font-latex) (eq TeX-install-font-lock 'font-latex-setup)) - (font-latex-add-keywords '(("frametitle" "<[{")) 'slide-title)))) + (font-latex-add-keywords '(("frametitle" "<[{")) 'slide-title) + ;; For syntactic fontification, e.g. verbatim constructs. + (font-latex-set-syntactic-keywords) + ;; Tell font-lock about the update. + (setq font-lock-set-defaults nil) + (font-lock-set-defaults)))) (defun TeX-arg-beamer-overlay-spec (optional &optional prompt) "Prompt for overlay specification." - (let ((overlay (read-input "(Optional) Overlay: "))) + (let ((overlay (read-string "(Optional) Overlay: "))) (unless (zerop (length overlay)) (insert "<" overlay ">")) (indent-according-to-mode))) (defun TeX-arg-beamer-frametitle (optional &optional prompt) "Prompt for the frametitle." - (let ((title (read-input "Title: "))) + (let ((title (read-string "Title: "))) (if (not (zerop (length title))) (insert TeX-grop TeX-esc "frametitle" TeX-grop title TeX-grcl TeX-grcl) @@ -165,8 +202,8 @@ unconditionally." (defun TeX-arg-beamer-note (optional &optional prompt) "Prompt for overlay specification and optional argument." - (let ((overlay (read-input "(Optional) Overlay: ")) - (options (read-input "(Optional) Options: "))) + (let ((overlay (read-string "(Optional) Overlay: ")) + (options (read-string "(Optional) Options: "))) (unless (zerop (length overlay)) (insert "<" overlay ">")) (unless (zerop (length options)) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.elc deleted file mode 100644 index 4f5bfceeaa88..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/beamer.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/book.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/book.el index f1151f364967..7b028e52894c 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/book.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/book.el @@ -1,6 +1,6 @@ ;;; book.el - Special code for book style. -;; $Id: book.el,v 1.5 2008/02/25 18:02:08 davidswelt Exp $ +;; $Id: book.el,v 1.5 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/book.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/book.elc deleted file mode 100644 index 1621fa17941a..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/book.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/booktabs.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/booktabs.elc deleted file mode 100644 index 093260b25dc1..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/booktabs.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/bulgarian.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/bulgarian.el new file mode 100644 index 000000000000..3eb0144b8e96 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/bulgarian.el @@ -0,0 +1,52 @@ +;;; bulgarian.el --- AUCTeX style for the `bulgarian' babel option. + +;; Copyright (C) 2008 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2008-06-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Bulgarian text in connection with the +;; `bulgarian' babel option. + +;;; Code: + +(defvar LaTeX-bulgarian-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `bulgarian.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-bulgarian-mode-syntax-table) + +(TeX-add-style-hook + "bulgarian" + (lambda () + (set-syntax-table LaTeX-bulgarian-mode-syntax-table) + (setq TeX-quote-language `("bulgarian" "\"`" "\"'" ,TeX-quote-after-quote)) + (setq LaTeX-babel-hyphen-language "bulgarian") + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-bg-hook))) + +;;; bulgarian.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/captcont.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/captcont.elc deleted file mode 100644 index 3d36b8df342a..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/captcont.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/comment.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/comment.elc deleted file mode 100644 index e0de8a75ba1e..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/comment.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/csquotes.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/csquotes.elc deleted file mode 100644 index fed2dc052601..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/csquotes.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/czech.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/czech.elc deleted file mode 100644 index d22ce1138c0b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/czech.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/danish.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/danish.elc deleted file mode 100644 index 687d27a8d14c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/danish.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.el index 9d29edb3df4f..604943414e36 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.el @@ -33,19 +33,19 @@ (defun LaTeX-recipient-hook (environment) "Insert ENVIRONMENT and prompt for recipient and address." - (let ((sender (read-input "Absender: " (user-full-name))) - (recipient (read-input "Empf\"anger: ")) - (address (read-input "Anschrift: ")) - (postvermerk (read-input "Postvermerk: ")) - (date (read-input "Datum: " (LaTeX-today))) - (betreff (read-input "Betreff: ")) - (vermerk (read-input "Behandlungsvermerk: ")) - (verteil (read-input "Verteiler: ")) - (anlage (read-input "Anlagen: ")) - (opening (read-input "Anrede: ")) - (closing (read-input "Schlu\"s: ")) - (fenster (read-input "Fenster \(ja/nein\): ")) - (signature (read-input "Unterschrift: ")) + (let ((sender (read-string "Absender: " (user-full-name))) + (recipient (read-string "Empf\"anger: ")) + (address (read-string "Anschrift: ")) + (postvermerk (read-string "Postvermerk: ")) + (date (read-string "Datum: " (LaTeX-today))) + (betreff (read-string "Betreff: ")) + (vermerk (read-string "Behandlungsvermerk: ")) + (verteil (read-string "Verteiler: ")) + (anlage (read-string "Anlagen: ")) + (opening (read-string "Anrede: ")) + (closing (read-string "Schlu\"s: ")) + (fenster (read-string "Fenster \(ja/nein\): ")) + (signature (read-string "Unterschrift: ")) ) (if (not (zerop (length sender))) @@ -75,7 +75,7 @@ (if (string= fenster "ja") (progn (insert TeX-esc "Fenster") - (let ((retouradr (read-input "Retouradresse: " (user-full-name)))) + (let ((retouradr (read-string "Retouradresse: " (user-full-name)))) (newline-and-indent) (if (not (zerop (length retouradr))) (progn diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.elc deleted file mode 100644 index 2091cec7fe60..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/dinbrief.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.el index 087ff63dbba7..2ae7530a5d29 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.el @@ -44,7 +44,7 @@ (> depth 20)) (setq depth (if (fboundp 'read-number) (read-number "Ordinal depth: ") - (string-to-number (read-input "Ordinal depth: ")))) + (string-to-number (read-string "Ordinal depth: ")))) (when (or (< depth 0) (> depth 20)) (message "Ordinal depth must be between 0 and 20") diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.elc deleted file mode 100644 index 9766bce0f022..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk-bib.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.el index 4b07cce6f042..b46feaf651ab 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.el @@ -1,6 +1,6 @@ ;;; dk.el - Setup AUC TeX for editing Danish text. -;; $Id: dk.el,v 1.5 2008/02/25 18:02:09 davidswelt Exp $ +;; $Id: dk.el,v 1.2 1993/12/15 21:42:40 amanda Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.elc deleted file mode 100644 index 2135acedd6f4..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/dk.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.el index e3d98b8f3b60..3c7022013b95 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.el @@ -1,6 +1,6 @@ ;;; doc.el --- AUCTeX style for `doc.sty' -;; Copyright (C) 2004 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2008 Free Software Foundation, Inc. ;; Author: Frank Küster ;; Maintainer: auctex-devel@gnu.org @@ -40,6 +40,21 @@ (delete-region (line-beginning-position) (line-end-position)) (indent-according-to-mode)))) +(defun LaTeX-doc-after-insert-macrocode (env start end) + "Make sure the macrocode environment is properly formatted after insertion." + (when (TeX-member env '("macrocode" "macrocode*") 'string-equal) + (save-excursion + (goto-char end) + (skip-chars-backward " \t") + (when (bolp) + (insert "%") + (indent-according-to-mode)) + (goto-char start) + (skip-chars-backward " \t") + (when (bolp) + (insert "%") + (indent-according-to-mode))))) + (TeX-add-style-hook "doc" (function @@ -48,6 +63,8 @@ '("macrocode" current-indentation)) (add-to-list 'LaTeX-indent-environment-list '("macrocode*" current-indentation)) + (add-hook 'LaTeX-after-insert-env-hooks 'LaTeX-doc-after-insert-macrocode + nil t) (LaTeX-add-environments "theglossary" '("macrocode" LaTeX-env-no-comment) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.elc deleted file mode 100644 index 67361b58f075..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/doc.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.el index 68493e63628c..c5f1cb548122 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.el @@ -1,6 +1,6 @@ ;;; dutch.el - Setup AUC TeX for editing Dutch text. -;; $Id: dutch.el,v 1.5 2008/02/25 18:02:09 davidswelt Exp $ +;; $Id: dutch.el,v 1.2 1993/12/15 21:42:42 amanda Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.elc deleted file mode 100644 index 8b80be133f5b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/dutch.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.el index 64a4d10ad9d1..4e5f8674a55a 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.el @@ -43,9 +43,9 @@ (defun LaTeX-env-emp-gen (environment-name) "Ask for file, width and length. Insert environment-name environment Used for emp, empdef, and empgraph environments." - (let ((emp-fig-name (read-input "figure name: " "")) - (emp-fig-width (read-input "figure width: " "1" )) - (emp-fig-height (read-input "figure height: " "1" )) + (let ((emp-fig-name (read-string "figure name: " "")) + (emp-fig-width (read-string "figure width: " "1" )) + (emp-fig-height (read-string "figure height: " "1" )) ;;; emp.sty demands a width and a height for each of the ;;; emp, empdef, and empgraph environments ;;; we give them 1 by default @@ -65,7 +65,7 @@ Used for emp, empdef, and empgraph environments." (defun LaTeX-env-empfile (optional) "Ask for file. Insert empfile environment" - (let ((empfile (read-input "empfile: " ""))) + (let ((empfile (read-string "empfile: " ""))) (if (not (zerop (length empfile))) (progn (setq LaTeX-emp-file-name (concat LaTeX-optop empfile LaTeX-optcl)) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.elc deleted file mode 100644 index c6adb4ac68f0..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/emp.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.el index e70ee9aebea0..f8b2c9ff418b 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.el @@ -19,12 +19,8 @@ (defun TeX-arg-epsfsize (optional &optional prompt definition) "Create a line that print epsf figures at a certain percentage" (interactive) - (let ((scale (read-input "Scale (%): ")) - ) - (setq scalestr (if (zerop (length scale)) - "75" - (format "%s" scale) - )) + (let ((scale (read-string "Scale in percent (default 75): "))) + (setq scale (if (zerop (length scale)) "75" scale)) (save-excursion ; append #1#{scale#1} (insert "#1#2" TeX-grop "0." scale "#1" TeX-grcl) @@ -33,8 +29,7 @@ (newline) (insert TeX-esc "def") (forward-line -1) - (insert "% From now on print figures at " scale "% of original size") - ) + (insert "% From now on print figures at " scale "% of original size")) (end-of-line))) ;;; epsf.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.elc deleted file mode 100644 index aaf0f525c727..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/epsf.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/fancyref.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/fancyref.elc deleted file mode 100644 index 399c8502f10b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/fancyref.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.el index f564a93eb38c..27e96d1c92df 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.el @@ -36,7 +36,7 @@ (TeX-add-symbols '("cardfrontstyle" ["Format"] "Style") '("cardfrontfoot" "Footer text") - '("cardbackstyle" "Style") + '("cardbackstyle" ["Format"] "Style") '("cardfrontheadstyle" ["Format"] "Style") '("cardfrontfootstyle" ["Format"] "Style") "cardmargin" @@ -48,11 +48,11 @@ "cardwidth") (LaTeX-add-environments '("flashcard" ["Header"] "Front side")) ;; Fontification - (when (and (featurep 'font-latex) + (when (and (fboundp 'font-latex-add-keywords) (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-keywords '(("cardfrontstyle" "[{") ("cardfrontfoot" "{") - ("cardbackstyle" "{") + ("cardbackstyle" "[{") ("cardfrontheadstyle" "[{") ("cardfrontfootstyle" "[{")) 'variable)))) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.elc deleted file mode 100644 index 24d218635cd0..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/flashcards.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.el index 6bba6370f74a..24d2b640d67d 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.el @@ -1,9 +1,11 @@ ;;; foils.el - Special code for FoilTeX. -;; $Id: foils.el,v 1.5 2008/02/25 18:02:09 davidswelt Exp $ +;; $Id: foils.el,v 1.5 2008/07/28 20:40:18 angeli Exp $ ;;; Code: +(require 'timezone) + (TeX-add-style-hook "foils" (function (lambda () @@ -15,12 +17,11 @@ (defun LaTeX-style-foils nil "Prompt for and insert foiltex options." - (require 'timezone) (let* ((date (timezone-parse-date (current-time-string))) - (year (string-to-int (aref date 0))) - (month (string-to-int (aref date 1))) - (day (string-to-int (aref date 2))) - (title (read-input "Title: "))) + (year (string-to-number (aref date 0))) + (month (string-to-number (aref date 1))) + (day (string-to-number (aref date 2))) + (title (read-string "Title: "))) (save-excursion (goto-char (point-max)) (re-search-backward ".begin.document.") diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.elc deleted file mode 100644 index 6c9f6b1b1834..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/foils.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/francais.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/francais.elc deleted file mode 100644 index b2e37976c2f2..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/francais.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/frenchb.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/frenchb.elc deleted file mode 100644 index 4415e5bdf280..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/frenchb.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/german.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/german.elc deleted file mode 100644 index 03d706dd6642..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/german.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphics.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/graphics.elc deleted file mode 100644 index 7dc5a4ac9b2c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphics.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.el index 54d7a422ae12..a35d15177480 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.el @@ -122,19 +122,19 @@ The extent of the optional arguments is determined by the prefix argument and (totalheight (TeX-arg-maybe 'totalheight incl-opts - '(read-input + '(read-string (concat "Total Height (" TeX-default-unit-for-image "): ")))) (height (TeX-arg-maybe 'height incl-opts ;; Either totalheight or height make sense: '(when (zerop (length totalheight)) - (read-input + (read-string (concat "Figure height (" TeX-default-unit-for-image "): "))))) (width (TeX-arg-maybe 'width incl-opts - '(read-input + '(read-string (concat "Figure width (" TeX-default-unit-for-image "): ")))) (scale (TeX-arg-maybe @@ -143,22 +143,22 @@ The extent of the optional arguments is determined by the prefix argument and '(when (zerop (+ (length totalheight) (length height) (length width))) - (read-input "Scale: ")))) + (read-string "Scale: ")))) (angle (TeX-arg-maybe 'angle incl-opts - '(read-input "Rotation angle: "))) + '(read-string "Rotation angle: "))) (origin (TeX-arg-maybe 'origin incl-opts - '(read-input + '(read-string (concat "Origin (any combination of `lcr' (horizontal) " "and `tcbB' (vertical)): ")))) (page ;; Not in any table; Only for PDF. (TeX-arg-maybe 'page incl-opts - '(read-input "Page: "))) + '(read-string "Page: "))) (bb (TeX-arg-maybe 'bb incl-opts @@ -235,29 +235,29 @@ The extent of the optional arguments is determined by the prefix argument and (setq maybe-comma ",") (setq maybe-left-brace "")) (when bb - (setq llx (read-input "Bounding Box lower left x: ")) - (setq lly (read-input "Bounding Box lower left y: ")) - (setq urx (read-input "Bounding Box upper right x: ")) - (setq ury (read-input "Bounding Box upper right y: ")) + (setq llx (read-string "Bounding Box lower left x: ")) + (setq lly (read-string "Bounding Box lower left y: ")) + (setq urx (read-string "Bounding Box upper right x: ")) + (setq ury (read-string "Bounding Box upper right y: ")) (insert maybe-left-brace maybe-comma "bb=" llx " " lly " " urx " " ury) (setq maybe-comma ",") (setq maybe-left-brace "")) ;; (when viewport - (setq llx (read-input "Viewport lower left x: ")) - (setq lly (read-input "Viewport lower left y: ")) - (setq urx (read-input "Viewport upper right x: ")) - (setq ury (read-input "Viewport upper right y: ")) + (setq llx (read-string "Viewport lower left x: ")) + (setq lly (read-string "Viewport lower left y: ")) + (setq urx (read-string "Viewport upper right x: ")) + (setq ury (read-string "Viewport upper right y: ")) (insert maybe-left-brace maybe-comma "viewport=" llx " " lly " " urx " " ury) (setq maybe-comma ",") (setq maybe-left-brace "")) (when trim - (setq llx (read-input "Trim lower left x: ")) - (setq lly (read-input "Trim lower left y: ")) - (setq urx (read-input "Trim Upper right x: ")) - (setq ury (read-input "Trim Upper right y: ")) + (setq llx (read-string "Trim lower left x: ")) + (setq lly (read-string "Trim lower left y: ")) + (setq urx (read-string "Trim Upper right x: ")) + (setq ury (read-string "Trim Upper right y: ")) (insert maybe-left-brace maybe-comma "trim=" llx " " lly " " urx " " ury) (setq maybe-comma ",") diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.elc deleted file mode 100644 index a9921222027b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/graphicx.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.el index 3f5620b9c219..fa38d2a9a1a1 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.el @@ -3,7 +3,7 @@ ;; Harvard citation style is from Peter Williams ;; available on the CTAN servers -;; Version: $Id: harvard.el,v 1.5 2008/02/25 18:02:09 davidswelt Exp $ +;; Version: $Id: harvard.el,v 1.10 2008/02/03 14:53:30 angeli Exp $ ;; Copyright (C) 1994 Berwin Turlach ;; Copyright (C) 1997 Berwin Turlach diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.elc deleted file mode 100644 index 9e9df28f9d7c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/harvard.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/hyperref.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/hyperref.el new file mode 100644 index 000000000000..1f703f7fc521 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/hyperref.el @@ -0,0 +1,124 @@ +;;; hyperref.el --- AUCTeX style for the hyperref class. + +;; Copyright (C) 2008 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2008-06-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the hyperref package. + +;;; Code: + +(defvar LaTeX-hyperref-package-options + '("a4paper" "a5paper" "anchorcolor" "b5paper" "backref" "baseurl" + "bookmarks" "bookmarksnumbered" "bookmarksopen" + "bookmarksopenlevel \maxdimen" "bookmarkstype" "breaklinks" + "CJKbookmarks" "citebordercolor" "citecolor" "colorlinks" "debug" + "draft" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsone" + "dviwindo" "encap" "executivepaper" "extension" "filebordercolor" + "filecolor" "final" "frenchlinks" "hyperfigures" "hyperfootnotes" + "hyperindex" "hypertex" "hypertexnames" "implicit" "latex2html" + "legalpaper" "letterpaper" "linkbordercolor" "linkcolor" + "linktocpage" "menubordercolor" "menucolor" "nativepdf" + "naturalnames" "nesting" "pageanchor" "pagebackref" + "pagebordercolor" "pagecolor" "pdfauthor" "pdfborder" + "pdfcenterwindow" "pdfcreator" "pdfdirection" "pdfdisplaydoctitle" + "pdfduplex" "pdffitwindow" "pdfhighlight" "pdfkeywords" "pdflang" + "pdfmark" "pdfmenubar" "pdfnewwindow" "pdfnonfullscreenpagemode" + "pdfnumcopies" "pdfpagelayout" "pdfpagemode" "pdfpagelabels" + "pdfpagescrop" "pdfpagetransition" "pdfpicktrackbypdfsize" + "pdfprintarea" "pdfprintclip" "pdfprintpagerange" + "pdfprintscaling" "pdfproducer" "pdfstartpage" "pdfstartview" + "pdfsubject" "pdftex" "pdftitle" "pdftoolbar" "pdfview" + "pdfviewarea" "pdfviewclip" "pdfwindowui" "plainpages" "ps2pdf" + "raiselinks" "runbordercolor" "setpagesize" "tex4ht" "textures" + "unicode" "urlbordercolor" "urlcolor" "verbose" "vtex" "xetex") + "Package options for the hyperref package.") + +(TeX-add-style-hook + "hyperref" + (lambda () + ;; hyperref.sty loads url.sty + (TeX-run-style-hooks "url") + (TeX-add-symbols + '("href" "URL" "Text") + '("nolinkurl" t) + '("hyperbaseurl" t) + '("hyperimage" "Image URL" "Text") + '("hyperdef" "Category" "Name" "Text") + '("hyperref" "URL" "Category" "Name" "Text") + '("hyperlink" "Name" "Text") + '("hypertarget" "Name" "Text") + '("phantomsection" 0) + '("autoref" TeX-arg-ref) + '("ref*" TeX-arg-ref) + '("pageref*" TeX-arg-ref) + '("pdfstringdef" "Macro name" "TeX string") + '("texorpdfstring" "TeX string" "PDF string") + '("hypercalcbp" t) + '("Acrobatmenu" "Menu option" "Text") + '("TextField" ["Parameters"] "Label") + '("CheckBox" ["Parameters"] "Label") + '("ChoiceMenu" ["Parameters"] "Label" "Choices") + '("PushButton" ["Parameters"] "Label") + '("Submit" ["Parameters"] "Label") + '("Reset" ["Parameters"] "Label") + '("LayoutTextField" "Label" "Field") + '("LayoutChoiceField" "Label" "Field") + '("LayoutCheckField" "Label" "Field") + '("MakeRadioField" "Width" "Height") + '("MakeCheckField" "Width" "Height") + '("MakeTextField" "Width" "Height") + '("MakeChoiceField" "Width" "Height") + '("MakeButtonField" "Text")) + + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("href" "{{") + ("nolinkurl" "{") + ("hyperbaseurl" "{") + ("hyperimage" "{{") + ("hyperdef" "{{{") + ("hyperref" "{{{{") + ("hyperlink" "{{") + ("hypertarget" "{{") + ("autoref" "{") + ("ref" "*{") + ("pageref" "*{")) + 'reference) + ;; For syntactic fontification, e.g. verbatim constructs. + (font-latex-set-syntactic-keywords)) + + ;; RefTeX + (when (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Hyperref")))) + +;;; hyperref.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/icelandic.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/icelandic.elc deleted file mode 100644 index 60c85e36c2c6..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/icelandic.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/index.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/index.elc deleted file mode 100644 index 8fab4690071d..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/index.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/inputenc.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/inputenc.elc deleted file mode 100644 index 86ba6612d11b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/inputenc.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/italian.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/italian.elc deleted file mode 100644 index e2a67e6a2932..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/italian.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.el index 4ff1bed08c31..1336458de499 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.el @@ -1,6 +1,6 @@ ;;; j-article.el - Special code for j-article style. -;; $Id: j-article.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: j-article.el,v 1.4 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.elc deleted file mode 100644 index 544772e12526..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-article.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.el index 338bef3f8197..fd7394acea6f 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.el @@ -1,6 +1,6 @@ ;;; j-book.el - Special code for j-book style. -;; $Id: j-book.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: j-book.el,v 1.3 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.elc deleted file mode 100644 index cf46e7b51263..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-book.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.el index 1332ebc49a55..ba6a266c53f9 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.el @@ -1,6 +1,6 @@ ;;; j-report.el - Special code for j-report style. -;; $Id: j-report.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: j-report.el,v 1.3 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.elc deleted file mode 100644 index 0cf936b659af..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/j-report.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.el index 472249deb76b..b16bc6984490 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.el @@ -1,6 +1,6 @@ ;;; jarticle.el - Special code for jarticle style. -;; $Id: jarticle.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: jarticle.el,v 1.4 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.elc deleted file mode 100644 index 46d532e42003..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jarticle.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.el index 7a974323ccbc..22154779777e 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.el @@ -1,6 +1,6 @@ ;;; jbook.el - Special code for jbook style. -;; $Id: jbook.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: jbook.el,v 1.3 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.elc deleted file mode 100644 index 40991a94e409..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jbook.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.el index c50909ded9c3..7e245aa85480 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.el @@ -1,6 +1,6 @@ ;;; jreport.el - Special code for jreport style. -;; $Id: jreport.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: jreport.el,v 1.3 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.elc deleted file mode 100644 index 07abe167f9a8..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jreport.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.el index 60ff3b7ae21b..cf051f997459 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.el @@ -1,6 +1,6 @@ ;;; jsarticle.el - Special code for jsarticle style. -;; $Id: jsarticle.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: jsarticle.el,v 1.2 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.elc deleted file mode 100644 index 245b96743cfc..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsarticle.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.el index e48321731c35..b9ddff024144 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.el @@ -1,6 +1,6 @@ ;;; jsbook.el - Special code for jsbook style. -;; $Id: jsbook.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: jsbook.el,v 1.2 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.elc deleted file mode 100644 index fbf8d30e6c36..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jsbook.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jura.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jura.elc deleted file mode 100644 index 7038cc8124f6..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jura.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/jurabib.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/jurabib.elc deleted file mode 100644 index d74af7ddbd54..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/jurabib.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.el index 176dcc141b2d..89034809fbfa 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1993 Marc Gemis ;; Author: Marc Gemis -;; Version: $Id: latexinfo.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; Version: $Id: latexinfo.el,v 1.7 2008/02/03 14:53:30 angeli Exp $ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.elc deleted file mode 100644 index 8a2a8b094803..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/latexinfo.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.el index 1017e31b3b4f..76ab4d87cb43 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.el @@ -1,6 +1,6 @@ ;;; letter.el - Special code for letter style. -;; $Id: letter.el,v 1.5 2008/02/25 18:02:10 davidswelt Exp $ +;; $Id: letter.el,v 1.4 2008/05/25 06:50:33 angeli Exp $ ;;; Code: @@ -23,15 +23,15 @@ (defun LaTeX-env-recipient (environment) "Insert ENVIRONMENT and prompt for recipient and address." - (let ((sender (read-input "Sender: " (user-full-name))) - (sender-address (read-input "Sender address: " + (let ((sender (read-string "Sender: " (user-full-name))) + (sender-address (read-string "Sender address: " LaTeX-letter-sender-address)) - (recipient (read-input "Recipient: ")) - (address (read-input "Recipient address: ")) - (signature (read-input "Signature: ")) - (opening (read-input "Opening: ")) - (closing (read-input "Closing: ")) - (date (read-input "Date: " (LaTeX-today)))) + (recipient (read-string "Recipient: ")) + (address (read-string "Recipient address: ")) + (signature (read-string "Signature: ")) + (opening (read-string "Opening: ")) + (closing (read-string "Closing: ")) + (date (read-string "Date: " (LaTeX-today)))) (insert TeX-esc "name" TeX-grop sender TeX-grcl) (newline-and-indent) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.elc deleted file mode 100644 index 0fe54227e7d7..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/letter.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.el index 4ccbd12e75cf..cfb11e993fed 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.el @@ -1,6 +1,6 @@ ;;; listings.el --- AUCTeX style for `listings.sty' -;; Copyright (C) 2004, 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. ;; Author: Ralf Angeli ;; Maintainer: auctex-devel@gnu.org @@ -32,22 +32,181 @@ ;;; Code: +;; The following are options taken from chapter 4 of the listings +;; manual (2006/05/08 Version 1.3c). Experimental options described +;; in chapter 5 are not included. +(defvar LaTeX-listings-key-val-options + '(;; Space and placement + ("float" ("t" "b" "p" "h")) ; Support [*] as an optional prefix and that + ; tbph are not exclusive. + ("floatplacement" ("t" "b" "p" "h")) + ("aboveskip") + ("belowskip") + ("lineskip") + ("boxpos" ("b" "c" "t")) + ;; The printed range + ("print" ("true" "false")) + ("firstline") + ("lastline") + ("linerange") + ("showlines" ("true" "false")) + ("emptylines") + ("gobble") + ;; Languages and styles + ("style") + ("language") + ("alsolanguage") + ("defaultdialect") + ("printpod" ("true" "false")) + ("usekeywordsintag" ("true" "false")) + ("tagstyle") + ("markfirstintag") + ("makemacrouse" ("true" "false")) + ;; Figure out the appearance + ("basicstyle") + ("identifierstyle") + ("commentstyle") + ("stringstyle") + ("keywordstyle") + ("classoffset") + ("texcsstyle") + ("directivestyle") + ("emph") + ("moreemph") + ("deleteemph") + ("emphstyle") + ("delim") + ("moredelim") + ("deletedelim") + ;; Getting all characters right + ("extendedchars" ("true" "false")) + ("inputencoding") ; Could make use of `latex-inputenc-coding-alist'. + ("upquote" ("true" "false")) + ("tabsize") + ("showtabs" ("true" "false")) + ("tab") + ("showspaces" ("true" "false")) + ("showstringspaces" ("true" "false")) + ("formfeed") + ;; Line numbers + ("numbers" ("none" "left" "right")) + ("stepnumber") + ("numberfirstline" ("true" "false")) + ("numberstyle") + ("numbersep") + ("numberblanklines" ("true" "false")) + ("firstnumber" ("auto" "last")) ; Can also take a number. + ("name") + ;; Captions + ("title") + ("caption") ; Insert braces? + ("label") + ("nolol" ("true" "false")) + ("captionpos" ("t" "b")) ; Can be a subset of tb. + ("abovecaptionskip") + ("belowcaptionskip") + ;; Margins and line shape + ("linewidth") + ("xleftmargin") + ("xrightmargin") + ("resetmargins" ("true" "false")) + ("breaklines" ("true" "false")) + ("breakatwhitespace" ("true" "false")) + ("prebreak") + ("postbreak") + ("breakindent") + ("breakautoindent" ("true" "false")) + ;; Frames + ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single" + "shadowbox" + ;; Alternative to the above values. A subset of trblTRBL can be + ;; given. + "t" "r" "b" "l" "T" "R" "B" "L")) + ("frameround" ("t" "f")) ; The input actually has to be four times {t,f}. + ("framesep") + ("rulesep") + ("framerule") + ("framexleftmargin") + ("framexrightmargin") + ("framextopmargin") + ("framebottommargin") + ("backgroundcolor") + ("rulecolor") + ("fillcolor") + ("fulesepcolor") + ("frameshape") + ;; Indexing + ("index") + ("moreindex") + ("deleteindex") + ("indexstyle") + ;; Column alignment + ("columns" ("fixed" "flexible" "fullflexible")) ; Also supports an optional + ; argument with {c,l,r}. + ("flexiblecolumns" ("true" "false")) + ("keepspaces" ("true" "false")) + ("basewidth") + ("fontadjust" ("true" "false")) + ;; Escaping to LaTeX + ("texcl" ("true" "false")) + ("mathescape" ("true" "false")) + ("escapechar") + ("escapeinside") + ("escapebegin") + ("escapeend") + ;; Interface to fancyvrb + ("fancyvrb" ("true" "false")) + ("fvcmdparams") + ("morefvcmdparams") + ;; Language definitions + ("keywordsprefix") + ("keywords") + ("morekeywords") + ("deletekeywords") + ("texcs") + ("moretexcs") + ("deletetexcs") + ("directives") + ("moredirectives") + ("deletedirectives") + ("sensitive" ("true" "false")) + ("alsoletter") + ("alsodigit") + ("alsoother") + ("otherkeywords") + ("tag") + ("string") + ("morestring") + ("deletestring") + ("comment") + ("morecomment") + ("deletecomment") + ("keywordcomment") + ("morekeywordcomment") + ("deletekeywordcomment") + ("keywordcommentsemicolon") + ("podcomment" ("true" "false"))) + "Key=value options for listings macros and environments.") + (TeX-add-style-hook "listings" (lambda () ;; New symbols (TeX-add-symbols '("lstalias" ["Alias dialect"] "Alias" ["Dialect"] "Language") - '("lstdefinestyle" "Style name" "Arguments (key=value list)") + '("lstdefinestyle" "Style name" + (TeX-arg-key-val LaTeX-listings-key-val-options)) '("lstinline" TeX-arg-verb) - '("lstinputlisting" ["Arguments (key=value list)"] TeX-arg-file) + '("lstinputlisting" [TeX-arg-key-val LaTeX-listings-key-val-options] + TeX-arg-file) "lstlistoflistings" '("lstnewenvironment" "Name" ["Number or arguments"] ["Default argument"] "Starting code" "Ending code") - "lstset") + '("lstset" (TeX-arg-key-val LaTeX-listings-key-val-options))) ;; New environments (LaTeX-add-environments - "lstlisting") + '("lstlisting" LaTeX-env-args + [TeX-arg-key-val LaTeX-listings-key-val-options])) ;; Filling (make-local-variable 'LaTeX-indent-environment-list) (add-to-list 'LaTeX-indent-environment-list @@ -58,7 +217,8 @@ (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline") ;; Fontification - (when (and (featurep 'font-latex) + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-keywords '(("lstnewenvironment" "{[[{{")) 'function) (font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.elc deleted file mode 100644 index c1b0c675f1d5..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/listings.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/ltx-base.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/ltx-base.elc deleted file mode 100644 index 4c6f2b487b63..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/ltx-base.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/ltxdoc.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/ltxdoc.elc deleted file mode 100644 index e46288361079..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/ltxdoc.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/makeidx.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/makeidx.elc deleted file mode 100644 index 4104de95b94e..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/makeidx.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/mdwlist.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/mdwlist.elc deleted file mode 100644 index 08b552ca52c1..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/mdwlist.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/multido.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/multido.el new file mode 100644 index 000000000000..786185ea572b --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/multido.el @@ -0,0 +1,52 @@ +;;; multido.el --- AUCTeX style for `multido.sty' + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Holger Sparr +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's multido.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `multido.sty'. + +;;; TODO: +;; +;; -- better argument support for multido +;; -- parsing for fpAdd resp. fpSub + +;;; Code: + +(TeX-add-style-hook + "multido" + (function + (lambda () + (TeX-add-symbols + '("multido" "\var=+-" "Repititions" t) + '("Multido" "\var=+-" "Repititions" t) + '("mmultido" "\var=+-" "Repititions" t) + '("MMultido" "\var=+-" "Repititions" t) + "multidostop" + "multidocount" + '("fpAdd" "Summand 1" "Summand 2" "Register") + '("fpSub" "Minuend" "Subtrahend" "Register"))))) + +;;; multido.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/multind.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/multind.elc deleted file mode 100644 index a0a658b674eb..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/multind.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.el index 36a5d970417b..31243065406b 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.el @@ -68,9 +68,10 @@ 4 'LaTeX-bibitem-list "}"))) ;; Fontification - (when (and (featurep 'font-latex) + (when (and (fboundp 'font-latex-add-keywords) (eq TeX-install-font-lock 'font-latex-setup)) - (font-latex-add-keywords '(("citet" "*[[{") + (font-latex-add-keywords '(("cite" "*[[{") + ("citet" "*[[{") ("citealt" "*[[{") ("citep" "*[[{") ("citealp" "*[[{") diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.elc deleted file mode 100644 index 7110d6473d4c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/natbib.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/naustrian.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/naustrian.el new file mode 100644 index 000000000000..0eb1294117f1 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/naustrian.el @@ -0,0 +1,39 @@ +;;; naustrian.el --- AUCTeX style for the `naustrian' babel option. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Austrian text in connection with the +;; `naustrian' babel option. + +;;; Code: + +(TeX-add-style-hook + "naustrian" + (lambda () + (TeX-run-style-hooks "ngerman"))) + +;;; naustrian.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/ngerman.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/ngerman.elc deleted file mode 100644 index aa28108fd8b6..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/ngerman.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/nicefrac.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/nicefrac.elc deleted file mode 100644 index 90d96c9dc0f2..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/nicefrac.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/nomencl.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/nomencl.elc deleted file mode 100644 index 41068bedb21c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/nomencl.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/paralist.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/paralist.elc deleted file mode 100644 index 0ead0a0bc111..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/paralist.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.el index 0074807986a8..a366fd7f445b 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.el @@ -1,6 +1,6 @@ ;;; pdfsync.el --- AUCTeX style for `pdfsync.sty' -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2008 Free Software Foundation, Inc. ;; Author: Ralf Angeli ;; Maintainer: auctex-devel@gnu.org @@ -32,11 +32,13 @@ (defun LaTeX-pdfsync-output-page () "Return page number in output file corresponding to buffer position." - (let* ((file (file-name-sans-extension - (file-name-nondirectory (buffer-file-name)))) - (line (TeX-line-number-at-pos)) + (let* ((line (TeX-line-number-at-pos)) (master (TeX-active-master)) + (file (file-name-sans-extension + (file-relative-name (buffer-file-name) + (file-name-directory master)))) (pdfsync-file (concat master ".pdfsync")) + (buf-live-p (get-file-buffer pdfsync-file)) (sync-record "0") (sync-line "-1") (sync-page "1") @@ -47,7 +49,7 @@ (goto-char (point-min)) ;; Narrow region to file in question. (when (not (string= file master)) - (re-search-forward (concat "^(" file "$") nil t) + (re-search-forward (concat "^(" file "\\(.tex\\)?$") nil t) (let ((beg (match-beginning 0))) (goto-char beg) (narrow-to-region (line-beginning-position 2) @@ -67,18 +69,23 @@ last-match (match-beginning 0)))))) ;; Look for the page number. (goto-char (or last-match (point-min))) + ;; There might not be any p or s lines for the current file, + ;; so make it possible to search further. + (widen) (catch 'break (while (re-search-forward "^p \\([0-9]+\\)" nil t) (when (>= (string-to-number (match-string 1)) (string-to-number sync-record)) (re-search-backward "^s \\([0-9]+\\)" nil t) (setq sync-page (match-string 1)) - (throw 'break nil))))))) + (throw 'break nil))))) + ;; Kill the buffer if it was loaded by us. + (unless buf-live-p (kill-buffer (current-buffer))))) sync-page)) (TeX-add-style-hook "pdfsync" (lambda () - (setq TeX-sync-output-page-function 'LaTeX-pdfsync-output-page))) + (setq TeX-source-correlate-output-page-function 'LaTeX-pdfsync-output-page))) ;;; pdfsync.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.elc deleted file mode 100644 index b9e588c240e0..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/pdfsync.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.el index 93c620e97534..d165ac258dd8 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.el @@ -1,6 +1,6 @@ ;;; plfonts.el - Setup AUC TeX for editing Polish text with plfonts.sty -;; $Id: plfonts.el,v 1.5 2008/02/25 18:02:11 davidswelt Exp $ +;; $Id: plfonts.el,v 1.1 1994/01/30 21:17:25 amanda Exp $ ;;; Commentary: ;; diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.elc deleted file mode 100644 index 4bf5a1b80c49..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/plfonts.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.el index 117f0c6c3fa4..f933cc12c818 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.el @@ -1,6 +1,6 @@ ;;; plhb.el - Setup AUC TeX for editing Polish text with plhb.sty -;; $Id: plhb.el,v 1.5 2008/02/25 18:02:11 davidswelt Exp $ +;; $Id: plhb.el,v 1.1 1994/01/30 21:17:27 amanda Exp $ ;;; Commentary: ;; diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.elc deleted file mode 100644 index 73df0011364c..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/plhb.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/polish.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/polish.elc deleted file mode 100644 index d078a559c05e..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/polish.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/polski.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/polski.elc deleted file mode 100644 index 074abdb48b69..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/polski.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.el index d6524a9883fb..f01244a38644 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.el @@ -62,7 +62,7 @@ (defconst LaTeX-prosper-version - "$Id: prosper.el,v 1.5 2008/02/25 18:02:11 davidswelt Exp $" + "$Id: prosper.el,v 1.5 2008/05/25 06:50:33 angeli Exp $" "prosper.el version.") (defconst LaTeX-prosper-transition-styles '("Split" @@ -83,12 +83,11 @@ (defun LaTeX-prosper-insert-title (optional) (newline) - (mapcar - (lambda(f) - (TeX-insert-macro f) - (newline)) - '("title" "subtitle" "author" "email" "institution" "slideCaption" - "Logo" "DefaultTransition")) + (mapc (lambda(f) + (TeX-insert-macro f) + (newline)) + '("title" "subtitle" "author" "email" "institution" "slideCaption" + "Logo" "DefaultTransition")) (LaTeX-insert-environment "document") (TeX-insert-macro "maketitle")) @@ -122,15 +121,14 @@ (defun LaTeX-prosper-insert-options(environment) (insert "[" ) (insert (LaTeX-prosper-slide-style-prompt) " ") - (mapcar - (lambda(f) - (if (y-or-n-p (car f)) - (insert (car (cdr f)) " "))) - '(("Draft?" "draft") - ("Color Slides?" "slideColor") - ("Disable running total on each slide?" "nototal") - ("Is the final version going to be PDF?" "pdf") - ("Are you going to use Adobe Distiller" "distiller"))) + (mapc (lambda(f) + (if (y-or-n-p (car f)) + (insert (car (cdr f)) " "))) + '(("Draft?" "draft") + ("Color Slides?" "slideColor") + ("Disable running total on each slide?" "nototal") + ("Is the final version going to be PDF?" "pdf") + ("Are you going to use Adobe Distiller" "distiller"))) (delete-char -1) (insert "]")) @@ -141,7 +139,7 @@ (progn (goto-char (+ 1 (point))) (insert "%\n"))))) - (let ((title (read-input "Title: "))) + (let ((title (read-string "Title: "))) (LaTeX-insert-environment "slide" (concat TeX-grop title TeX-grcl)))) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.elc deleted file mode 100644 index ce764dd9b61d..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/prosper.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.el index 723b12bbd802..70fef60613b9 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.el @@ -25,8 +25,8 @@ (defun TeX-arg-psfig (optional) "Ask for file, width and length. Insert psfig macro" (let ((psfile (read-file-name "PS-file: " "" "" nil)) - (figwidth (read-input "Figure width: ")) - (figheight (read-input "Figure height: ")) + (figwidth (read-string "Figure width: ")) + (figheight (read-string "Figure height: ")) ) (insert TeX-grop "figure=" psfile) @@ -41,13 +41,13 @@ (defun LaTeX-env-psfigure (environment) "Create with \\label and \\caption and \\psfig commands." - (let ((float (read-input "Float to: " LaTeX-float)) - (caption (read-input "Caption: ")) - (label (read-input "Label: " LaTeX-figure-label)) + (let ((float (read-string "Float to: " LaTeX-float)) + (caption (read-string "Caption: ")) + (label (read-string "Label: " LaTeX-figure-label)) ; gf: ask if this should be centered (psfile (read-file-name "PS-file: " "" "" nil)) - (figwidth (read-input "Figure width: ")) - (figheight (read-input "Figure height: ")) + (figwidth (read-string "Figure width: ")) + (figheight (read-string "Figure height: ")) ) (setq LaTeX-float (if (zerop (length float)) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.elc deleted file mode 100644 index d6aa9685fcb7..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/psfig.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-grad.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-grad.el new file mode 100644 index 000000000000..b1775611b902 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-grad.el @@ -0,0 +1,65 @@ +;;; pst-grad.el --- AUCTeX style for `pst-grad.sty' + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Holger Sparr +;; Created: 21 Jun 2007 +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-grad.sty'. + +;;; TODO: +;; +;; -- + +;;; Code: + +;;; Parameters +(defvar LaTeX-pstgrad-parameters-name-list + '("gradangle" "gradbegin" "gradend" "gradlines" "gradmidpoint" + "gradientHSB" "GradientCircle" "GradientPos" "GradientScale") + "A list of parameter names in pst-grad.") + +;;; Aliases +(defvaralias 'LaTeX-pst-gradbegin-list 'LaTeX-pst-color-list) +(defvaralias 'LaTeX-pst-gradend-list 'LaTeX-pst-color-list) + +;;; Hook +(TeX-add-style-hook + "pst-grad" + (function + (lambda () + (TeX-run-style-hooks + "pstricks") + (unless (member "gradient" LaTeX-pst-fillstyle-list) + (setq LaTeX-pst-fillstyle-list (append LaTeX-pst-fillstyle-list + '("gradient"))) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|gradbegin\\|gradend\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstgrad-parameters-name-list + LaTeX-pst-parameters-name-list))))) + +;;; pst-grad.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-node.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-node.el new file mode 100644 index 000000000000..d5ff2743ed6c --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-node.el @@ -0,0 +1,191 @@ +;;; pst-node.el --- AUCTeX style for `pst-node.sty' + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Holger Sparr +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's pst-plot.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-node.sty'. + +;;; TODO: +;; +;; -- self parsing of possible node names +;; -- adding more macro support + +;;; Code: + +(defalias 'LaTeX-pst-node 'LaTeX-pst-point) + +(defvar LaTeX-pstnode-parameters-completion-regexp + "\\(npos\\|nrot\\)" + "Regexp for `string-match'ing a parameter.") + +(defvar LaTeX-pstnode-parameters-boolean-regexp "show\\([a-zA-Z]+\\)" + "Regexp for `string-match'ing a parameter.") + +(defvar LaTeX-pstnode-npos-list '(".25" ".5" ".75" "1" "1.5" "2") + "A list of values for npos in nput.") + +(defvar LaTeX-pstnode-nrot-list '(":U" ":D" ":R" ":L") + "A list of values for nrot in nput.") + +(defvar LaTeX-pstnode-psmatrix-list + '("mnode" "emnode" "name" "nodealign" "mocl" "rowsep" "colsep" + "mnodesize") + "A list of values for trimode in pstribox.") + +;;; Parameters +(defvar LaTeX-pstnode-parameters-history nil + "History of values for parameters in pst-node.") + +(defvar LaTeX-pstnode-parameters-value-history nil + "History of parameter values in pst-node.") + +(defvar LaTeX-pstnode-parameters-name-list + '("angle" "angleA" "angleB" "arcangle" "arcangleA" "arcangleB" "arm" + "armA" "armB" "boxsize" "colsep" "framesize" "href" "loopsize" + "ncurv" "ncurvA" "ncurvB" "nodesepA" "nodesepB" "npos" "nrot" + "offset" "offsetA" "offsetB" "radius" "vref" "Xnodesep" "XnodesepA" + "XnodesepB" "Ynodesep" "YnodesepA" "YnodesepB") + "A list of parameters' name in pst-node.") + +(defvar LaTeX-pstnode-parameters-name-history nil + "History of parameter names in pst-node.") + +;;; Derived Functions from pstricks.el defuns +(defun LaTeX-pstnode-parameter-value (param) + "See documentation of `LaTeX-package-parameter-value'." + (LaTeX-package-parameter-value param "pstnode")) + +(defun LaTeX-pstnode-parameters-pref-and-chosen (param &optional noskip) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters-pref-and-chosen param "pstnode" noskip)) + +(defun LaTeX-pstnode-parameters (optional &optional preparam param) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters optional "pstnode" preparam param)) + +;;; Macros +(defun LaTeX-pstnode-macro-nput (optional &optional arg) + "Return \\nput arguments after querying." + (insert "[rot=" (LaTeX-pst-angle) "]{" (LaTeX-pst-angle) "}{" + (LaTeX-pst-node) "}")) + +(defun LaTeX-pstnode-macro-cnodeput (optional &optional arg) + "Return \\cnodeput arguments after querying." + (let ((rotation (if current-prefix-arg (LaTeX-pst-angle) nil)) + (pnt (if current-prefix-arg (LaTeX-pst-point) nil))) + (insert (if rotation (format "{%s}" rotation) "") + (if pnt (format "(%s)" pnt) "") "{" (LaTeX-pst-node) "}"))) + +(defun LaTeX-pstnode-macro-nc (optional &optional arg) + "Return \\nc* arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") "{" (LaTeX-pst-node) + "}{" (LaTeX-pst-node) "}"))) + +(defun LaTeX-pstnode-macro-pc (optional &optional arg) + "Return \\pc* arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") "(" (LaTeX-pst-point) + ")(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pstnode-macro-tnabcput (optional &optional arg) + "Return \\t?put or \\n?put arguments after querying." + (TeX-argument-insert (LaTeX-pstnode-parameters-pref-and-chosen + '("nrot" "npos")) optional)) + +;;; Environments +(defun LaTeX-pstnode-env-psmatrix (env) + "Return psmatrix environment with arguments." + (let ((opt (completing-read-multiple "Options: " + LaTeX-pstnode-psmatrix-list))) + (LaTeX-insert-environment env opt))) + +(TeX-add-style-hook + "pst-node" + (function + (lambda () + (LaTeX-add-environments + '("psmatrix" LaTeX-pstnode-env-psmatrix)) + (TeX-add-symbols + '("MakeShortNab" 2) '("MakeShortTablr" 4) '("PSTnodesLoaded" 0) + '("nput" LaTeX-pstnode-macro-nput TeX-arg-macro) + '("cnodeput" [LaTeX-pst-parameters] LaTeX-pstnode-macro-cnodeput t) + '("Cnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("cnode" [LaTeX-pstnode-parameters] "Radius" t) + '("fnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("fnode*" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("dotnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("pnode" LaTeX-pst-point-in-parens t) + '("Rnode" [LaTeX-pstnode-parameters ("href" "vref")] + (TeX-arg-eval LaTeX-pst-point) t) + '("rnode" [LaTeX-pstnode-parameters ("ref")] + (TeX-arg-eval LaTeX-pst-point) t) + '("circlenode" [LaTeX-pst-parameters] + (TeX-arg-eval LaTeX-pst-point) t) + '("dianode" [LaTeX-pst-parameters] "Node Name" t) + '("ovalnode" [LaTeX-pst-parameters] "Node Name" t) + '("trinode" [LaTeX-pst-parameters] "Node Name" t) + '("dotnode" [LaTeX-pst-parameters] LaTeX-pst-point-in-parens + "Node Name") + '("naput" [LaTeX-pstnode-macro-tnabcput] t) + '("nbput" [LaTeX-pstnode-macro-tnabcput] t) + '("ncput" [LaTeX-pstnode-macro-tnabcput] t) + '("taput" [LaTeX-pstnode-macro-tnabcput] t) + '("tbput" [LaTeX-pstnode-macro-tnabcput] t) + '("thput" [LaTeX-pstnode-macro-tnabcput] t) + '("tlput" [LaTeX-pstnode-macro-tnabcput] t) + '("trput" [LaTeX-pstnode-macro-tnabcput] t) + '("tvput" [LaTeX-pstnode-macro-tnabcput] t) + '("ncline" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncarc" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncdiag" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncdiagg" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncbar" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncangle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncangles" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncloop" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("nccurve" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("nccircle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncarcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("pcline" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pccurve" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcarc" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcbar" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcdiag" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcdiagg" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcangle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcangles" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcloop" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcarcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("psspan" (TeX-arg-eval LaTeX-pst-input-int)) + '("psrowhook" t) + '("pscolhook" t)) + (TeX-run-style-hooks + "pstricks")))) + +;;; pst-node.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-plot.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-plot.el new file mode 100644 index 000000000000..beae60a2b9ae --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-plot.el @@ -0,0 +1,137 @@ +;;; pst-plot.el --- AUCTeX style for `pst-plot.sty' + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Holger Sparr +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's pst-plot.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-plot.sty'. + +;;; TODO: +;; +;; -- improve symbol support (especially the pstScalePoints macros) +;; -- check for multido.el necessity + +;;; Code: + +;; Self Parsing -- see (info "(auctex)Hacking the Parser") +(defvar LaTeX-auto-pstplot-regexp-list + '(("\\\\\\(save\\|read\\)data{?\\(\\\\[a-zA-Z]+\\)}?" + 2 LaTeX-auto-pstplot)) + "List of regular expressions to extract arguments of \\*data + macros.") + +(defvar LaTeX-auto-pstplot nil + "Temporary for parsing \\*data definitions.") + +(defun LaTeX-pstplot-cleanup () + "Move symbols from `LaTeX-auto-pstplot to `TeX-auto-symbol'." + (mapcar (lambda (symbol) + ;; (setq TeX-symbol-list (cons (list symbol 0) TeX-symbol-list)) + ;; (setq TeX-auto-symbol (cons (list symbol 0) TeX-auto-symbol))) + (add-to-list 'LaTeX-pstplot-datasets symbol)) + LaTeX-auto-pstplot)) + +(defun LaTeX-pstplot-prepare () + "Clear `LaTeX-auto-pstplot' before use." + (setq LaTeX-auto-pstplot nil)) + +(add-hook 'TeX-auto-prepare-hook 'LaTeX-pstplot-prepare) +(add-hook 'TeX-auto-cleanup-hook 'LaTeX-pstplot-cleanup) + +;;; Parameters +(defvar LaTeX-pstplot-datasets nil + "List of parsed data sets defined with \\savedata or \\readdata.") + +(defvar LaTeX-pstplot-parameters-name-list + '("axesstyle" "labels" "plotpoints" "plotstyle" "showorigin" "ticks" + "ticksize" "tickstyle") + "A list of parameters' name in pst-plot.") + +(defvar LaTeX-pst-ticks-list '(t "none" "all" "x" "y") + "A list of values for ticks in pst-plot.") + +(defvaralias 'LaTeX-pst-labels-list 'LaTeX-pst-ticks-list) + +(defvar LaTeX-pst-plotstyle-list + '(t "dots" "line" "polygon" "curve" "ecurve" "ccurve") + "A list of values for tickstyles in pst-plot.") + +(defvar LaTeX-pst-tickstyle-list '(t "full" "top" "bottom") + "A list of values for tickstyles in pst-plot.") + +(defvar LaTeX-pst-axesstyle-list '(t "axes" "frame" "none") + "A list of values for axesstyles in pst-plot.") + +;;; Macros +(defun LaTeX-pst-macro-psaxes (optional &optional arg) + "Return \\psaxes arguments after querying." +(let* ((cpref (if current-prefix-arg (car current-prefix-arg) 0)) + (arrows (LaTeX-pst-arrows)) + (pnt1 (if (> cpref 4) (LaTeX-pst-point) nil)) + (pnt2 (if (> cpref 0) (LaTeX-pst-point) nil)) + (pnt3 (LaTeX-pst-point))) + ;; insert \psaxes arguments + (insert (if arrows (format "{%s}" arrows) "") + (if pnt1 (format "(%s)" pnt1) "") + (if pnt2 (format "(%s)" pnt2) "") "(" pnt3 ")"))) + +;;; Derived defuns +(defun LaTeX-pstplot-datasets-read () + (TeX-arg-compl-list "Datasets" LaTeX-pstplot-datasets)) + +;;; Hook +(TeX-add-style-hook + "pst-plot" + (function + (lambda () + (mapcar 'TeX-auto-add-regexp LaTeX-auto-pstplot-regexp-list) + (TeX-add-symbols + '("readdata" "Macro Name" TeX-arg-file) + '("savedata" "Macro Name" ["Values"]) + '("dataplot" ["Options"] + (TeX-arg-eval LaTeX-pstplot-datasets-read)) + '("fileplot" ["Options"] TeX-arg-file) + '("listplot" ["Options"] "Values") + '("pstScalePoints" "X-Mod" "Y-Mod") + '("psplot" [LaTeX-pst-parameter] "xmin" "xmax" t) + '("parametricplot" [LaTeX-pst-parameter] "xmin" "xmax" t) + '("psaxes" [LaTeX-pst-parameters] LaTeX-pst-macro-psaxes) + "pshlabel" + "psvlabel") + (TeX-run-style-hooks + "pstricks" + "multido") + (unless (string-match "plotstyle" + LaTeX-pst-parameters-completion-regexp) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|plotstyle\\|ticks\\|tickstyle\\|axesstyle\\|labels\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstplot-parameters-name-list + LaTeX-pst-parameters-name-list))))) + +;;; pst-plot.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-slpe.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-slpe.el new file mode 100644 index 000000000000..2c824549a243 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pst-slpe.el @@ -0,0 +1,67 @@ +;;; pst-slpe.el --- AUCTeX style for `pst-slpe.sty' + +;; Copyright (C) 2007 Free Software Foundation, Inc. + +;; Author: Holger Sparr +;; Created: 21 Jun 2007 +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-slpe.sty'. + +;;; TODO: +;; +;; -- + +;;; Code: + +;;; Parameters +(defvar LaTeX-pstslpe-parameters-name-list + '("slopeangle" "slopecenter" "slopecolors" "slopebegin" "slopeend" + "sloperadius" "slopesteps") + "A list of parameter names in pst-slpe.") + +;;; Aliases +(defvaralias 'LaTeX-pst-slopebegin-list 'LaTeX-pst-color-list) +(defvaralias 'LaTeX-pst-slopeend-list 'LaTeX-pst-color-list) + +;;; Define hook +(TeX-add-style-hook + "pst-slpe" + (function + (lambda () + (TeX-run-style-hooks + "pstricks") + (unless (member "slope" LaTeX-pst-fillstyle-list) + (setq LaTeX-pst-fillstyle-list + (append LaTeX-pst-fillstyle-list + '("slope" "slopes" "ccslope" "ccslopes" "radslope" + "radslopes"))) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|slopebegin\\|slopeend\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstslpe-parameters-name-list + LaTeX-pst-parameters-name-list))))) + +;;; pst-slpe.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.el index 08d200ef3a99..6e4df329fee9 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.el @@ -1,10 +1,10 @@ -;;; pstricks.el --- AUCTeX style for the `pstricks' babel option. +;;; pstricks.el --- AUCTeX style for the `pstricks' package. -;; Copyright (C) 2007 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2009 Free Software Foundation, Inc. -;; Author: Ralf Angeli +;; Author: Holger Sparr ;; Maintainer: auctex-devel@gnu.org -;; Created: 2007-06-10 +;; Created: 2007-06-14 ;; Keywords: tex ;; This file is part of AUCTeX. @@ -25,19 +25,842 @@ ;; 02110-1301, USA. ;;; Commentary: +;; +;; AUCTeX style file for PSTricks +;; +;; Support for basic PSTricks macros and their arguments. Separate +;; history variables for point, angle, ... arguments. +;; +;; Parameter input completion together with input completion for certain +;; parameters (e.g. linestyle, linecolor and the like). +;; +;; There is a PSTricks-specific support for adding new parameters to +;; existing parameter lists or changing existing ones in optional +;; macro arguments. You might want to make those available through +;; key bindings by using something like +;; (define-key LaTeX-mode-map (kbd "C-c p a") +;; 'LaTeX-pst-parameter-add) +;; (define-key LaTeX-mode-map (kbd "C-c p c") +;; 'LaTeX-pst-parameter-change-value) +;; in a personal style file for PSTricks. -;; Add support for PSTricks. +;;; History: +;; +;; 14/06/2007 rewrite of pstricks.el based on Jean-Philippe Georget's +;; pstricks.el version found on -;; TODO: Actually implement support. Currently only TeX PDF mode is -;; turned off. This is done here because adding the hook in latex.el -;; prevents other pstricks styles from being loaded. +;;; TODO: +;; +;; -- Use alist or hash-table for parameter input +;; -- Add more regularly used PSTricks macros +;; -- Prevent errors in AUCTeX modes other than LaTeX mode. +;; -- Check if the functionality for adding and changing parameters +;; can be generalized. ;;; Code: +;;; General Functions + +(defun TeX-arg-compl-list (list &optional prompt hist) + "Input a value after PROMPT with completion from LIST and HISTORY." + (let ((first (car list))) + (if (and first (listp first)) + (let ((func (nth 0 first)) + (prompt (concat (or (nth 1 first) prompt) ": ")) + (compl (nth 2 first)) + (hist (or (nth 3 first) hist)) + (crm-separator (nth 4 first)) + res) + (setq list (cdr list)) + (cond ((eq func 'completing-read-multiple) + (setq res (funcall func prompt list nil compl nil hist)) + (mapconcat 'identity res crm-separator)) + ((eq func 'completing-read) + (setq res + (funcall func prompt list nil compl nil hist))))) + (completing-read (concat prompt ": ") list nil nil nil hist)))) + +;; XXX: Show default value in prompt. Perhaps extend +;; `TeX-argument-prompt' to do that. +(defun LaTeX-pst-what (what prompt default &optional arg) + "Ask for WHAT with PROMPT with DEFAULT. +The corresponding lists LaTeX-pst--\\(list\\|history\\) +have to exist. + +\(Used to define functions named LaTeX-pst-.\))" + (let ((list (intern (concat "LaTeX-pst-" what "-list"))) + (hist (intern (concat "LaTeX-pst-" what "-history")))) + (if (not arg) + (setq arg (TeX-arg-compl-list (symbol-value list) prompt hist))) + (if (string= arg "") + default + (add-to-list list arg) + arg))) + +(defun LaTeX-pst-input-int (prompt arg) + "Return number as string asked for with PROMPT if no number +passed with ARG." + (unless (numberp arg) + (setq arg (read-number (concat prompt ": ") 2))) + (number-to-string arg)) + +(defun LaTeX-pst-enclose-obj (symbol op cl) + "Enclose string returned by the `funcall' SYMBOL in OP and CL +character." + (let ((str (funcall symbol))) + (if str (insert (char-to-string op) str (char-to-string cl))))) + +(defun LaTeX-package-parameter-value (param pname) + "Ask for possible value of parameter PARAM given as string +available through package name PNAME and return \"param=value\"." + (add-to-list (intern (concat "LaTeX-" pname "-parameters-name-list")) + param) + ;; select predefined set + (let* ((cregexp + (symbol-value + (intern (concat "LaTeX-" pname + "-parameters-completion-regexp")))) + (bregexp + (symbol-value (intern (concat "LaTeX-" pname + "-parameters-boolean-regexp")))) + (parlist (cond + ((string-match cregexp param) + (intern (concat "LaTeX-" pname "-" + (match-string 0 param) "-list"))) + ((string-match bregexp param) + 'LaTeX-pst-boolean-list))) + val compl) + ;; ask for value + (setq val (TeX-arg-compl-list + (symbol-value parlist) + (concat "(Press TAB for completions) " param) + (intern (concat "LaTeX-" pname + "-parameters-value-history")))) + ;; FIXME: This looks broken. `compl' is never set and unless "" + ;; is added to parlist (at least in the Boolean case), the prompt + ;; shown by `TeX-arg-compl-list' will be incorrect. + (if (and (not compl) parlist) (add-to-list parlist val)) + (if (string= val "") "" (concat param "=" val)))) + +(defun LaTeX-package-parameters-pref-and-chosen (param pname noskip) + "Set values for elements of PARAM from package PNAME and +further explicitly typed in parameters and return a comma +separated list as string." + (let ((allpars "") + (fask (intern (concat "LaTeX-" pname "-parameter-value"))) + tpara parval) + (when param + (while param + (setq tpara (pop param)) + (setq parval (funcall fask tpara)) + (setq allpars + (concat allpars + (if (or (string= "" allpars) (string= "" parval)) + "" ",") parval)))) + ;; ask for parameter names as long as none is given + (when noskip + (while + (not + (string= + "" + (setq tpara + (completing-read + "Parameter name (RET to stop): " + (symbol-value (intern + (concat "LaTeX-" pname + "-parameters-name-list"))) + nil nil nil (intern + (concat "LaTeX-" pname + "-parameters-name-history")))))) + (setq parval (funcall fask tpara)) + ;; concat param=value with other ones + (setq allpars + (concat allpars + (if (or (string= "" allpars) (string= "" parval)) + "" + ",") + parval)))) + (add-to-list + (intern (concat "LaTeX-" pname "-parameters-history")) allpars) + allpars)) + +(defun LaTeX-package-parameters (optional pname preparam param) + "Ask for parameters and manage several parameter lists for +package PNAME" + (let ((fask (intern + (concat "LaTeX-" pname "-parameters-pref-and-chosen"))) + (hlist (intern (concat "LaTeX-" pname "-parameters-history"))) + (nlist + (symbol-value + (intern (concat "LaTeX-" pname "-parameters-name-list"))))) + ;; + (when (and preparam (listp preparam)) + (setq preparam (funcall fask preparam))) + ;; + (setq param + (completing-read-multiple + (concat + "Params (use for history or RET for choices): ") + nlist nil nil nil hlist)) + ;; + (if (and (string= "" (car param)) (= (length param) 1)) + (setq param (funcall fask nil t)) + (setq param (car (symbol-value hlist)))) + (TeX-argument-insert + (if (or (string= "" preparam) (eq preparam nil)) + param + (concat preparam (if (string= "" param) "" (concat "," param)))) + optional))) + +;;; Points +(defvar LaTeX-pst-point-list (list "0,0") + "A list of values for point in pstricks.") + +(defvar LaTeX-pst-point-history LaTeX-pst-point-list + "History of values for point in pstricks.") + +(defun LaTeX-pst-point () + "Ask for a point and manage point list." + (LaTeX-pst-what "point" + (concat "Point (default " (car LaTeX-pst-point-history) ")") + (car LaTeX-pst-point-history))) + +(defun LaTeX-pst-point-in-parens (optional) + "Enclose point in parentheses." + (LaTeX-pst-enclose-obj 'LaTeX-pst-point ?( ?))) + +;;; Angles +(defvar LaTeX-pst-angle-list (list "0") + "A list of values for angle in pstricks.") + +(defvar LaTeX-pst-angle-history nil + "History of values for angle in pstricks.") + +(defun LaTeX-pst-angle () + "Ask for a angle and manage angle list" + (LaTeX-pst-what "angle" + (concat "Angle (default " (car LaTeX-pst-angle-list) ")") + (car LaTeX-pst-angle-list))) + +;;; Extension in one Direction +(defvar LaTeX-pst-extdir-list (list "1") + "A list of values for extdir in pstricks.") + +(defvar LaTeX-pst-extdir-history nil + "History of values for extdir in pstricks.") + +(defun LaTeX-pst-extdir (descr) + "Ask for a extdir and manage extdir list" + (LaTeX-pst-what "extdir" + (concat descr " (default " (car LaTeX-pst-extdir-list) ")") + (car LaTeX-pst-extdir-list))) + +;;; Relative Points +(defvar LaTeX-pst-delpoint-list nil + "A list of values for delpoint in pstricks.") + +(defvar LaTeX-pst-delpoint-history nil + "History of values for delpoint in pstricks.") + +;;; Arrows +(defvar LaTeX-pst-arrows-list + '("->" "<-" "<->" ">-<" ">-" "-<" "<<->>" "<<-" "->>" "|-|" "|-" "-|" + "|*-|*" "[-]" "[-" "-]" "(-)" "(-" "-)" "*-*" "*-" "-*" "0-0" "0-" + "-0" "c-c" "c-" "-c" "C-C" "C-" "-C" "cc-cc" "cc-" "-cc" "|<->|" "|<-" + "->|" "|<*->|*" "|<*-" "->|*" "-") + "A list of values for arrows in pstricks.") + +(defvar LaTeX-pst-arrows-history nil + "History of values for arrows in pstricks.") + +;; XXX: Better ask for arrow start and end separately? +;; `LaTeX-pst-arrows-list' is not exhaustive. +(defun LaTeX-pst-arrows () + "Ask for a arrow type and manage arrow type list" + (or (LaTeX-pst-what "arrows" "Arrow type" nil) "")) + +;;; Dots +(defvar LaTeX-pst-dotstyle-list + '((completing-read "Dot style" nil LaTeX-pst-dotstyle-history) + "*" "o" "+" "|" "triangle" "triangle*" "square" "square*" "pentagon" + "pentagon*") + "A list of values for dotstyle in pstricks.") + +(defvar LaTeX-pst-dotstyle-history nil + "History of values for dotstyle in pstricks.") + +;;; Reference Point +(defvar LaTeX-pst-refpoint-list + '((completing-read "Reference point" t LaTeX-pst-refpoint-history) + "l" "r" "t" "tl" "lt" "tr" "rt" "b" "bl" "br" "lb" "rb" "B" "Bl" + "Br" "lB" "rB") + "A list of values for refpoint in pstricks.") + +(defvar LaTeX-pst-refpoint-history nil + "History of values for refpoint in pstricks.") + +(defun LaTeX-pst-refpoint () + "Ask for a refpoint and manage refpoint list" + (LaTeX-pst-what "refpoint" "Reference point" nil)) + +;;; Color + +;; FIXME: Still used? +(defvar LaTeX-pst-color-history nil + "History of values for color in pstricks.") + +;;; Others without History in Completion + +(defvar LaTeX-pst-style-list + '((completing-read "Defined Style" t)) + "A list of values for user defined styles in pstricks.") + +;;; Parameters + +(defvar LaTeX-pst-parameters-history nil + "History of values for parameters in pstricks.") + +(defvar LaTeX-pst-parameters-value-history nil + "History of parameter values in pstricks.") + +(defvar LaTeX-pst-basic-parameters-name-list + '("arcsep" "arcsepA" "arcsepB" "arrowinset" "arrowlength" "arrows" + "arrowscale" "arrowsize" "border" "bordercolor" "boxsep" + "bracketlength" "cornersize" "curvature" "dash" "dimen" "dotangle" + "dotscale" "dotsep" "dotsize" "dotstyle" "doublecolor" "doubleline" + "doublesep" "doubleset" "fillcolor" "fillstyle" "framearc" + "framesep" "gangle" "gridcolor" "griddots" "gridlabelcolor" + "gridlabels" "gridwidth" "hatchangle" "hatchcolor" "hatchsep" + "hatchsepinc" "hatchwidth" "hatchwidthinc" "header" "labelsep" + "liftpen" "linearc" "linecolor" "linestyle" "linetype" "linewidth" + "rbracketlength" "ref" "runit" "shadow" "shadowangle" "shadowcolor" + "shadowsize" "showgrid" "showpoints" "style" "subgridcolor" + "subgriddiv" "subgriddots" "subgridwidth" "swapaxes" "tbarsize" + "trimode" "unit" "xunit" "yunit") + "A list of parameter names in pstricks.") + + +(defvar LaTeX-pst-boolean-list '("true" "false") + "List of binary values for key=value completion.") + +;; XXX: Colors can actually be given as [-][!]. +(defvar LaTeX-pst-color-list + '("black" "darkgray" "gray" "lightgray" "white" + "red" "green" "blue" "cyan" "magenta" "yellow") + "List of colors predefined in PSTricks.") + +(defvar LaTeX-pst-fillstyle-list + '("none" "solid" "vlines" "vlines*" "hlines" "hlines*" "crosshatch" + "crosshatch*" "boxfill") + "List of fill styles defined in PSTricks.") + +;; From PSTricks: PostScript macros for Generic TeX, User's Guide, +;; Timothy Van Zandt, 25 July 2003, Version 97. +;; FIXME: Provide separate variables tailored to the different macros. +(defvar LaTeX-pst-basic-parameters-list + '(;; Dimensions, coordinates and angles + ("unit") + ("xunit") + ("yunit") + ("runit") + ;; Basic graphics parameters + ("linewidth") + ("linecolor" LaTeX-pst-color-list) + ("fillstyle" LaTeX-pst-fillstyle-list) + ("fillcolor" LaTeX-pst-color-list) + ("arrows" LaTeX-pst-arrows-list) + ("showpoints" LaTeX-pst-boolean-list) + ;; Lines and polygons + ("linearc") + ("framearc") + ("cornersize" ("relative" "absolute")) + ("gangle") + ;; Arcs, circles and ellipses + ("arcsepA") + ("arcsepB") + ("arcsep") + ;; Curves + ("curvature") + ;; Dots + ("dotstyle" ("*" "o" "Bo" "x" "+" "B+" "asterisk" "Basterisk" "oplus" + "otimes" "|" "B|" "square" "Bsquare" "square*" "diamond" + "Bdiamond" "diamond*" "triangle" "Btriangle" "triangle*" + "pentagon" "Bpentagon" "pentagon*")) + ("dotsize") + ("dotscale") + ("dotangle") + ;; Grids + ("gridwidth") + ("gridcolor" LaTeX-pst-color-list) + ("griddots") + ("gridlabels") + ("gridlabelcolor" LaTeX-pst-color-list) + ("subgriddiv") + ("subgridwidth") + ("subgridcolor" LaTeX-pst-color-list) + ("subgriddots") + ;; Plots + ("plotstyle" ("dots" "line" "polygon" "curve" "ecurve" "ccurve")) + ("plotpoints") + ;; Coordinate systems + ("origin") + ("swapaxes" LaTeX-pst-boolean-list) + ;; Line styles + ("linestyle" ("none" "solid" "dashed" "dotted")) + ("dash") + ("dotsep") + ("border") + ("bordercolor" LaTeX-pst-color-list) + ("doubleline" LaTeX-pst-boolean-list) + ("doublesep") + ("doublecolor" LaTeX-pst-color-list) + ("shadow" LaTeX-pst-boolean-list) + ("shadowsize") + ("shadowangle") + ("shadowcolor" LaTeX-pst-color-list) + ("dimen" ("outer" "inner" "middle")) + ;; Fill styles + ("hatchwidth") + ("hatchsep") + ("hatchcolor" LaTeX-pst-color-list) + ("hatchangle") + ("addfillstyle" LaTeX-pst-fillstyle-list) + ;; Arrowheads and such + ("arrowsize") + ("arrowlength") + ("arrowwinset") + ("tbarsize") + ("bracketlength") + ("rbracketlength") + ("arrowscale") + ;; Parameters + ("linetype") + ;; Graphics objects + ("liftpen") + ;; Placing and rotating whatever + ("labelsep") + ;; Axes + ("labels" ("all" "x" "y" "none")) + ("showorigin" LaTeX-pst-boolean-list) + ("ticks" ("all" "x" "y" "none")) + ("tickstyle" ("full" "top" "bottom")) + ("ticksize") + ("axesstyle" ("axes" "frame" "none")) + ;; Framed boxes + ("framesep") + ("boxsep") + ("trimode" ("*" "U" "D" "R" "L")) + ;; Nodes + ("href") + ("vref") + ("radius") + ;; Node connections + ("nodesep") + ("arcangle") + ("angle") + ("arm") + ("loopsize") + ("ncurv") + ("boxsize") + ("offset") + ;; Node connections labels: I + ("ref") + ("nrot") + ("npos") + ("shortput" ("none" "nab" "tablr" "tab")) + ;; Node connection labels: II + ("tpos") + ;; Attaching labels to nodes + ("rot") + ;; Mathematical diagrams and graphs + ("mnode" ("R" "r" "C" "f" "p" "circle" "oval" "dia" "tri" "dot" "none")) + ("emnode" ("R" "r" "C" "f" "p" "circle" "oval" "dia" "tri" "dot" "none")) + ("name") + ("nodealign" LaTeX-pst-boolean-list) + ("mcol" ("l" "r" "c")) + ("rowsep") + ("colsep") + ("mnodesize") + ;; ... + ) + "List of keys and values for PSTricks macro arguments.") + +(defvar LaTeX-pst-parameters-name-list + LaTeX-pst-basic-parameters-name-list + "A list of all parameters with completion.") + +(defvar LaTeX-pst-parameters-name-history nil + "History of parameter names in pstricks.") + +(defvar LaTeX-pst-parameters-completion-regexp + "\\(arrows\\|linestyle\\|fillstyle\\|color\\|trimode\\|dotstyle\\|\\\\|show[a-zA-Z]+\\)" + "Regexp for `string-match'ing a parameter.") + +(defun LaTeX-pst-parameter-value (param) + "See documentation of `LaTeX-package-parameter-value'." + (LaTeX-package-parameter-value param "pst")) + +(defun LaTeX-pst-parameters-pref-and-chosen (param &optional noskip) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters-pref-and-chosen param "pst" noskip)) + +;; FIXME: This is likely only a transitional function used until all +;; macros got their calls to `TeX-arg-key-val' with tailored parameter +;; lists. +(defun LaTeX-pst-parameters (optional) + "Prompt for general parameters of a PSTricks argument." + (TeX-arg-key-val optional LaTeX-pst-basic-parameters-list)) + +;;; Macros +(defun LaTeX-pst-macro-psarc (optional &optional arg) + "Return \\psarc arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt (if current-prefix-arg nil (LaTeX-pst-point)))) + (insert (if arrows (format "{%s}" arrows) "") + (if pnt (format "(%s)" pnt) "") + "{" (LaTeX-pst-extdir "Radius") "}{" (LaTeX-pst-angle) "}{" + (LaTeX-pst-angle) "}"))) + +(defun LaTeX-pst-macro-pscircle (optional &optional arg) + "Return \\pscircle arguments after querying." + (insert "(" (LaTeX-pst-point) "){" (LaTeX-pst-extdir "Radius") "}")) + +(defun LaTeX-pst-macro-rput (optional &optional arg) + "Return \\rput arguments after querying." + (let ((refpoint (LaTeX-pst-refpoint)) + (rotation (if current-prefix-arg (LaTeX-pst-angle) nil))) + (insert (if refpoint (concat "[" refpoint "]") "") + (if rotation + (concat "{" rotation "}") + "") "(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-uput (optional &optional arg) + "Return \\uput arguments after querying." + (let ((dist (LaTeX-pst-extdir "Distance")) + (refpoint (LaTeX-pst-refpoint))) + (insert (if dist (concat "{" dist "}") "") + (if refpoint + (concat "[" (LaTeX-pst-refpoint) "]") + "[]") + "{" (LaTeX-pst-angle) "}(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-multirputps (optional &optional arg) + "Return \\multirput or \\multips arguments after querying." + (let ((refpoint (LaTeX-pst-refpoint)) + (rotation (if current-prefix-arg (LaTeX-pst-angle) nil)) + (pnt (LaTeX-pst-point)) + (dpnt (LaTeX-pst-what "delpoint" "Increment (default 1,1)" "1,1")) + (repi (LaTeX-pst-input-int "Repetitions" nil))) + (insert (if refpoint (format "[%s]" refpoint) "") + (if rotation (format "{%s}" rotation) "") + "(" pnt ")(" dpnt "){" repi "}"))) + +(defun LaTeX-pst-macro-psline (optional &optional arg) + "Return \\psline or \\ps[ce]?curve[*] arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point))) + (insert (if arrows (format "{%s}" arrows) "") "(" pnt1 ")" ) + (while (and (not (string= pnt2 "")) (not (string= pnt1 pnt2))) + (insert "(" pnt2 ")") + (setq pnt1 pnt2) + (setq pnt2 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-psdots (optional single) + "Return \\psdot[s]? arguments after querying." + (let* ((pnt1 (LaTeX-pst-point)) + (pnt2 (if single pnt1 (LaTeX-pst-point)))) + (insert "(" pnt1 ")") + (while (and (not (string= pnt2 "")) (not (string= pnt1 pnt2))) + (setq pnt1 pnt2) + (insert "(" pnt1 ")") + (setq pnt2 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-parabola (optional &optional arg) + "Return \\parabola arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") + "(" (LaTeX-pst-point) ")(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-pnt-twolen (optional prompt1 prompt2) + "Return point and 2 paired lengths in separate parens as arguments." + ;; insert \psellipse[*]?, \psdiamond or \pstriangle arguments + (let ((pnt (if current-prefix-arg nil (LaTeX-pst-point)))) + (insert (if pnt (format "(%s)" pnt) "") + "(" (LaTeX-pst-extdir prompt1) "," + (LaTeX-pst-extdir prompt2) ")"))) + +(defun LaTeX-pst-macro-psbezier (optional &optional arg) + "Return \\psbezier arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point)) + (pnt3 (LaTeX-pst-point))) + (insert (if arrows (format "{%s}" arrows) "") + "(" pnt1 ")(" pnt2 ")") + (while (not (string= pnt2 pnt3)) + (insert "(" pnt3 ")") + (setq pnt2 pnt3) + (setq pnt3 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-pspolygon (optional &optional arg) + "Return \\pspolygon arguments after querying." + (let ((pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point)) + (pnt3 (LaTeX-pst-point))) + (insert "(" pnt1 ")(" pnt2 ")") + (while (not (string= pnt2 pnt3)) + (insert "(" pnt3 ")") + (setq pnt2 pnt3) + (setq pnt3 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-psframe (optional &optional arg) + "Return \\psframe arguments after querying." + (let ((pnt1 (if current-prefix-arg nil (LaTeX-pst-point))) + (pnt2 (LaTeX-pst-point))) + (insert (if pnt1 (format "(%s)" pnt1) "") "(" pnt2 ")"))) + +(defun LaTeX-pst-macro-psgrid (optional &optional arg) + "Return \\psgrid arguments after querying." + (let* ((cpref (if current-prefix-arg (car current-prefix-arg) 0)) + (pnt1 (if (> cpref 4) (LaTeX-pst-point) nil)) + (pnt2 (if (> cpref 0) (LaTeX-pst-point) nil)) + (pnt3 (if (> cpref 0) (LaTeX-pst-point) nil))) + (insert (if pnt1 (format "(%s)" pnt1) "") + (if pnt2 (format "(%s)(%s)" pnt2 pnt3) "")))) + +(defun LaTeX-pst-macro-newpsobject (&optional arg) + "Return \\newpsobject arguments after querying." + (insert "{" (read-string "New PSObject Name: ") "}" + ;; FIXME: It would be better to use something more confined + ;; than `TeX-symbol-list'. + "{" (completing-read "Parent Object: " (TeX-symbol-list)) + "}")) + +;;; Environments +(defun LaTeX-pst-env-pspicture (env) + "Create new pspicure environment." + (let ((opt (multi-prompt-key-value + (TeX-argument-prompt t "Options" nil) + '(("showgrid") ("shift")))) + (p0 (LaTeX-pst-what "point" "Lower left (default 0,0)" "0,0")) + (p1 (LaTeX-pst-what "point" "Upper right (default 1,1)" "1,1")) + corn) + (setq corn (concat (unless (string= "" opt) (format "[%s]" opt)) + (if (string= "0,0" p0) "" (format "(%s)" p0)) + "(" p1 ")")) + (LaTeX-insert-environment env corn))) + +;;; Self Parsing -- see (info "(auctex)Hacking the Parser") +(defvar LaTeX-auto-pstricks-regexp-list + '(("\\\\newps\\(object\\){\\([a-zA-Z]+\\)}{\\([a-zA-Z]+\\)}" (1 2 3) + LaTeX-auto-pstricks) + ("\\\\newps\\(fontdot\\){\\([a-zA-Z]+\\)}" (1 2) + LaTeX-auto-pstricks) + ("\\\\newps\\(style\\){\\([a-zA-Z]+\\)}" (1 2) + LaTeX-auto-pstricks) + ("\\\\define\\(color\\){\\([a-zA-Z]+\\)}{\\(rgb\\|cmyk\\)}" (1 2 3) + LaTeX-auto-pstricks) + ("\\\\new\\(rgb\\|hsb\\|cmyk\\)\\(color\\){\\([a-zA-Z]+\\)}" (2 3 1) + LaTeX-auto-pstricks)) + "List of regular expressions to extract arguments of \\newps* macros.") + +(defvar LaTeX-auto-pstricks nil + "Temporary for parsing \\newps* definitions.") + +(defun LaTeX-pst-cleanup () + "Move symbols from `LaTeX-auto-pstricks' to `TeX-auto-symbol'." + (mapcar + (lambda (list) + (let ((type (car list))) + (cond ((string= type "object") + (setq TeX-auto-symbol + (cons (list (nth 1 list) + (caddr (assoc (nth 2 list) + (TeX-symbol-list)))) + TeX-auto-symbol))) + ((string= type "fontdot") + (add-to-list 'LaTeX-pst-dotstyle-list (nth 1 list) t)) + ((string= type "style") + (add-to-list 'LaTeX-pst-style-list (nth 1 list) t)) + ((string= type "color") + (add-to-list 'LaTeX-pst-color-list (nth 1 list) t) + ;; FIXME: Why is an entry with "-" in front added? + (add-to-list 'LaTeX-pst-color-list + (concat "-" (nth 1 list)) t))))) + LaTeX-auto-pstricks)) + +(defun LaTeX-pst-prepare () + "Clear `LaTeX-auto-pstricks' before use." + (setq LaTeX-auto-pstricks nil)) + +;; FIXME: This does not seem to work unless one does a manual reparse. +;; Check e.g. with "\definecolor" and "fillcolor=". +(add-hook 'TeX-auto-prepare-hook 'LaTeX-pst-prepare) +(add-hook 'TeX-auto-cleanup-hook 'LaTeX-pst-cleanup) + +;;; Additional Functionality +(defun LaTeX-pst-parameters-add (&optional arg) + "With ARG as prefix-argument insert new parameter\(s\) behind +nearest backward LaTeX macro in brackets. Without ARG add +parameter\(s\) to the already existing ones at the end of the +comma separated list. Point has to be within the sexp to modify." + (interactive "P") + (let ((newpara (LaTeX-pst-parameters-pref-and-chosen nil t)) + (regexp "\\(") beg end check) + (if arg + (progn + (re-search-backward "\\\\\\([a-zA-Z]\\)") + (forward-word 1) + (insert-pair nil ?[ ?])) + (up-list 1) + (backward-char 1) + (save-excursion + (setq end (point)) + (up-list -1) + (while (re-search-forward "\\([a-zA-Z]+\\)=" end 'limit) + (setq regexp (concat regexp + (match-string-no-properties 1) "\\|"))) + (setq regexp (concat (substring regexp 0 -1) ")")) + (setq check (string-match regexp newpara)))) + (when newpara + (insert (if arg "" ",") newpara) + (when check + (message + "At least one Parameters appears twice. PLEASE CHECK!"))))) +;; FIXME: Only define a key for this once it is a general-purpose +;; facility, i.e. not just for pstricks but all types of macros. +;; (define-key LaTeX-mode-map "\C-c\C-x\C-a" 'LaTeX-pst-parameters-add) + +(defvar LaTeX-pst-value-regexp + "\\([-!.a-zA-Z0-9]*\\s\\?[-!.a-zA-Z0-9]+\\)" + "Expression matching a parameter value.") + +(defun LaTeX-pst-parameter-remove-value () + "Remove value of current parameter and return parameter name." + (re-search-backward + (concat "\\(\\s(\\|,\\)[a-zA-Z]+\\([a-zA-Z]\\|=\\|=" + LaTeX-pst-value-regexp "\\)")) + (re-search-forward "\\([a-zA-Z]+\\)=") + (let ((para (match-string-no-properties 1))) + (re-search-forward LaTeX-pst-value-regexp) + (delete-region (match-beginning 1) (match-end 1)) + para)) + +(defun LaTeX-pst-parameter-change-value () + "Replace parameter value with a new one." + (interactive) + (let* ((para (LaTeX-pst-parameter-remove-value)) + (symb + (when (and + (string-match + LaTeX-pst-parameters-completion-regexp para) + (boundp + (intern + (concat "LaTeX-pst-" (match-string 0 para) "-list")))) + (intern (concat "LaTeX-pst-" (match-string 0 para) + "-list"))))) + (insert (TeX-arg-compl-list (symbol-value symb) "New Value" + 'LaTeX-pst-parameters-value-history)))) +;; FIXME: Only define a key for this once it is a general-purpose +;; facility, i.e. not just for pstricks but all types of macros. (See +;; also `LaTeX-pst-parameters-add'. Note that a parameter change +;; should better be made available through a `C-u' prefix of the +;; binding for the function doing the parameter addition.) +;; (define-key LaTeX-mode-map "\C-c\C-x\C-v" 'LaTeX-pst-parameter-change-value) + (TeX-add-style-hook "pstricks" (lambda () (unless (member "pst-pdf" TeX-active-styles) - (TeX-PDF-mode-off)))) + (TeX-PDF-mode-off)) + (mapc 'TeX-auto-add-regexp LaTeX-auto-pstricks-regexp-list) + (LaTeX-add-environments + '("pspicture" LaTeX-pst-env-pspicture) + "overlaybox" "psclip") + (TeX-add-symbols + '("AltClipMode" 0) '("DontKillGlue" 0) '("KillGlue" 0) + '("NormalCoor" 0) '("SpecialCoor" 0) '("PSTricksLoaded" 0) + '("PSTricksOff" 0) '("altcolormode" 0) '("pslinecolor" 0) + '("pslinestyle" 0) '("pslinetype" 0) '("pslinewidth" 0) + '("pslabelsep" 0) '("radian" 0) '("psunit" 0) '("psrunit" 0) + '("psxunit" 0) '("psyunit" 0) + '("arrows" (TeX-arg-eval LaTeX-pst-arrows)) + '("clipbox" ["Border"] t) + '("closedshadow" [LaTeX-pst-parameters]) + '("openshadow" [LaTeX-pst-parameters]) + "closepath" "code" "coor" "curveto" "degrees" "dim" "endpsclip" + "file" "fill" "grestore" "gsave" "lineto" "movepath" "moveto" + "mrestore" "msave" "newpath" "rcoor" "rcurveto" "rlineto" "rotate" + "scale" "stroke" "swapaxes" "translate" + '("newcmykcolor" "Name" "Quadruple") + '("newrgbcolor" "Name" "Triple") '("newhsbcolor" "Name" "Triple") + '("newgray" "Name" "Value") + '("newpsobject" LaTeX-pst-macro-newpsobject LaTeX-pst-parameters) + '("newpsstyle" "New PSStyle Name" LaTeX-pst-parameters) + '("newpsfontdot" "New PSDot Name" ["Factors"] + "Fontname" "Character Number (Hex)") + '("parabola" [LaTeX-pst-parameters] LaTeX-pst-macro-parabola) + '("parabola*" [LaTeX-pst-parameters] LaTeX-pst-macro-parabola) + '("psarc" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psarc*" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psarcn" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("pswedge" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psbezier" [LaTeX-pst-parameters] LaTeX-pst-macro-psbezier) + '("psbezier*" [LaTeX-pst-parameters] LaTeX-pst-macro-psbezier) + '("pscbezier" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("pscircle" [LaTeX-pst-parameters] LaTeX-pst-macro-pscircle) + '("psccurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psccurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscustom" [LaTeX-pst-parameters]) + '("psdiamond" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Width" "Height")) + '("pstriangle" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Width" "Height")) + '("psdot" [LaTeX-pst-parameters] (LaTeX-pst-macro-psdots t)) + '("psdots" [LaTeX-pst-parameters] (LaTeX-pst-macro-psdots nil)) + '("psecurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psecurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psellipse" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Radius x" "Radius y")) + '("psellipse*" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Radius x" "Radius y")) + '("psframe" [LaTeX-pst-parameters] LaTeX-pst-macro-psframe) + '("psframe*" [LaTeX-pst-parameters] LaTeX-pst-macro-psframe) + '("psframebox" [LaTeX-pst-parameters] t) + '("pscirclebox" [LaTeX-pst-parameters] t) + '("psdblframebox" [LaTeX-pst-parameters] t) + '("psdiabox" [LaTeX-pst-parameters] t) + '("psovalbox" [LaTeX-pst-parameters] t) + '("psshadowbox" [LaTeX-pst-parameters] t) + '("pstribox" [LaTeX-pst-parameters] t) + '("psscalebox" "Scaling Factor(s)" t) + '("psscaleboxto" LaTeX-pst-point-in-parens t) + '("psgrid" [LaTeX-pst-parameters] LaTeX-pst-macro-psgrid 0) + '("psline" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psoverlay" t) + '("pspolygon" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("pspolygon*" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("psset" LaTeX-pst-parameters) + '("pssetlength" TeX-arg-macro "Length") + '("psaddtolength" TeX-arg-macro "Length") + '("degrees" ["Full Circle"]) + '("qdisk" LaTeX-pst-point-in-parens "Radius") + '("qline" LaTeX-pst-point-in-parens LaTeX-pst-point-in-parens) + "pslongbox" "psrotatedown" "psrotateleft" "psrotateright" + '("rput" LaTeX-pst-macro-rput t) + '("rput*" LaTeX-pst-macro-rput t) + '("cput" [LaTeX-pst-parameters] + (TeX-arg-eval LaTeX-pst-angle) LaTeX-pst-point-in-parens t) + '("uput" LaTeX-pst-macro-uput t) + '("multirput" (LaTeX-pst-macro-multirputps t) t) + '("multips" (LaTeX-pst-macro-multirputps nil) t)))) ;;; pstricks.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.elc deleted file mode 100644 index 14186c14e6f2..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/pstricks.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/report.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/report.el index ccbae22744eb..32329a8b20c2 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/report.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/report.el @@ -1,6 +1,6 @@ ;;; report.el - Special code for report style. -;; $Id: report.el,v 1.5 2008/02/25 18:02:11 davidswelt Exp $ +;; $Id: report.el,v 1.3 2005/03/17 10:02:06 angeli Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/report.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/report.elc deleted file mode 100644 index 31dd9b518ede..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/report.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/ruby.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/ruby.el new file mode 100644 index 000000000000..0a96e57ee9bf --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/ruby.el @@ -0,0 +1,49 @@ +;;; ruby.el --- AUCTeX style for the ruby package. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the ruby package. + +;;; Code: + +(defvar LaTeX-ruby-package-options + '("overlap" "nooverlap" "CJK" "latin") + "Package options for the ruby package.") + +(TeX-add-style-hook + "ruby" + (lambda () + (TeX-add-symbols + '("rubyoverlap" 0) + '("rubynooverlap" 0) + '("rubyCJK" 0) + '("rubylatin" 0) + '("rubysize" 0) + '("rubysep" 0) + '("ruby" t nil)))) + +;;; ruby.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.el index 5a0c9075ff85..0c09d9137317 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.el @@ -6,7 +6,7 @@ ;; Author: Mark Trettin ;; Created: 2002-09-26 -;; Version: $Id: scrartcl.el,v 1.5 2008/02/25 18:02:11 davidswelt Exp $ +;; Version: $Id: scrartcl.el,v 1.4 2005/03/17 10:02:06 angeli Exp $ ;; Keywords: tex ;;; Commentary: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.elc deleted file mode 100644 index e770691642f4..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrartcl.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbase.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbase.elc deleted file mode 100644 index b1e386cd494f..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbase.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbook.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbook.elc deleted file mode 100644 index 89574199db95..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrbook.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrlttr2.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrlttr2.elc deleted file mode 100644 index fbd783f93b1d..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrlttr2.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrpage2.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrpage2.elc deleted file mode 100644 index 40d983ae4d0e..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrpage2.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrreprt.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/scrreprt.elc deleted file mode 100644 index 5f396cbef5f2..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/scrreprt.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/shortvrb.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/shortvrb.el new file mode 100644 index 000000000000..2ef191a2c4c3 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/shortvrb.el @@ -0,0 +1,56 @@ +;;; shortvrb.el --- AUCTeX style for `shortvrb.sty' + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `shortvrb.sty'. + +;; XXX: We might want provide users with the possibility to activate +;; something like this for any file (incl. Plain TeX). That would +;; bring us one step closer to the goal of displaying texbook.tex +;; without font locking going haywire. + +;; FIXME: The code does not work for preview.dtx because in that file +;; the style list is empty. In its master file, preview.drv, it +;; works, however. However, even if the style file is loaded by hand, +;; it fails to fontify verbatim text in the documentation parts of the +;; file. + +;;; Code: + +(TeX-add-style-hook + "shortvrb" + (lambda () + ;; Fontification + (when (and LaTeX-shortvrb-chars + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (let (syntax-alist) + (dolist (char LaTeX-shortvrb-chars) + (add-to-list 'syntax-alist (cons char "|"))) + (font-latex-add-to-syntax-alist syntax-alist))))) + +;;; shortvrb.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/slides.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/slides.elc deleted file mode 100644 index bdcf4c2b00de..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/slides.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/slovak.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/slovak.elc deleted file mode 100644 index 66766eedd031..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/slovak.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/subfigure.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/subfigure.elc deleted file mode 100644 index a0c2b1a6c664..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/subfigure.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/swedish.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/swedish.elc deleted file mode 100644 index 3f2dc6da7890..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/swedish.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/tabularx.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/tabularx.el new file mode 100644 index 000000000000..0fc823497e37 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/tabularx.el @@ -0,0 +1,52 @@ +;;; tabularx.el --- AUCTeX style for the tabularx package. + +;; Copyright (C) 2009 Free Software Foundation, Inc. + +;; Author: Ralf Angeli +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-02-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the tabularx package. + +;;; Code: + +(defvar LaTeX-tabularx-package-options + '("infoshow" "debugshow") + "Package options for the tabularx package.") + +(TeX-add-style-hook + "tabularx" + (lambda () + ;; New symbols + (TeX-add-symbols + "tracingtabularx" + '("tabularxcolumn" 0)) + ;; New environments + (LaTeX-add-environments + ;; XXX: The tabularx environment takes the same arguments as the + ;; tabular* environment. However, the supported tokens in the + ;; format can differ, so at some point in time we might want to + ;; separate tabular* and tabularx. + '("tabularx" LaTeX-env-tabular*)))) + +;;; tabularx.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/units.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/units.elc deleted file mode 100644 index a0911368d8e7..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/units.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/url.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/url.elc deleted file mode 100644 index 3052665080ca..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/url.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/varioref.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/varioref.elc deleted file mode 100644 index ba9551e604f4..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/varioref.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/verbatim.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/verbatim.elc deleted file mode 100644 index 457a01811359..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/verbatim.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.el b/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.el index 84884be53a08..af44a993bc6a 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.el @@ -1,6 +1,6 @@ ;;; virtex.el - Common code for all TeX formats. -;; $Id: virtex.el,v 1.5 2008/02/25 18:02:15 davidswelt Exp $ +;; $Id: virtex.el,v 1.1 1994/01/23 08:14:44 amanda Exp $ ;;; Code: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.elc deleted file mode 100644 index 95113f1b7bb6..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/style/virtex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.el index 2531640e906b..cf7bc1dd0c8c 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.el @@ -83,8 +83,8 @@ If there is no help, the empty string is returned." :group 'AUCTeX) (defcustom TeX-bar-TeX-buttons - '(open-file save-buffer cut copy paste undo - [separator nil] tex next-error view bibtex) + '(new-file open-file dired kill-buffer save-buffer cut copy paste undo + [separator nil] tex next-error view bibtex) "List of buttons available in `tex-mode'. It should be a list in the same format of the BUTTONS parameter in function `toolbarx-install-toolbar', often a symbol that @@ -96,14 +96,20 @@ Buttons are defined in alists (labels associated to properties that define a button). For a list of variables that hold such alists, see variable `TeX-bar-TeX-all-button-alists'." :type '(list (set :inline t + (const new-file) (const open-file) + (const dired) + (const kill-buffer) (const save-buffer) + (const write-file) + (const undo) (const cut) (const copy) (const paste) - (const undo) + (const search-forward) + (const print-buffer) (const [separator nil]) - (const latex) + (const tex) (const next-error) (const view) (const file) @@ -219,7 +225,7 @@ format of the argument MEANING-ALIST in the mentioned function." append-list))) (defcustom TeX-bar-LaTeX-buttons - '(open-file save-buffer cut copy paste undo + '(new-file open-file dired kill-buffer save-buffer cut copy paste undo [separator nil] latex next-error view bibtex) "List of buttons available in `latex-mode'. It should be a list in the same format of the BUTTONS parameter @@ -232,12 +238,18 @@ Buttons are defined in alists (labels associated to properties that define a button). For a list of variables that hold such alists, see variable `TeX-bar-LaTeX-all-button-alists'." :type '(list (set :inline t + (const new-file) (const open-file) + (const dired) + (const kill-buffer) (const save-buffer) + (const write-file) + (const undo) (const cut) (const copy) (const paste) - (const undo) + (const search-forward) + (const print-buffer) (const [separator nil]) (const latex) (const next-error) @@ -293,44 +305,37 @@ the argument BUTTON-ALIST in function `toolbarx-install-toolbar'." (defcustom TeX-bar-LaTeX-button-alist '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex")) - :title "Typeset" :command (progn (TeX-save-document (TeX-master-file)) (TeX-command "LaTeX" 'TeX-master-file -1)) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "LaTeX"))) (pdflatex :image "pdftex" - :title "Typeset" :command (progn (TeX-save-document (TeX-master-file)) (TeX-command "PDFLaTeX" 'TeX-master-file -1)) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "PDFLaTeX"))) (next-error :image "error" - :title "Next Error" :command TeX-next-error :enable (plist-get TeX-error-report-switches (intern (TeX-master-file))) :visible (plist-get TeX-error-report-switches (intern (TeX-master-file)))) (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi")) - :title "View" :command (TeX-command "View" 'TeX-master-file -1) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "View"))) (file :image "dvips" - :title "DVI>PS" :command (TeX-command "File" 'TeX-master-file -1) :visible (not TeX-PDF-mode) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "File"))) (bibtex :image "bibtex" - :title "BibTeX" :command (TeX-command "BibTeX" 'TeX-master-file -1) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "BibTeX"))) (clean :image "delete" - :title "Clean" :command (TeX-command "Clean" 'TeX-master-file -1) :help (lambda (&rest ignored) (TeX-bar-help-from-command-list "Clean"))) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.elc deleted file mode 100644 index 2760164b0e2a..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-bar.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.el index cfd24e5e71cb..c1b7665b0900 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.el @@ -1,7 +1,7 @@ ;;; tex-buf.el --- External commands for AUCTeX. -;; Copyright (C) 1991, 1993, 1996, 2001, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1993, 1996, 2001, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009 Free Software Foundation, Inc. ;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex, wp @@ -27,11 +27,6 @@ ;; This file provides support for external commands. -;; This file has been patched in Aquamacs to -;; - not use `pop-to-buffer' when a local set-buffer should be used -;; - and convert file to buffer line numbers when in longlines-mode -;; David Reitter 01/2008 - ;;; Code: (require 'tex) @@ -563,6 +558,7 @@ Return the new process." (setq-default TeX-command-buffer command-buff) (get-buffer-create buffer) (set-buffer buffer) + (buffer-disable-undo) (erase-buffer) (set (make-local-variable 'line-number-display-limit) 0) (setq TeX-output-extension nil) @@ -689,7 +685,8 @@ run of `TeX-run-TeX', use (redraw-display)))) (defun TeX-run-discard (name command file) - "Start process with second argument, discarding its output." + "Start COMMAND as process, discarding its output. +NAME and FILE are ignored." (let ((default-directory (TeX-master-directory))) (call-process TeX-shell nil 0 nil @@ -779,6 +776,14 @@ Parameters NAME and FILE are ignored." (let ((fun (car (read-from-string command)))) (if (functionp fun) (funcall fun) (eval fun)))) +(defun TeX-run-discard-or-function (name command file) + "Start COMMAND as process or execute it as a Lisp function. +If run as a process, the output is discarded. COMMAND is +expected to be a string. NAME and FILE are ignored." + (if (functionp (car (read-from-string command))) + (TeX-run-function name command file) + (TeX-run-discard name command file))) + (defun TeX-run-ispell-on-document (command ignored name) "Run ispell on all open files belonging to the current document. This function is *obsolete* and only here for compatibility @@ -814,8 +819,10 @@ reasons. Use `TeX-run-function' instead." "Process TeX command output buffer after the process dies." ;; Set `TeX-transient-master' here because `preview-parse-messages' ;; may open files and thereby trigger master file questions which we - ;; don't want and need because we already know the master. - (let* ((TeX-transient-master (TeX-active-master)) + ;; don't want and need because we already know the master. Use + ;; `TeX-master-file' instead of `TeX-active-master' to determine the + ;; master because the region file should never be the master. + (let* ((TeX-transient-master (TeX-master-file)) (buffer (process-buffer process)) (name (process-name process))) (cond ((null (buffer-name buffer)) ; buffer killed @@ -874,11 +881,11 @@ NAME is the name of the process.") (defun TeX-current-pages () "Return string indicating the number of pages formatted." (cond ((null TeX-current-page) - "some pages.") + "some pages") ((string-match "[^0-9]1[^0-9]" TeX-current-page) - (concat TeX-current-page " page.")) + (concat TeX-current-page " page")) (t - (concat TeX-current-page " pages.")))) + (concat TeX-current-page " pages")))) (defun TeX-TeX-sentinel-check (process name) "Cleanup TeX output buffer after running TeX. @@ -932,38 +939,40 @@ Warnings can be indicated by LaTeX or packages." "Cleanup TeX output buffer after running LaTeX." (cond ((TeX-TeX-sentinel-check process name)) ((and (save-excursion - (or - (re-search-forward "^LaTeX Warning: Citation" nil t) - (re-search-forward "^Package natbib Warning: Citation" nil t))) + (re-search-forward + "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t)) (with-current-buffer TeX-command-buffer (and (LaTeX-bibliography-list) (TeX-check-files (TeX-master-file "bbl") (TeX-style-list) (append TeX-file-extensions BibTeX-file-extensions))))) - (message (concat "You should run BibTeX to get citations right, " - (TeX-current-pages))) + (message "%s%s" "You should run BibTeX to get citations right, " + (TeX-current-pages)) (setq TeX-command-next (with-current-buffer TeX-command-buffer TeX-command-BibTeX))) - ((or - (re-search-forward "^LaTeX Warning: Label(s)" nil t) - (re-search-forward "^Package natbib Warning: Citation(s)" nil t)) - (message (concat "You should run LaTeX again " - "to get references right, " - (TeX-current-pages))) + ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\ +Package natbib Warning: Citation(s)\\)" nil t) + (message "%s%s" "You should run LaTeX again to get references right, " + (TeX-current-pages)) (setq TeX-command-next TeX-command-default)) ((re-search-forward "^LaTeX Warning: Reference" nil t) - (message (concat name ": there were unresolved references, " - (TeX-current-pages))) + (message "%s%s%s" name ": there were unresolved references, " + (TeX-current-pages)) (setq TeX-command-next TeX-command-Show)) - ((or - (re-search-forward "^LaTeX Warning: Citation" nil t) - (re-search-forward "^Package natbib Warning:.*undefined citations" nil t)) - (message (concat name ": there were unresolved citations, " - (TeX-current-pages))) + ((re-search-forward "^\\(?:LaTeX Warning: Citation\\|\ +Package natbib Warning:.*undefined citations\\)" nil t) + (message "%s%s%s" name ": there were unresolved citations, " + (TeX-current-pages)) (setq TeX-command-next TeX-command-Show)) + ((re-search-forward "Package longtable Warning: Table widths have \ +changed\\. Rerun LaTeX\\." nil t) + (message + "%s" "You should run LaTeX again to get table formatting right") + (setq TeX-command-next TeX-command-default)) ((re-search-forward - "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \\(Version\\|ver\\.\\|<[0-9/]*>\\)" nil t) + "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \ +\\(Version\\|ver\\.\\|<[0-9/]*>\\)" nil t) (let* ((warnings (and TeX-debug-warnings (TeX-LaTeX-sentinel-has-warnings))) (bad-boxes (and TeX-debug-bad-boxes @@ -974,12 +983,11 @@ Warnings can be indicated by LaTeX or packages." (when (and warnings bad-boxes) " and ") (when bad-boxes "bad boxes") ")")))) - (message (concat name ": successfully formatted " - (TeX-current-pages) add-info))) + (message "%s" (concat name ": successfully formatted " + (TeX-current-pages) add-info))) (setq TeX-command-next TeX-command-Show)) (t - (message (concat name ": problems after " - (TeX-current-pages))) + (message "%s%s%s" name ": problems after " (TeX-current-pages)) (setq TeX-command-next TeX-command-default)))) ;; should go into latex.el? --pg @@ -1107,10 +1115,10 @@ command." (while (> (point) pt) (end-of-line 0) (when (and (= (current-column) 79) - ;; Heuristic: Don't delete the linebreak if there - ;; is an empty line after the current one or - ;; point is located after a period. - (not (eq (char-after (1+ (point))) ?\n)) + ;; Heuristic: Don't delete the linebreak if the + ;; next line is empty or starts with an opening + ;; parenthesis or if point is located after a period. + (not (memq (char-after (1+ (point))) '(?\n ?\())) (not (eq (char-before) ?.))) (delete-char 1))) (goto-char (marker-position (process-mark process))) @@ -1406,23 +1414,32 @@ You might want to examine and modify the free variables `file', (defun TeX-parse-error (old) "Goto next error. Pop to OLD buffer if no more errors are found." + (let ((regexp + (concat + ;; TeX error + "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|" + ;; New file + "(\\(\"[^\"]*?\"\\|/*\ +\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\ +\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\ +\\(?:[\\/]+\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\ +\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\)\ +)*\\(?: \\|\r?$\\)\\|" + ;; End of file + "\\()\\))*\\|" + ;; Hook to change line numbers + " !\\(?:offset(\\([---0-9]+\\))\\|" + ;; Hook to change file name + "name(\\([^)]+\\))\\)\\|" + ;; LaTeX bad box + "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\ + \\\\.*?[0-9]+--[0-9]+\\)\\|" + ;; LaTeX warning + "^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z]+ \\)Warning:.*"))) (while (cond - ((null (re-search-forward - "\ -^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|\ -\(\\(/*\ -\\(?:\\.+[^()\r\n{} /]*\\|[^()\r\n{} ./]+\ -\\(?: [^()\r\n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\ -\\(?:/+\\(?:\\.+[^()\r\n{} /]*\\|[^()\r\n{} ./]+\ -\\(?: [^()\r\n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\)\ -)*\\(?: \\|\r?$\\)\\|\ -\\()\\))*\\|\ - !\\(?:offset(\\([---0-9]+\\))\\|\ -name(\\([^)]+\\))\\)\\|\ -^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\ - \\\\.*?[0-9]+--[0-9]+\\)\\|\ -^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z]+ \\)Warning:.*" nil t)) + ((null + (re-search-forward regexp nil t)) ;; No more errors. (message "No more errors.") (beep) @@ -1440,7 +1457,7 @@ name(\\([^)]+\\))\\)\\|\ t (TeX-error) nil)) - ;; LaTeX badbox + ;; LaTeX bad box ((match-beginning 7) (if TeX-debug-bad-boxes (progn @@ -1460,9 +1477,16 @@ name(\\([^)]+\\))\\)\\|\ ;; New file -- Push on stack ((match-beginning 3) - (push (TeX-match-buffer 3) TeX-error-file) - (push nil TeX-error-offset) - (goto-char (match-end 3)) + (let ((file (TeX-match-buffer 3)) + (end (match-end 3))) + ;; Strip quotation marks and remove newlines if necessary + (when (or (eq (string-to-char file) ?\") + (string-match "\n" file)) + (setq file + (mapconcat 'identity (split-string file "[\"\n]+") ""))) + (push file TeX-error-file) + (push nil TeX-error-offset) + (goto-char end)) t) ;; End of file -- Pop from stack @@ -1476,14 +1500,14 @@ name(\\([^)]+\\))\\)\\|\ ;; Hook to change line numbers ((match-beginning 5) (setq TeX-error-offset - (list (string-to-int (TeX-match-buffer 5)))) + (list (string-to-number (TeX-match-buffer 5)))) t) ;; Hook to change file name ((match-beginning 6) (setq TeX-error-file (list (TeX-match-buffer 6))) - t)))) + t))))) (defun TeX-error () "Display an error." @@ -1495,11 +1519,22 @@ name(\\([^)]+\\))\\)\\|\ ;; And the context for the help window. (context-start (point)) + context-available ;; And the line number to position the cursor. - (line (if (re-search-forward "l\\.\\([0-9]+\\)" nil t) - (string-to-int (TeX-match-buffer 1)) - 1)) + (line (cond + ;; regular style + ((re-search-forward "l\\.\\([0-9]+\\)" nil t) + (setq context-available t) + (string-to-number (TeX-match-buffer 1))) + ;; file:line:error style + ((save-excursion + (re-search-backward ":\\([0-9]+\\): " + (line-beginning-position) t)) + (string-to-number (TeX-match-buffer 1))) + ;; nothing found + (t 1))) + ;; And a string of the context to search for. (string (progn (beginning-of-line) @@ -1507,10 +1542,14 @@ name(\\([^)]+\\))\\)\\|\ (TeX-match-buffer 1))) ;; And we have now found to the end of the context. - (context (buffer-substring context-start (progn - (forward-line 1) - (end-of-line) - (point)))) + (context (if context-available + (buffer-substring context-start (progn (forward-line 1) + (end-of-line) + (point))) + ;; There is no real context available, so we + ;; simply show the line with the error message. + (buffer-substring (1- (line-beginning-position)) + context-start))) ;; We may use these in another buffer. (offset (or (car TeX-error-offset) 0)) (file (car TeX-error-file))) @@ -1533,10 +1572,7 @@ name(\\([^)]+\\))\\)\\|\ ;; error to be displayed to the value it has in the current buffer. (with-current-buffer error-file-buffer (set (make-local-variable 'TeX-command-buffer) command-buffer)) - (if (fboundp 'buffer-line-number) - ;; To Do: move buffer/file-line-number out of auctex-config - (goto-line (+ offset (buffer-line-number line))) - (goto-line (+ offset line))) + (goto-line (+ offset line)) (if (not (string= string " ")) (search-forward string nil t)) @@ -1556,7 +1592,7 @@ name(\\([^)]+\\))\\)\\|\ (let* ((error (concat "** " string)) ;; bad-box is nil if this is a "LaTeX Warning" - (bad-box (string-match "\\\\[vb]ox.*[0-9]*--[0-9]*" string)) + (bad-box (string-match "\\\\[vh]box.*[0-9]*--[0-9]*" string)) ;; line-string: match 1 is beginning line, match 2 is end line (line-string (if bad-box " \\([0-9]*\\)--\\([0-9]*\\)" "on input line \\([0-9]*\\)\\.")) @@ -1566,8 +1602,8 @@ name(\\([^)]+\\))\\)\\|\ ;; Get error-line (warning) (line (when (re-search-backward line-string nil t) - (string-to-int (TeX-match-buffer 1)))) - (line-end (if bad-box (string-to-int (TeX-match-buffer 2)) + (string-to-number (TeX-match-buffer 1)))) + (line-end (if bad-box (string-to-number (TeX-match-buffer 2)) line)) ;; Find the context @@ -1613,10 +1649,7 @@ name(\\([^)]+\\))\\)\\|\ (set (make-local-variable 'TeX-command-buffer) command-buffer)) ;; Find line and string (when line - (if (fboundp 'buffer-line-number) - ;; To Do: move buffer/file-line-number out of auctex-config - (goto-line (+ offset (buffer-line-number line))) - (goto-line (+ offset line))) + (goto-line (+ offset line)) (beginning-of-line 0) (let ((start (point))) (goto-line (+ offset line-end)) @@ -1658,32 +1691,30 @@ name(\\([^)]+\\))\\)\\|\ "\n\n--- TeX said ---" output "\n--- HELP ---\n" - (save-excursion - (if (and (string= (cdr (nth TeX-error-pointer - TeX-error-description-list)) - "No help available") - (let* ((log-buffer (find-buffer-visiting log-file))) - (if log-buffer - (progn - (set-buffer log-buffer) - (revert-buffer t t)) - (setq log-buffer - (find-file-noselect log-file)) - (set-buffer log-buffer)) - (auto-save-mode nil) - (setq buffer-read-only t) - (goto-line (point-min)) - (search-forward error nil t 1))) - (progn - (re-search-forward "^l\\.") - (re-search-forward "^ [^\n]+$") - (forward-char 1) - (let ((start (point))) + (let ((help (cdr (nth TeX-error-pointer + TeX-error-description-list)))) + (save-excursion + (if (and (string= help "No help available") + (let* ((log-buffer (find-buffer-visiting log-file))) + (if log-buffer + (progn + (set-buffer log-buffer) + (revert-buffer t t)) + (setq log-buffer + (find-file-noselect log-file)) + (set-buffer log-buffer)) + (auto-save-mode nil) + (setq buffer-read-only t) + (goto-line (point-min)) + (search-forward error nil t 1)) + (re-search-forward "^l\\." nil t) + (re-search-forward "^ [^\n]+$" nil t)) + (let ((start (1+ (point)))) + (forward-char 1) (re-search-forward "^$") (concat "From the .log file...\n\n" - (buffer-substring start (point))))) - (cdr (nth TeX-error-pointer - TeX-error-description-list))))) + (buffer-substring start (point)))) + help)))) (goto-char (point-min)) (TeX-pop-to-buffer old-buffer nil t))) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.elc deleted file mode 100644 index 7a93a42e4782..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-buf.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.el index 4a95a071e681..0b8de3a002b9 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.el @@ -1,6 +1,6 @@ ;;; tex-fold.el --- Fold TeX macros. -;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Ralf Angeli ;; Maintainer: auctex-devel@gnu.org @@ -75,7 +75,7 @@ macros, 'math for math macros and 'comment for comments." ("[l]" ("label")) ("[r]" ("ref" "pageref" "eqref")) ("[i]" ("index" "glossary")) - ("*" ("item")) + ("[1]:||*" ("item")) ("..." ("dots")) ("(C)" ("copyright")) ("(R)" ("textregistered")) @@ -86,9 +86,37 @@ macros, 'math for math macros and 'comment for comments." "paragraph*" "subparagraph*" "emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt" "textbf" "textsc" "textup"))) - "List of display strings and macros to fold." + "List of replacement specifiers and macros to fold. + +The first element of each item can be a string, an integer or a +function symbol. The second element is a list of macros two fold +without the leading backslash. + +If the first element is a string, it will be used as a display +replacement for the whole macro. Numbers in braces, brackets, +parens or angle brackets will be replaced by the respective macro +argument. For example \"{1}\" will be replaced by the first +mandatory argument of the macro. One can also define +alternatives within the specifier which are used if an argument +is not found. Alternatives are separated by \"||\". They are +most useful with optional arguments. As an example, the default +specifier for \\item is \"[1]:||*\" which means that if there is +an optional argument, its value is shown followed by a colon. If +there is no optional argument, only an asterisk is used as the +display string. + +If the first element is an integer, the macro will be replaced by +the respective macro argument. + +If the first element is a function symbol, the function will be +called with all mandatory arguments of the macro and the result +of the function call will be used as a replacement for the macro. + +Setting this variable does not take effect immediately. Use +Customize or reset the mode." :type '(repeat (group (choice (string :tag "Display String") - (integer :tag "Number of argument" :value 1)) + (integer :tag "Number of argument" :value 1) + (function :tag "Function to execute")) (repeat :tag "Macros" (string)))) :group 'TeX-fold) @@ -218,19 +246,26 @@ Set it to zero in order to disable help echos." (defvar TeX-fold-open-spots nil) (make-variable-buffer-local 'TeX-fold-open-spots) +(defcustom TeX-fold-command-prefix "\C-c\C-o" + "Prefix key to use for commands in TeX Fold mode. +The value of this variable is checked as part of loading TeX Fold mode. +After that, changing the prefix key requires manipulating keymaps." + :type 'string + :group 'TeX-fold) + (defvar TeX-fold-keymap (let ((map (make-sparse-keymap))) - (define-key map "\C-c\C-o\C-o" 'TeX-fold-dwim) - (define-key map "\C-c\C-o\C-b" 'TeX-fold-buffer) - (define-key map "\C-c\C-o\C-r" 'TeX-fold-region) - (define-key map "\C-c\C-o\C-p" 'TeX-fold-paragraph) - (define-key map "\C-c\C-o\C-m" 'TeX-fold-macro) - (define-key map "\C-c\C-o\C-e" 'TeX-fold-env) - (define-key map "\C-c\C-o\C-c" 'TeX-fold-comment) - (define-key map "\C-c\C-ob" 'TeX-fold-clearout-buffer) - (define-key map "\C-c\C-or" 'TeX-fold-clearout-region) - (define-key map "\C-c\C-op" 'TeX-fold-clearout-paragraph) - (define-key map "\C-c\C-oi" 'TeX-fold-clearout-item) + (define-key map "\C-o" 'TeX-fold-dwim) + (define-key map "\C-b" 'TeX-fold-buffer) + (define-key map "\C-r" 'TeX-fold-region) + (define-key map "\C-p" 'TeX-fold-paragraph) + (define-key map "\C-m" 'TeX-fold-macro) + (define-key map "\C-e" 'TeX-fold-env) + (define-key map "\C-c" 'TeX-fold-comment) + (define-key map "b" 'TeX-fold-clearout-buffer) + (define-key map "r" 'TeX-fold-clearout-region) + (define-key map "p" 'TeX-fold-clearout-paragraph) + (define-key map "i" 'TeX-fold-clearout-item) map)) @@ -438,7 +473,8 @@ Return non-nil if an item was found and folded, nil otherwise." (match-string-no-properties 1) (match-string 1)))) (fold-list (cond ((eq type 'env) TeX-fold-env-spec-list-internal) - ((eq type 'math) TeX-fold-math-spec-list-internal) + ((eq type 'math) + TeX-fold-math-spec-list-internal) (t TeX-fold-macro-spec-list-internal))) fold-item (display-string-spec @@ -471,14 +507,16 @@ Return non-nil if a comment was found and folded, nil otherwise." (save-excursion (while (progn (beginning-of-line 0) - (TeX-in-line-comment))) + (and (TeX-in-line-comment) + (not (bobp))))) (goto-char (TeX-search-forward-comment-start (line-end-position 2))) (looking-at TeX-comment-start-regexp) (setq beg (match-end 0)) (while (TeX-comment-forward)) (end-of-line 0) - (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment - TeX-fold-ellipsis)))))) + (when (> (point) beg) + (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment + TeX-fold-ellipsis))))))) ;;; Utilities @@ -546,10 +584,14 @@ string DISPLAY-STRING." ov-end)) (current-fill-column)))) -(defun TeX-fold-macro-nth-arg (n macro-start &optional macro-end) +(defun TeX-fold-macro-nth-arg (n macro-start &optional macro-end delims) "Return a property list of the argument number N of a macro. The start of the macro to examine is given by MACRO-START, its -end optionally by MACRO-END. +end optionally by MACRO-END. With DELIMS the type of delimiters +can be specified as a cons cell containing the opening char as +the car and the closing char as the cdr. The chars have to have +opening and closing syntax as defined in +`TeX-search-syntax-table'. The first item in the returned list is the string specified in the argument, the second item may be a face if the argument @@ -558,20 +600,31 @@ as well, so the second item is always nil. In XEmacs the string does not enclose any faces, so these are given in the second item of the resulting list." (save-excursion - (let ((macro-end (or macro-end - (save-excursion (goto-char macro-start) - (TeX-find-macro-end)))) - content-start content-end) + (let* ((macro-end (or macro-end + (save-excursion (goto-char macro-start) + (TeX-find-macro-end)))) + (open-char (if delims (car delims) ?{)) + (open-string (char-to-string open-char)) + (close-char (if delims (cdr delims) ?})) + (close-string (char-to-string close-char)) + content-start content-end) (goto-char macro-start) (if (condition-case nil (progn (while (> n 0) - (skip-chars-forward "^{" macro-end) - (when (not (looking-at "{")) (error nil)) + (skip-chars-forward (concat "^" open-string) macro-end) + (when (= (point) macro-end) + (error nil)) (setq content-start (progn - (skip-chars-forward "{ \t") + (skip-chars-forward + (concat open-string " \t")) (point))) - (goto-char (TeX-find-closing-brace)) + (goto-char + (if delims + (with-syntax-table + (TeX-search-syntax-table open-char close-char) + (scan-lists (point) 1 1)) + (TeX-find-closing-brace))) (setq content-end (save-excursion (backward-char) (skip-chars-backward " \t") @@ -705,16 +758,62 @@ Return non-nil if a removal happened, nil otherwise." ;;; Toggling +(defun TeX-fold-expand-spec (spec ov-start ov-end) + "Expand instances of {}, [], <>, and (). +Replace them with the respective macro argument." + (let ((spec-list (split-string spec "||")) + (delims '((?{ . ?}) (?[ . ?]) (?< . ?>) (?\( . ?\)))) + match-end success) + (catch 'success + ;; Iterate over alternatives. + (dolist (elt spec-list) + (setq spec elt) + ;; Find and expand every placeholder. + (while (and (string-match "\\([[{<]\\)\\([1-9]\\)\\([]}>]\\)" elt + match-end) + ;; Does the closing delim fit to the opening one? + (string-equal + (match-string 3 elt) + (char-to-string + (cdr (assq (string-to-char (match-string 1 elt)) + delims))))) + (setq match-end (match-beginning 0)) + (let ((arg (car (save-match-data + ;; Get the argument. + (TeX-fold-macro-nth-arg + (string-to-number (match-string 2 elt)) + ov-start ov-end + (assoc (string-to-char (match-string 1 elt)) + delims)))))) + (when arg (setq success t)) + ;; Replace the placeholder in the string. + (setq elt (replace-match (or arg TeX-fold-ellipsis) nil t elt) + spec elt))) + (when success (throw 'success nil)))) + spec)) + (defun TeX-fold-hide-item (ov) "Hide a single macro or environment. That means, put respective properties onto overlay OV." (let* ((ov-start (overlay-start ov)) (ov-end (overlay-end ov)) (spec (overlay-get ov 'TeX-fold-display-string-spec)) - (computed (if (stringp spec) - spec - (or (TeX-fold-macro-nth-arg spec ov-start ov-end) - "[Error: No content found]"))) + (computed (cond + ((stringp spec) + (TeX-fold-expand-spec spec ov-start ov-end)) + ((functionp spec) + (let (arg arg-list + (n 1)) + (while (setq arg (TeX-fold-macro-nth-arg + n ov-start ov-end)) + (add-to-list 'arg-list (car arg) t) + (setq n (1+ n))) + (or (condition-case nil + (apply spec arg-list) + (error nil)) + "[Error: No content or function found]"))) + (t (or (TeX-fold-macro-nth-arg spec ov-start ov-end) + "[Error: No content found]")))) (display-string (if (listp computed) (car computed) computed)) (face (when (listp computed) (cadr computed)))) ;; Cater for zero-length display strings. @@ -842,19 +941,20 @@ the other elements. The ordering among elements is maintained." Called interactively, with no prefix argument, toggle the mode. With universal prefix ARG (or if ARG is nil) turn mode on. With zero or negative ARG turn mode off." - nil nil TeX-fold-keymap + nil nil (list (cons TeX-fold-command-prefix TeX-fold-keymap)) (if TeX-fold-mode (progn (set (make-local-variable 'search-invisible) t) (add-hook 'post-command-hook 'TeX-fold-post-command nil t) (add-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point nil t) - (add-hook 'TeX-after-insert-macro-hook (lambda () - (when (and TeX-fold-mode TeX-fold-auto) - (save-excursion - (backward-char) - (or (TeX-fold-item 'macro) - (TeX-fold-item 'math) - (TeX-fold-item 'env)))))) + (add-hook 'TeX-after-insert-macro-hook + (lambda () + (when (and TeX-fold-mode TeX-fold-auto) + (save-excursion + (backward-char) + (or (TeX-fold-item 'macro) + (TeX-fold-item 'math) + (TeX-fold-item 'env)))))) ;; Update the `TeX-fold-*-spec-list-internal' variables. (dolist (elt '("macro" "env" "math")) (set (intern (format "TeX-fold-%s-spec-list-internal" elt)) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.elc deleted file mode 100644 index 4aee83e61416..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fold.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-font.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-font.elc deleted file mode 100644 index 9c22667ec435..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-font.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fptex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-fptex.elc deleted file mode 100644 index 1c5d186f62bf..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-fptex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.el index 48a10bc9ef8d..6f7b8497e2ab 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.el @@ -56,7 +56,7 @@ ;; Overwrite version from `texinfo.el'. (concat "^@\\(" (mapconcat 'car Texinfo-environment-list "\\|") - "\\|end\\)") + "\\|end\\)\\>") "Regexp for environment-like Texinfo list commands. Subexpression 1 is what goes into the corresponding `@end' statement.") @@ -472,6 +472,7 @@ value of `Texinfo-mode-hook'." '("kbd" "Keyboard characters") '("key" "Key name") '("kindex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("lowersections" 0) '("majorheading" (TeX-arg-literal " ") (TeX-arg-free "Title")) '("menu") '("minus") @@ -491,6 +492,7 @@ value of `Texinfo-mode-hook'." '("printindex" (TeX-arg-literal " ") (TeX-arg-free "Index name")) '("pxref" "Node name") '("r" "Text") + '("raisesections" 0) '("ref" "Node name") '("refill") '("result") diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.elc deleted file mode 100644 index 059cc06e12aa..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-info.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.el index 93140dfb8675..ece40020eb27 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.el @@ -99,13 +99,17 @@ For detail, see `TeX-command-list', which this list is appended to." '(("-" "" ignore nil t)) ;; separator for command menu TeX-command-list)) -(mapcar (lambda (dir) (add-to-list 'TeX-macro-global dir t)) - (TeX-macro-global-internal "platex" '("/ptex/" "/jbibtex/bst/") - '("/usr/share/texmf/ptex/" "/usr/share/texmf/jbibtex/bst/"))) - -(mapcar (lambda (dir) (add-to-list 'TeX-macro-global dir t)) - (TeX-macro-global-internal "jlatex" '("/jtex/" "/jbibtex/bst/") - '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/"))) +(mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (or (TeX-tree-expand + '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "platex" '("/ptex/" "/jbibtex/bst/")) + '("/usr/share/texmf/ptex/" "/usr/share/texmf/jbibtex/bst/"))) + +(mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (or (TeX-tree-expand + '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "jlatex" '("/jtex/" "/jbibtex/bst/")) + '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/"))) ;; Menus diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.elc deleted file mode 100644 index da538f51ff83..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-jp.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-mik.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-mik.elc deleted file mode 100644 index 38e6760b8489..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-mik.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.el index beffc7f61ff0..781aa1134271 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.el @@ -355,6 +355,13 @@ Inserting the subdirectory in the filename (as (TeX-master-directory)))) (function :tag "other"))) +;; style/shortvrb.el + +(defcustom LaTeX-shortvrb-chars '(?|) + "List of characters toggling verbatim mode." + :group 'LaTeX-style + :type '(repeat character)) (provide 'tex-style) + ;;; tex-style.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.elc deleted file mode 100644 index 83da228ad045..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex-style.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex-wizard.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex-wizard.el new file mode 100644 index 000000000000..f5badae745e7 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex-wizard.el @@ -0,0 +1,111 @@ +;;; tex-wizard.el --- Check the TeX configuration + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: David Kastrup +;; Keywords: tex, wp, convenience + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This checks through your TeX configuration. Call M-x TeX-wizard RET + +;;; Code: + +(defun TeX-wizard nil + (interactive) + (switch-to-buffer "*TeX wizard*") + (let ((wizwin (selected-window)) + (wizbuf (current-buffer))) + (set-visited-file-name nil) + (erase-buffer) + (if (featurep 'tex-site) + (insert-before-markers "AUCTeX is enabled. Good.\n") + (insert-before-markers "\ +It appears that AUCTeX is not enabled. AUCTeX is the main +major mode for editing TeX/LaTeX files.\n") + (condition-case nil + (info-other-window "(AUCTeX)") + (error (select-window wizwin) + (switch-to-buffer wizbuf) + (insert-before-markers "(I am unable to find AUCTeX's info file.)\n"))) + (if (prog1 (y-or-n-p "Should I try enabling AUCTeX now?") + (select-window wizwin) + (switch-to-buffer wizbuf)) + (condition-case nil + (require 'tex-site) + (error (insert-before-markers "AUCTeX appears not to be installed.\n"))) + (insert-before-markers "AUCTeX installation imprudently skipped.\n")) + (when (featurep 'tex-site) + (when (prog1 (yes-or-no-p (format "Also enable AUCTeX in `%s'" user-init-file)) + (select-window wizwin) + (switch-to-buffer wizbuf)) + (write-region "\ +;;; Enable AUCTeX +\(require 'tex-site)\n" nil user-init-file t)))) + (if (memq 'turn-on-reftex + (if (featurep 'tex-site) + (and (boundp 'LaTeX-mode-hook) LaTeX-mode-hook) + (and (boundp 'latex-mode-hook) latex-mode-hook))) + (insert-before-markers "RefTeX is enabled. Good.\n") + (insert-before-markers "\ +It appears that RefTeX is not enabled. RefTeX is a mode +that will greatly facilitate the management of labels +and bibliographics references.\n") + (condition-case nil + (info-other-window "(RefTeX)") + (error (select-window wizwin) + (switch-to-buffer wizbuf) + (insert-before-markers + "(I am unable to find RefTeX's info file.)\n"))) + (when (prog1 (yes-or-no-p + (format "Enable RefTeX in `%s'" user-init-file)) + (select-window wizwin) + (switch-to-buffer wizbuf)) + (add-hook 'LaTeX-mode-hook 'turn-on-reftex) + (add-hook 'latex-mode-hook 'turn-on-reftex) + (condition-case nil + (write-region "\ +;;; Enable RefTeX +\(add-hook 'LaTeX-mode-hook 'turn-on-reftex) +\(add-hook 'latex-mode-hook 'turn-on-reftex) +" nil user-init-file t) + (error (insert-before-markers + (format "Unable to write to file `%s'\n" user-init-file)))))) + (when (and (featurep 'tex-site) + (boundp 'LaTeX-mode-hook) + (memq 'turn-on-reftex LaTeX-mode-hook)) + (if (and (boundp 'reftex-plug-into-AUCTeX) + reftex-plug-into-AUCTeX) + (insert-before-markers + "RefTeX appears to be configured for use with AUCTeX.\n") + (require 'reftex) + (insert-before-markers "\ +It appears that RefTeX is not configured to cooperate with +AUCTeX. Please configure it using the menus, save for future +sessions, then press the finish button.") + (customize-variable-other-window 'reftex-plug-into-AUCTeX) + (set (make-local-variable 'custom-buffer-done-function) + (lambda (buff) (kill-buffer buff) (exit-recursive-edit))) + (recursive-edit) + (select-window wizwin) + (switch-to-buffer wizbuf)))) + (insert-before-markers "That's all!\n")) + + +(provide 'tex-wizard) +;;; tex-wizard.el ends here diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex.el b/aquamacs/src/site-lisp/edit-modes/auctex/tex.el index 4602661200a3..bc9512de0a3f 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/tex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/tex.el @@ -1,8 +1,8 @@ ;;; tex.el --- Support for TeX documents. -;; Copyright (C) 1985, 1986, 1987, 1991, 1993, 1994, 1996, 1997, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1991, 1993, 1994, 1996, 1997, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex @@ -26,9 +26,7 @@ ;;; Commentary: -;; This file provides AUCTeX support for plain TeX as well as basic -;; functions used by other AUCTeX modes (e.g. for LaTeX, Texinfo and -;; ConTeXt). +;; This file provides basic functions used by the AUCTeX modes. ;;; Code: @@ -40,14 +38,6 @@ (eval-when-compile (require 'cl)) -(defgroup AUCTeX nil - "A (La)TeX environment." - :tag "AUCTeX" - :link '(custom-manual "(auctex)Top") - :link '(url-link :tag "Home Page" "http://www.gnu.org/software/auctex/") - :prefix "TeX-" - :group 'tex) - (defgroup TeX-file nil "Files used by AUCTeX." :group 'AUCTeX) @@ -117,18 +107,20 @@ then customization is requested." :type 'string) (defcustom ConTeXt-engine nil - "Engine to use for --tex in the texexec command. + "Engine to use for --engine in the texexec command. If nil, none is specified." :group 'TeX-command :type '(choice (const :tag "Unspecified" nil) string)) (defcustom ConTeXt-Omega-engine TeX-Omega-command - "Engine to use for --tex in the texexec command in Omega mode. + "Engine to use for --engine in the texexec command in Omega mode. If nil, none is specified." :group 'TeX-command :type '(choice (const :tag "Unspecified" nil) string)) +;; At least in TeXLive 2009 ConTeXt does not support an omega option anymore. +(make-obsolete-variable 'ConTeXt-Omega-engine 'TeX-engine-alist) (defcustom TeX-queue-command "lpq -P%p" "*Command used to show the status of a printer queue. @@ -157,7 +149,6 @@ the printer has no corresponding command." ;; TeX-expand-list for a description of the % escapes (defcustom TeX-command-list - ;; Changed to double quotes for Windows afflicted people. `(("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX") @@ -165,9 +156,6 @@ the printer has no corresponding command." TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ;; Not part of standard TeX. - ("XeLaTeX" "%`%l%(mode)%' %t" - TeX-run-TeX nil (latex-mode context-mode) - :help (format "Run X%sLaTeX" (string (decode-char 'ucs #x258)))) ("Makeinfo" "makeinfo %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile nil @@ -183,7 +171,7 @@ the printer has no corresponding command." (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ,(if (or window-system (getenv "DISPLAY")) - '("View" "%V" TeX-run-discard t t :help "Run Viewer") + '("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") '("View" "dvi2tty -q -w 132 %s" TeX-run-command t t :help "Run Text viewer")) ("Print" "%p" TeX-run-command t t :help "Print the file") @@ -245,6 +233,10 @@ TeX-run-function: Execute the Lisp function or function call specified by the string in the second element. Consequently, this hook does not start a process. +TeX-run-discard-or-function: If the command is a Lisp function, +execute it as such, otherwise start the command as a process, +discarding its output. + To create your own hook, define a function taking three arguments: The name of the command, the command string, and the name of the file to process. It might be useful to use `TeX-run-command' in order to @@ -277,6 +269,7 @@ Any additional elements get just transferred to the respective menu entries." (function-item TeX-run-silent) (function-item TeX-run-discard-foreground) (function-item TeX-run-function) + (function-item TeX-run-discard-or-function) (function :tag "Other")) (boolean :tag "Prompt") (choice :tag "Modes" @@ -340,7 +333,7 @@ The executable `latex' is LaTeX version 2e." '(("" "%(PDF)%(latex) %S%(PDFout)")) "List of style options and LaTeX commands. -If the first element (a regular expresion) matches the name of one of +If the first element (a regular expression) matches the name of one of the style files, any occurrence of the string `%l' in a command in `TeX-command-list' will be replaced with the second element. The first match is used, if no match is found the `%l' is replaced with the empty @@ -392,89 +385,10 @@ get consulted." :group 'TeX-command :type 'string) -;; You may want special options to the view command depending on the -;; style options. Only works if parsing is enabled. - -(defcustom TeX-view-style - `((,(concat - "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") - "%(o?)xdvi %dS -paper a4 %d") - (,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") - "%(o?)xdvi %dS -paper a5 %d") - ("^b5paper$" "%(o?)xdvi %dS -paper b5 %d") - ("^letterpaper$" "%(o?)xdvi %dS -paper us %d") - ("^legalpaper$" "%(o?)xdvi %dS -paper legal %d") - ("^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") - ("^landscape$" "%(o?)xdvi %dS -paper a4r -s 0 %d") - ;; The latest xdvi can show embedded postscript. If you don't - ;; have that, uncomment next line. - ;; ("^epsf$" "ghostview %f") - ("." "%(o?)xdvi %dS %d")) - "List of style options and view options. - -If the first element (a regular expresion) matches the name of -one of the style files, any occurrence of the string `%v' in a -command in `TeX-command-list' will be replaced with the second -element. The first match is used, if no match is found the `%v' -is replaced with the empty string. - -As a default, the \"View\" command in `TeX-command-list' is set -to `%V'. This means that `TeX-output-view-style' will be -consulted before `TeX-view-style'. Only if no match is found in -`TeX-output-view-style' the settings in `TeX-view-style' will be -considered. If you want to bypass `TeX-output-view-style', which -is not recommended because it is more powerful than -`TeX-view-style', use `%v' in the \"View\" command." - :group 'TeX-command - :type '(repeat (group regexp (string :tag "Command")))) - -(defcustom TeX-output-view-style - `(("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") - "%(o?)dvips -t landscape %d -o && gv %f") - ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") - ("^dvi$" (,(concat - "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") - "^landscape$") - "%(o?)xdvi %dS -paper a4r -s 0 %d") - ("^dvi$" ,(concat - "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") - "%(o?)xdvi %dS -paper a4 %d") - ("^dvi$" (,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") - "^landscape$") - "%(o?)xdvi %dS -paper a5r -s 0 %d") - ("^dvi$" ,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") - "%(o?)xdvi %dS -paper a5 %d") - ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") - ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") - ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") - ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") - ("^dvi$" "." "%(o?)xdvi %dS %d") - ("^pdf$" "." "xpdf -remote %s -raise %o %(outpage)") - ("^html?$" "." "netscape %o")) - "List of output file extensions and view options. - -If the first element (a regular expresion) matches the output -file extension, and the second element (a regular expression) -matches the name of one of the style options, any occurrence of -the string `%V' in a command in `TeX-command-list' will be -replaced with the third element. The first match is used; if no -match is found the `%V' is replaced with `%v'. The outcome of `%v' -is determined by the settings in `TeX-view-style' which therefore -serves as a fallback for `TeX-output-view-style'. The second -element may also be a list of regular expressions, in which case -all the regular expressions must match for the element to apply." - :group 'TeX-command - :type '(repeat (group - (regexp :tag "Extension") - (choice regexp (repeat :tag "List" regexp)) - (string :tag "Command")))) - -;;Same for printing. - (defcustom TeX-print-style '(("^landscape$" "-t landscape")) "List of style options and print options. -If the first element (a regular expresion) matches the name of one of +If the first element (a regular expression) matches the name of one of the style files, any occurrence of the string `%r' in a command in `TeX-command-list' will be replaced with the second element. The first match is used, if no match is found the `%r' is replaced with the empty @@ -491,43 +405,51 @@ string." ("%q" (lambda () (TeX-printer-query t))) ("%V" (lambda () + (TeX-source-correlate-start-server-maybe) + (TeX-view-command-raw))) + ("%vv" (lambda () + (TeX-source-correlate-start-server-maybe) (TeX-output-style-check TeX-output-view-style))) ("%v" (lambda () + (TeX-source-correlate-start-server-maybe) (TeX-style-check TeX-view-style))) ("%r" (lambda () (TeX-style-check TeX-print-style))) ("%l" (lambda () (TeX-style-check LaTeX-command-style))) ("%(PDF)" (lambda () - (if (and (not TeX-Omega-mode) + (if (and (eq TeX-engine 'default) (or TeX-PDF-mode TeX-DVI-via-PDFTeX)) "pdf" ""))) ("%(PDFout)" (lambda () - (if (and (not TeX-Omega-mode) - (not TeX-PDF-mode) - TeX-DVI-via-PDFTeX) - " \"\\pdfoutput=0 \"" - ""))) + (cond ((and (eq TeX-engine 'xetex) + (not TeX-PDF-mode)) + " -no-pdf") + ((and (eq TeX-engine 'luatex) + (not TeX-PDF-mode)) + " --output-format=dvi") + ((and (eq TeX-engine 'default) + (not TeX-PDF-mode) + TeX-DVI-via-PDFTeX) + " \"\\pdfoutput=0 \"") + (t "")))) ("%(mode)" (lambda () (if TeX-interactive-mode "" " -interaction=nonstopmode"))) - ("%(o?)" (lambda () (if TeX-Omega-mode "o" ""))) - ("%(tex)" (lambda () (if TeX-Omega-mode - TeX-Omega-command - TeX-command))) - ("%(latex)" (lambda () (if TeX-Omega-mode - LaTeX-Omega-command - LaTeX-command))) + ("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" ""))) + ("%(tex)" (lambda () (eval (nth 2 (assq TeX-engine (TeX-engine-alist)))))) + ("%(latex)" (lambda () (eval (nth 3 (assq TeX-engine (TeX-engine-alist)))))) ("%(execopts)" ConTeXt-expand-options) - ("%S" TeX-source-specials-expand-options) + ("%S" TeX-source-correlate-expand-options) ("%dS" TeX-source-specials-view-expand-options) ("%cS" TeX-source-specials-view-expand-client) - ("%(outpage)" (lambda () (if TeX-sync-output-page-function - (funcall TeX-sync-output-page-function) - ""))) + ("%(outpage)" (lambda () + (if TeX-source-correlate-output-page-function + (funcall TeX-source-correlate-output-page-function) + "1"))) ;; `file' means to call `TeX-master-file' or `TeX-region-file' ("%s" file nil t) ("%t" file t t) @@ -644,17 +566,6 @@ but does nothing in Emacs." Also does other stuff." (TeX-maybe-remove-help menu))) -(defconst AUC-TeX-version AUCTeX-version) -(condition-case nil - (make-obsolete-variable 'AUC-TeX-version 'AUCTeX-version "11.50") - (wrong-number-of-arguments - (make-obsolete-variable 'AUC-TeX-version 'AUCTeX-version))) - -(defconst AUC-TeX-date AUCTeX-date) -(condition-case nil - (make-obsolete-variable 'AUC-TeX-date 'AUCTeX-date "11.50") - (wrong-number-of-arguments - (make-obsolete-variable 'AUC-TeX-date 'AUCTeX-date))) ;;; Documentation for Info-goto-emacs-command-node and similar @@ -671,8 +582,8 @@ Also does other stuff." ;; Instead of checking for each mode explicitely `minor-mode-list' ;; could be used. But this may make the byte compiler pop up. (when (memq var '(TeX-PDF-mode - TeX-source-specials-mode TeX-interactive-mode - TeX-Omega-mode TeX-fold-mode LaTeX-math-mode)) + TeX-source-correlate-mode TeX-interactive-mode + TeX-fold-mode LaTeX-math-mode)) (if (symbol-value val) (funcall var 1) (funcall var 0))))) (defvar TeX-overlay-priority-step 16 @@ -917,13 +828,12 @@ If RESET is non-nil, `TeX-command-next' is reset to (if TeX-mode-p (let ((trailing-flags (concat - (and TeX-Omega-mode "O") (and (boundp 'TeX-fold-mode) TeX-fold-mode "F") (and (boundp 'LaTeX-math-mode) LaTeX-math-mode "M") + (and TeX-PDF-mode "P") (and TeX-interactive-mode "I") - (and TeX-source-specials-mode "S")))) - (setq mode-name (concat (and TeX-PDF-mode "PDF") - TeX-base-mode-name + (and TeX-source-correlate-mode "S")))) + (setq mode-name (concat TeX-base-mode-name (when (> (length trailing-flags) 0) (concat "/" trailing-flags)))) (when reset @@ -941,53 +851,613 @@ If RESET is non-nil, `TeX-command-next' is reset to (texinfo-mode . "Texinfo") (context-mode . "ConTeXt"))))) -;;; Source Specials +;;; Viewing -(defgroup TeX-source-specials nil - "Controlling source specials in AUCTeX." +(defgroup TeX-view nil + "Calling viewers from AUCTeX." :group 'TeX-command) -(defvar TeX-source-specials-map +(defcustom TeX-view-style + `((,(concat + "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") + "%(o?)xdvi %dS -paper a4 %d") + (,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") + "%(o?)xdvi %dS -paper a5 %d") + ("^b5paper$" "%(o?)xdvi %dS -paper b5 %d") + ("^letterpaper$" "%(o?)xdvi %dS -paper us %d") + ("^legalpaper$" "%(o?)xdvi %dS -paper legal %d") + ("^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") + ("^landscape$" "%(o?)xdvi %dS -paper a4r -s 0 %d") + ;; The latest xdvi can show embedded postscript. If you don't + ;; have that, uncomment next line. + ;; ("^epsf$" "ghostview %f") + ("." "%(o?)xdvi %dS %d")) + "List of style options and view options. + +If the first element (a regular expression) matches the name of +one of the style files, any occurrence of the string `%v' in a +command in `TeX-command-list' will be replaced with the second +element. The first match is used, if no match is found the `%v' +is replaced with the empty string. + +As a default, the \"View\" command in `TeX-command-list' is set +to `%V'. This means that `TeX-output-view-style' will be +consulted before `TeX-view-style'. Only if no match is found in +`TeX-output-view-style' the settings in `TeX-view-style' will be +considered. If you want to bypass `TeX-output-view-style', which +is not recommended because it is more powerful than +`TeX-view-style', use `%v' in the \"View\" command." + :group 'TeX-view + :type '(repeat (group regexp (string :tag "Command")))) + +(defcustom TeX-output-view-style + `(("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") + "%(o?)dvips -t landscape %d -o && gv %f") + ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") + ("^dvi$" (,(concat + "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") + "^landscape$") + "%(o?)xdvi %dS -paper a4r -s 0 %d") + ("^dvi$" ,(concat + "^" (regexp-opt '("a4paper" "a4dutch" "a4wide" "sem-a4")) "$") + "%(o?)xdvi %dS -paper a4 %d") + ("^dvi$" (,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") + "^landscape$") + "%(o?)xdvi %dS -paper a5r -s 0 %d") + ("^dvi$" ,(concat "^" (regexp-opt '("a5paper" "a5comb")) "$") + "%(o?)xdvi %dS -paper a5 %d") + ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") + ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") + ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") + ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") + ("^dvi$" "." "%(o?)xdvi %dS %d") + ("^pdf$" "." "xpdf -remote %s -raise %o %(outpage)") + ("^html?$" "." "netscape %o")) + "List of output file extensions and view options. + +If the first element (a regular expression) matches the output +file extension, and the second element (a regular expression) +matches the name of one of the style options, any occurrence of +the string `%V' in a command in `TeX-command-list' will be +replaced with the third element. The first match is used; if no +match is found the `%V' is replaced with `%v'. The outcome of `%v' +is determined by the settings in `TeX-view-style' which therefore +serves as a fallback for `TeX-output-view-style'. The second +element may also be a list of regular expressions, in which case +all the regular expressions must match for the element to apply." + :group 'TeX-view + :type '(repeat (group + (regexp :tag "Extension") + (choice regexp (repeat :tag "List" regexp)) + (string :tag "Command")))) + +;;; Viewing (new implementation) + +(defvar TeX-view-predicate-list-builtin + '((output-dvi + (string-match "dvi" (TeX-output-extension))) + (output-pdf + (string-match "pdf" (TeX-output-extension))) + (output-html + (string-match "html" (TeX-output-extension))) + (style-pstricks + (TeX-match-style "^pstricks$\\|^pst-\\|^psfrag$")) + (engine-omega + (eq TeX-engine 'omega)) + (engine-xetex + (eq TeX-engine 'xetex)) + (mode-io-correlate + TeX-source-correlate-mode) + (paper-landscape + (TeX-match-style "\\`landscape\\'")) + (paper-portrait + (not (TeX-match-style "\\`landscape\\'"))) + (paper-a4 + (TeX-match-style "\\`a4paper\\|a4dutch\\|a4wide\\|sem-a4\\'")) + (paper-a5 + (TeX-match-style "\\`a5paper\\|a5comb\\'")) + (paper-b5 + (TeX-match-style "\\`b5paper\\'")) + (paper-letter + (TeX-match-style "\\`letterpaper\\'")) + (paper-legal + (TeX-match-style "\\`legalpaper\\'")) + (paper-executive + (TeX-match-style "\\`executivepaper\\'"))) + "Alist of built-in predicates for viewer selection and invocation. +See the doc string of `TeX-view-predicate-list' for a short +description of each predicate.") + +(defcustom TeX-view-predicate-list nil + "Alist of predicates for viewer selection and invocation. +The key of each list item is a symbol and the value a Lisp form +to be evaluated. The form should return nil if the predicate is +not fulfilled. + +Built-in predicates provided in `TeX-view-predicate-list-builtin' +can be overwritten by defining predicates with the same symbol. + +The following built-in predicates are available: + `output-dvi': The output is a DVI file. + `output-pdf': The output is a PDF file. + `output-html': The output is an HTML file. + `style-pstricks': The document loads a PSTricks package. + `engine-omega': The Omega engine is used for typesetting. + `engine-xetex': The XeTeX engine is used for typesetting. + `mode-io-correlate': TeX Source Correlate mode is active. + `paper-landscape': The document is typeset in landscape orientation. + `paper-portrait': The document is not typeset in landscape orientation. + `paper-a4': The paper format is A4. + `paper-a5': The paper format is A5. + `paper-b5': The paper format is B5. + `paper-letter': The paper format is letter. + `paper-legal': The paper format is legal. + `paper-executive': The paper format is executive." + :group 'TeX-view + :type '(alist :key-type symbol :value-type (group sexp))) + +(defvar TeX-view-program-list-builtin + (cond + ((eq system-type 'windows-nt) + '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o")) + ("dvips and start" "dvips %d -o && start \"\" %f") + ("start" "start \"\" %o"))) +;; XXX: We need the advice of a Mac OS X user to configure this +;; correctly and test it. +;; ((eq system-type 'darwin) +;; '(("Preview.app" "open -a Preview.app %o") +;; ("Skim" "open -a Skim.app %o") +;; ("displayline" "displayline %n %o %b") +;; ("open" "open %o"))) + (t + '(("xdvi" ("%(o?)xdvi" + (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"") + ((paper-a4 paper-portrait) " -paper a4") + ((paper-a4 paper-landscape) " -paper a4r") + ((paper-a5 paper-portrait) " -paper a5") + ((paper-a5 paper-landscape) " -paper a5r") + (paper-b5 " -paper b5") + (paper-letter " -paper us") + (paper-legal " -paper legal") + (paper-executive " -paper 7.25x10.5in") + " %d")) + ("dvips and gv" "%(o?)dvips %d -o && gv %f") + ("gv" "gv %o") + ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)"))) + ("Evince" ("evince" (mode-io-correlate " -p %(outpage)") " %o")) + ("xdg-open" "xdg-open %o")))) + "Alist of built-in viewer specifications. +This variable should not be changed by the user who can use +`TeX-view-program-list' to add new viewers or overwrite the +definition of built-in ones. The latter variable also contains a +description of the data format.") + +(defcustom TeX-view-program-list nil + "Alist of viewer specifications. +This variable can be used to specify how a viewer is to be +invoked and thereby add new viewers on top of the built-in list +of viewers defined in `TeX-view-program-list-builtin' or override +entries in the latter. + +The car of each item is a string with a user-readable name. The +second element can be a command line to be run as a process or a +Lisp function to be executed. The command line can either be +specified as a single string or a list of strings and two-part +lists. The first element of the two-part lists is a symbol or a +list of symbols referring to one or more of the predicates in +`TeX-view-predicate-list' or `TeX-view-predicate-list-builtin'. +The second part of the two-part lists is a command line part. +The command line for the viewer is constructed by concatenating +the command line parts. Parts with a predicate are only +considered if the predicate was evaluated with a positive result. +Note that the command line can contain placeholders as defined in +`TeX-expand-list' which are expanded before the viewer is called. + +The use of a function as the second element only works if the +View command in `TeX-command-list' makes use of the hook +`TeX-run-discard-or-function'. + +Note: Predicates defined in the current Emacs session will only +show up in the customization interface for this variable after +restarting Emacs." + :group 'TeX-view + :type + `(alist + :key-type (string :tag "Name") + :value-type + (choice + (group :tag "Command" (string :tag "Command")) + (group :tag "Command parts" + (repeat + :tag "Command parts" + (choice + (string :tag "Command part") + (list :tag "Predicate and command part" + ,(let (list) + ;; Build the list of available predicates. + (mapc (lambda (spec) + (add-to-list 'list `(const ,(car spec)))) + (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + ;; Sort the list alphabetically. + (setq list (sort list + (lambda (a b) + (string< + (downcase (symbol-name (cadr a))) + (downcase (symbol-name (cadr b))))))) + `(choice + (choice :tag "Predicate" ,@list) + (repeat :tag "List of predicates" + (choice :tag "Predicate" ,@list)))) + (string :tag "Command part"))))) + (group :tag "Function" function)))) + +;; XXX: Regarding a possibility to (manually) run an update command, +;; one could support this through `TeX-view' by letting it temporarily +;; set a variable which is checked with a predicate in the viewer +;; selection. If the check is positive, the update command is run +;; instead of the normal viewer command. Direct support through the +;; View command would require a predicate which knows when an update +;; has to be done. +(defcustom TeX-view-program-selection + (cond + ((eq system-type 'windows-nt) + '(((output-dvi style-pstricks) "dvips and start") + (output-dvi "Yap") + (output-pdf "start") + (output-html "start"))) +;; XXX: We need the advice of a Mac OS X user to configure this +;; correctly and test it. +;; ((eq system-type 'darwin) +;; '((output-dvi "open") +;; (output-pdf "open") +;; (output-html "open"))) + (t + '(((output-dvi style-pstricks) "dvips and gv") + (output-dvi "xdvi") + (output-pdf "Evince") + (output-html "xdg-open")))) + "Alist of predicates and viewers. +Each entry consists of a list with two elements. The first +element is a symbol or list of symbols referring to predicates as +defined in `TeX-view-predicate-list' or +`TeX-view-predicate-list-builtin'. The second element is a +string referring to the name of a viewer as defined in +`TeX-view-program-list' or `TeX-view-program-list-builtin'. +\(Note: Viewers added to `TeX-view-program-list' in the current +Emacs session will not show up in the customization interface of +`TeX-view-program-selection' until you restart Emacs.) + +When a viewer is called for, the entries are evaluated in turn +and the viewer related to the first entry all predicates of which +are evaluated positively is chosen." + :group 'TeX-view + :type `(alist :key-type + ;; Offer list of defined predicates. + ,(let (list) + (mapc (lambda (spec) + (add-to-list 'list `(const ,(car spec)))) + (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + (setq list (sort list + (lambda (a b) + (string< + (downcase (symbol-name (cadr a))) + (downcase (symbol-name (cadr b))))))) + `(choice (choice :tag "Single predicate" ,@list) + (repeat :tag "Multiple predicates" + (choice ,@list)))) + :value-type + ;; Offer list of defined viewers. + (group (choice :tag "Viewer" + ,@(let (list) + (mapc (lambda (spec) + (add-to-list 'list + `(const ,(car spec)))) + (append TeX-view-program-list + TeX-view-program-list-builtin)) + (sort list + (lambda (a b) + (string< (downcase (cadr a)) + (downcase (cadr b)))))))))) + +(defun TeX-match-style (regexp) + "Check if a style matching REGEXP is active." + (TeX-member regexp (TeX-style-list) 'string-match)) + +(defun TeX-view-match-predicate (predicate) + "Check if PREDICATE is true. +PREDICATE can be a symbol or a list of symbols defined in +`TeX-view-predicate-list-builtin' or `TeX-view-predicate-list'. +In case of a single symbol, return t if the predicate is true, +nil otherwise. In case of a list of symbols, return t if all +predicates are true, nil otherwise." + (let ((pred-symbols (if (listp predicate) predicate (list predicate))) + (pred-defs (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + (result t) + elt) + (while (and (setq elt (pop pred-symbols)) result) + (unless (eval (cadr (assq elt pred-defs))) + (setq result nil))) + result)) + +(defun TeX-view-command-raw () + "Choose a viewer and return its unexpanded command string." + (let ((selection TeX-view-program-selection) + entry viewer spec command) + ;; Find the appropriate viewer. + (while (and (setq entry (pop selection)) (not viewer)) + (when (TeX-view-match-predicate (car entry)) + (setq viewer (cadr entry)))) + (unless viewer + (error "No matching viewer found")) + ;; Get the command line or function spec. + (setq spec (cadr (assoc viewer (append TeX-view-program-list + TeX-view-program-list-builtin)))) + (cond ((functionp spec) + ;; Converting the function call to a string is ugly, but + ;; the backend currently only supports strings. + (prin1-to-string spec)) + ((stringp spec) + spec) + (t + ;; Build the unexpanded command line. Pieces with predicates are + ;; only added if the predicate is evaluated positively. + (dolist (elt spec) + (cond ((stringp elt) + (setq command (concat command elt))) + ((listp elt) + (when (TeX-view-match-predicate (car elt)) + (setq command (concat command (cadr elt))))))) + command)))) + +;;; Engine + +(defvar TeX-engine-alist-builtin + '((default "Default" TeX-command LaTeX-command ConTeXt-engine) + (xetex "XeTeX" "xetex" "xelatex" "xetex") + (luatex "LuaTeX" "luatex" "lualatex" "luatex") + (omega "Omega" TeX-Omega-command LaTeX-Omega-command ConTeXt-Omega-engine)) + "Alist of built-in TeX engines and associated commands. +For a description of the format see `TeX-engine-alist'.") + +(defcustom TeX-engine-alist nil + "Alist of TeX engines and associated commands. +Each entry is a list with a maximum of five elements. The first +element is a symbol used to identify the engine. The second is a +string describing the engine. The third is the command to be +used for plain TeX. The fourth is the command to be used for +LaTeX. The fifth is the command to be used for the --engine +parameter of ConTeXt's texexec program. Each command can either +be a variable or a string. An empty string or nil means there is +no command available. + +You can override a built-in engine defined in the variable +`TeX-engine-alist-builtin' by adding an entry beginning with the +same symbol as the built-in entry to `TeX-engine-alist'." + :group 'TeX-command + :type '(repeat (group symbol + (string :tag "Name") + (choice :tag "Plain TeX command" string variable) + (choice :tag "LaTeX command" string variable) + (choice :tag "ConTeXt command" string variable)))) + +(defun TeX-engine-alist () + "Return an alist of TeX engines. +The function appends the built-in engine specs from +`TeX-engine-alist-builtin' and the user-defined engines from +`TeX-engine-alist' and deletes any entries from the built-in part +where an entry with the same car exists in the user-defined part." + (TeX-delete-dups-by-car (append TeX-engine-alist TeX-engine-alist-builtin))) + +(defcustom TeX-engine 'default + (concat "Type of TeX engine to use. +It should be one of the following symbols:\n\n" + (mapconcat (lambda (x) (format "* `%s'" (car x))) + (TeX-engine-alist) "\n")) + :group 'TeX-command + :type `(choice ,@(mapcar (lambda (x) + `(const :tag ,(nth 1 x) ,(car x))) + (TeX-engine-alist)))) +(make-variable-buffer-local 'TeX-engine) +(put 'TeX-engine 'safe-local-variable + (lambda (arg) (memq arg (mapcar 'car TeX-engine-alist-builtin)))) + +(defun TeX-engine-set (type) + (concat "Set TeX engine to TYPE. +TYPE can be one of the following symbols:\n" + (mapconcat (lambda (x) (format "* `%s'" (car x))) + (TeX-engine-alist) "\n")) + (interactive (list (completing-read "Engine: " + (mapcar (lambda (x) + (symbol-name (car x))) + (TeX-engine-alist)) + nil t))) + (when (stringp type) + (setq type (intern type))) + (setq TeX-engine type) + ;; Automatically enable or disable TeX PDF mode as a convenience + (cond ((eq type 'xetex) (TeX-PDF-mode 1)) + ((eq type 'omega) (TeX-PDF-mode 0)))) + +(define-minor-mode TeX-Omega-mode + "Minor mode for using the Omega engine." + nil nil nil + :group 'TeX-command + (TeX-engine-set (if TeX-Omega-mode 'omega 'default))) +(defalias 'tex-omega-mode 'TeX-Omega-mode) +(make-obsolete 'TeX-Omega-mode 'TeX-engine-set) +(make-obsolete-variable 'TeX-Omega-mode 'TeX-engine) + +;;; Forward and inverse search + +(defcustom TeX-source-correlate-method 'auto + "Method to use for enabling forward and inverse search. +This can be `source-specials' if source specials should be used, +`synctex' if SyncTeX should be used, or`auto' if AUCTeX should +decide. + +Setting this variable does not take effect if TeX Source +Correlate mode has already been active. Restart Emacs in this +case." + :type '(choice (const auto) (const synctex) (const source-specials)) + :group 'TeX-view) + +(defvar TeX-source-correlate-method-active nil + "Method actually used for forward and inverse search.") + +(defvar TeX-source-correlate-output-page-function nil + "Symbol of function returning an output page relating to buffer position. +The function should take no arguments and return the page numer +as a string.") +(make-variable-buffer-local 'TeX-source-correlate-output-page-function) + +(defcustom TeX-source-correlate-start-server 'ask + "Control if server should be started for inverse search." + :type '(choice (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "Ask" ask)) + :group 'TeX-view) +(when (fboundp 'defvaralias) + (defvaralias 'TeX-source-specials-view-start-server + 'TeX-source-correlate-start-server)) + +(defvar TeX-source-correlate-start-server-asked nil + "Keep track if question about server start search was asked.") + +(defvar TeX-source-correlate-start-server-flag nil + "If non-nil, `TeX-source-correlate-start-server-maybe' will start a server. +Code related to features requiring a server, e.g. for inverse +search, can set the variable.") + +(defun TeX-source-correlate-gnuserv-p () + "Guess whether to use gnuserv when a server is requested." + (cond ((and (boundp 'gnuserv-process) + (processp gnuserv-process))) + ((and (boundp 'server-process) + (processp server-process)) + nil) + ((featurep 'xemacs)))) + +(defun TeX-source-correlate-server-enabled-p () + "Return non-nil if Emacs server or gnuserv is enabled." + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) + (process (if gnuserv-p 'gnuserv-process 'server-process))) + (and (boundp process) (processp (symbol-value process))))) + +(defun TeX-source-correlate-start-server-maybe () + "Start Emacs server or gnuserv if a feature using it is enabled. +This is the case if `TeX-source-correlate-start-server-flag' is non-nil." + (when (and TeX-source-correlate-start-server-flag + (not (TeX-source-correlate-server-enabled-p))) + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) + (start (if gnuserv-p 'gnuserv-start 'server-start))) + (cond + ;; Server should be started unconditionally + ((eq TeX-source-correlate-start-server t) + (funcall start)) + ;; Ask user if server is to be started + ((and (eq TeX-source-correlate-start-server 'ask) + (not TeX-source-correlate-start-server-asked) + (prog1 + (y-or-n-p (format "Start %s for inverse search in viewer? " + (if gnuserv-p + "gnuserv" + "Emacs server"))) + (setq TeX-source-correlate-start-server-asked t))) + (funcall start)))))) + +(defun TeX-source-correlate-determine-method () + "Determine which method is available for forward and inverse search." + (let ((help (condition-case nil + (with-output-to-string + (call-process LaTeX-command + nil (list standard-output nil) nil "--help")) + (error "")))) + (if (string-match "^[ ]*-synctex" help) + 'synctex + 'source-specials))) + +(defun TeX-source-correlate-expand-options () + "Return TeX engine command line option for forward search facilities. +The return value depends on the value of `TeX-source-correlate-mode'. +If this is nil, an empty string will be returned." + (if TeX-source-correlate-mode + (if (eq TeX-source-correlate-method-active 'source-specials) + (concat TeX-source-specials-tex-flags + (if TeX-source-specials-places + ;; -src-specials=WHERE: insert source specials + ;; in certain places of the DVI file. WHERE is a + ;; comma-separated value list: cr display hbox + ;; math par parend vbox + (concat "=" (mapconcat 'identity + TeX-source-specials-places ",")))) + TeX-synctex-tex-flags) + "")) + +(defvar TeX-source-correlate-map (let ((map (make-sparse-keymap))) ;; (if (featurep 'xemacs) ;; (define-key map [(control button1)] #'TeX-view-mouse) ;; (define-key map [C-down-mouse-1] #'TeX-view-mouse)) map) - "Keymap for `TeX-source-specials-mode'. + "Keymap for `TeX-source-correlate-mode'. You could use this for unusual mouse bindings.") -(define-minor-mode TeX-source-specials-mode - "Minor mode for generating and using LaTeX source specials. - -If enabled, an option that inserts source specials into the DVI -file is added to the LaTeX commmand line and the DVI viewer is -called with an appropriate option, so that it shows the the point -in the DVI file corresponding to the point in the Emacs buffer. - -See the the AUCTeX manual for details." - :group 'TeX-source-specials +(define-minor-mode TeX-source-correlate-mode + "Minor mode for forward and inverse search. + +If enabled, the viewer can be advised to show the output page +corresponding to the point in the source and vice versa. + +The method to be used can be controlled with the variable +`TeX-source-correlate-method'. Currently source specials or +SyncTeX are recognized." + :group 'TeX-view + ;; Since this is a global minor mode and we don't want to require + ;; tex.el when the mode variable is set, the mode function is called + ;; explicitely (if necessary) in `VirTeX-common-initialization'. We + ;; do it there because otherwise `kill-all-local-variables' would + ;; reset `TeX-source-correlate-output-page-function' which is + ;; buffer-local. :global t - (set-keymap-parent TeX-mode-map - (and TeX-source-specials-mode - TeX-source-specials-map)) - (TeX-set-mode-name 'TeX-source-specials-mode t t)) -(defalias 'tex-source-specials-mode 'TeX-source-specials-mode) + (set-keymap-parent TeX-mode-map (and TeX-source-correlate-mode + TeX-source-correlate-map)) + (TeX-set-mode-name 'TeX-source-correlate-mode t t) + (setq TeX-source-correlate-start-server-flag TeX-source-correlate-mode) + (unless TeX-source-correlate-method-active + (setq TeX-source-correlate-method-active + (if (eq TeX-source-correlate-method 'auto) + (TeX-source-correlate-determine-method) + TeX-source-correlate-method))) + (when (eq TeX-source-correlate-method-active 'synctex) + (setq TeX-source-correlate-output-page-function + (when TeX-source-correlate-mode + 'TeX-synctex-output-page)))) +(defalias 'TeX-source-specials-mode 'TeX-source-correlate-mode) +(make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode) +(defalias 'tex-source-correlate-mode 'TeX-source-correlate-mode) +(put 'TeX-source-correlate-mode 'safe-local-variable 'TeX-booleanp) +;; We do not want the custom variable to require tex.el. This is only +;; necessary if AUCTeX was compiled with Emacs 21. +(put 'TeX-source-correlate-mode 'custom-requests nil) +(setq minor-mode-map-alist + (delq (assq 'TeX-source-correlate-mode minor-mode-map-alist) + minor-mode-map-alist)) -(put 'TeX-source-specials-mode 'safe-local-variable 'TeX-booleanp) -(setq minor-mode-map-alist (delq - (assq 'TeX-source-specials-mode minor-mode-map-alist) - minor-mode-map-alist)) +;;; Source Specials (defcustom TeX-source-specials-tex-flags "-src-specials" "Extra flags to pass to TeX commands to generate source specials." - :group 'TeX-source-specials - :type '(choice string (repeat string))) + :group 'TeX-view + :type 'string) (defcustom TeX-source-specials-places nil "List of places where to insert source specials into the DVI file. If nil, use (La)TeX's defaults." - :group 'TeX-source-specials + :group 'TeX-view :type '(list (set :inline t ;; :tag "Options known to work" ;; cr display hbox math par parend vbox @@ -1001,74 +1471,36 @@ If nil, use (La)TeX's defaults." (repeat :inline t :tag "Other options" (string)))) -;; From latex(1): -;; -src-specials insert source specials into the DVI file -;; -src-specials=WHERE insert source specials in certain places of -;; the DVI file. WHERE is a comma-separated value -;; list: cr display hbox math par parend vbox - -(defun TeX-source-specials-expand-options () - "Return source specials command line option for TeX commands. -The return value depends on the value of `TeX-source-specials-mode'. -If this is nil, an empty string will be returned." - (if TeX-source-specials-mode - (concat - TeX-source-specials-tex-flags - (if TeX-source-specials-places - (concat - "=" - (mapconcat 'identity - TeX-source-specials-places - ",")))) - "")) - -(defcustom TeX-source-specials-view-start-server 'ask - "Determine if server should be started upon starting a DVI viewer." - :type '(choice (const :tag "Always" t) - (const :tag "Never" nil) - (const :tag "Ask" ask)) - :group 'TeX-source-specials) (defcustom TeX-source-specials-view-position-flags "-sourceposition \"%n %b\"" "Flags to pass to the DVI viewer commands for the position in the source." - :group 'TeX-source-specials + :group 'TeX-view :type 'string) (defcustom TeX-source-specials-view-editor-flags "-editor \"%cS\"" "Flags to pass to DVI viewer commands for inverse search." - :group 'TeX-source-specials + :group 'TeX-view :type 'string) (defcustom TeX-source-specials-view-gnuclient-flags "-q +%%l %%f" "Flags to pass to gnuclient for inverse search." - :group 'TeX-source-specials + :group 'TeX-view :type 'string) (defcustom TeX-source-specials-view-emacsclient-flags "--no-wait +%%l %%f" "Flags to emacsclient for inverse search." - :group 'TeX-source-specials + :group 'TeX-view :type 'string) -(defvar TeX-source-specials-view-start-server-asked nil - "Keep track if question about server start for inverse search was asked.") - -(defun TeX-source-specials-view-gnuserv-p () - "Guess whether to use gnuserv for inverse search." - (cond ((and (boundp 'gnuserv-process) - (processp gnuserv-process))) - ((and (boundp 'server-process) - (processp server-process)) - nil) - ((featurep 'xemacs)))) - +;; FIXME: Make client binaries configurable. (defun TeX-source-specials-view-expand-client () "Return gnuclient or emacslient executable with options. Return the full path to the executable if possible." - (let* ((gnuserv-p (TeX-source-specials-view-gnuserv-p)) + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) (client-base (if gnuserv-p "gnuclient" "emacsclient")) @@ -1084,45 +1516,43 @@ Return the full path to the executable if possible." (defun TeX-source-specials-view-expand-options (&optional viewer) "Return source specials command line option for viewer command. -The return value depends on the value of `TeX-source-specials-mode'. -If this is nil, an empty string will be returned." - (if TeX-source-specials-mode - (let* ((gnuserv-p (TeX-source-specials-view-gnuserv-p)) - (process (if gnuserv-p 'gnuserv-process 'server-process)) - (start (if gnuserv-p 'gnuserv-start 'server-start)) - (server-enabled - (cond - ;; Server is already running - ((and (boundp process) (processp (symbol-value process)))) - ;; Server is not running but should be started unconditionally - ((eq TeX-source-specials-view-start-server t) - (funcall start) - t) - ;; Server is not running and we have to ask if it is to - ;; be started - ((and (eq TeX-source-specials-view-start-server 'ask) - (not TeX-source-specials-view-start-server-asked) - (prog1 - (y-or-n-p - (format "Start %s for inverse search in viewer? " - (if gnuserv-p - "gnuserv" - "Emacs server"))) - (setq TeX-source-specials-view-start-server-asked t))) - (funcall start) - t)))) - (concat TeX-source-specials-view-position-flags - (when server-enabled - (concat " " TeX-source-specials-view-editor-flags)))) +The return value depends on the values of +`TeX-source-correlate-mode' and +`TeX-source-correlate-method-active'. If those are nil or not +`source-specials' respectively, an empty string will be +returned." + (if (and TeX-source-correlate-mode + (eq TeX-source-correlate-method-active 'source-specials)) + (concat TeX-source-specials-view-position-flags + (when (TeX-source-correlate-server-enabled-p) + (concat " " TeX-source-specials-view-editor-flags))) "")) -(defvar TeX-sync-output-page-function nil - "Symbol of function returning an output page relating to buffer position. -The function should take no arguments and return the page numer -as a string.") -(make-variable-buffer-local 'TeX-sync-output-page-function) - -;;; +;;; SyncTeX + +(defvar TeX-synctex-tex-flags "--synctex=1" + "Extra flags to pass to TeX commands to enable SyncTeX.") + +(defun TeX-synctex-output-page () + "Return the page corresponding to the current source position. +This method assumes that the document was compiled with SyncTeX +enabled and the `synctex' binary is available." + (let ((synctex-output + (with-output-to-string + (call-process "synctex" nil (list standard-output nil) nil "view" + "-i" (format "%s:%s:%s" (line-number-at-pos) + (current-column) + ;; The file name relative to the + ;; directory of the master file. + (file-relative-name + (buffer-file-name) + (file-name-directory + (TeX-active-master)))) + "-o" (TeX-active-master (TeX-output-extension)))))) + (when (string-match "Page:\\([0-9]+\\)" synctex-output) + (match-string 1 synctex-output)))) + +;;; Miscellaneous minor modes (defvar TeX-mode-p nil "This indicates a TeX mode being active.") @@ -1145,12 +1575,13 @@ If enabled, PDFTeX will be used as an executable by default. You can customize an initial value, and you can use the function `TeX-global-PDF-mode' for toggling this value." :group 'TeX-command - (when TeX-Omega-mode + (when (eq TeX-engine 'omega) (setq TeX-PDF-mode nil)) (setq TeX-PDF-mode-parsed nil) (TeX-set-mode-name nil nil t) (setq TeX-output-extension (if TeX-PDF-mode "pdf" "dvi"))) +(add-to-list 'minor-mode-alist '(TeX-PDF-mode "")) (defun TeX-global-PDF-mode (&optional arg) "Toggle default for `TeX-PDF-mode'." @@ -1206,20 +1637,7 @@ already established, don't do anything." :group 'TeX-command (TeX-set-mode-name 'TeX-interactive-mode t t)) (defalias 'tex-interactive-mode 'TeX-interactive-mode) - -(defcustom TeX-Omega-mode nil nil - :group 'TeX-command - :set 'TeX-mode-set - :type 'boolean) - -(define-minor-mode TeX-Omega-mode - "Minor mode for using the Omega engine." - nil nil nil - :group 'TeX-command - (when TeX-Omega-mode - (TeX-PDF-mode 0)) - (TeX-set-mode-name 'TeX-Omega-mode t t)) -(defalias 'tex-omega-mode 'TeX-Omega-mode) +(add-to-list 'minor-mode-alist '(TeX-interactive-mode "")) ;;; Commands @@ -1271,12 +1689,12 @@ Must be the car of an entry in `TeX-command-list'." '("\\.aux" "\\.bbl" "\\.blg" "\\.brf" "\\.fot" "\\.glo" "\\.gls" "\\.idx" "\\.ilg" "\\.ind" "\\.lof" "\\.log" "\\.lot" "\\.nav" "\\.out" - "\\.snm" "\\.toc" "\\.url") + "\\.snm" "\\.toc" "\\.url" "\\.synctex\\.gz") "List of regexps matching suffixes of files to be cleaned. Used as a default in TeX, LaTeX and docTeX mode.") (defvar TeX-clean-default-output-suffixes - '("\\.dvi" "\\.pdf" "\\.ps") + '("\\.dvi" "\\.pdf" "\\.ps" "\\.xdv") "List of regexps matching suffixes of files to be cleaned. Used as a default in TeX, LaTeX and docTeX mode.") @@ -1303,7 +1721,7 @@ output files." (master (TeX-active-master)) (master-dir (file-name-directory master)) (regexp (concat "\\(" - (file-name-nondirectory master) "\\|" + (regexp-quote (file-name-nondirectory master)) "\\|" (TeX-region-file nil t) "\\)" "\\(" @@ -1329,6 +1747,38 @@ output files." ;;; Master File +(defcustom TeX-master t + "*The master file associated with the current buffer. +If the file being edited is actually included from another file, you +can tell AUCTeX the name of the master file by setting this variable. +If there are multiple levels of nesting, specify the top level file. + +If this variable is nil, AUCTeX will query you for the name. + +If the variable is t, AUCTeX will assume the file is a master file +itself. + +If the variable is 'shared, AUCTeX will query for the name, but not +change the file. + +If the variable is 'dwim, AUCTeX will try to avoid querying by +attempting to `do what I mean'; and then change the file. + +It is suggested that you use the File Variables (see the info node in +the Emacs manual) to set this variable permanently for each file." + :group 'TeX-command + :group 'TeX-parse + :type '(choice (const :tag "Query" nil) + (const :tag "This file" t) + (const :tag "Shared" shared) + (const :tag "Dwim" dwim) + (string :format "%v"))) +(make-variable-buffer-local 'TeX-master) +(put 'TeX-master 'safe-local-variable + '(lambda (x) + (or (stringp x) + (member x (quote (t nil shared dwim)))))) + (defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$" "*Regular expression matching ordinary TeX files. @@ -1342,6 +1792,10 @@ this variable to \"\"." :group 'TeX-command :type 'regexp) +(defvar TeX-convert-master t + "*If not nil, automatically convert ``Master:'' lines to file variables. +This will be done when AUCTeX first try to use the master file.") + ;; Can be let-bound temporarily in order to inhibit the master file question ;; by using its value instead in case `TeX-master' is nil or 'shared. (defvar TeX-transient-master nil) @@ -1493,42 +1947,6 @@ the beginning of the file, but that feature will be phased out." (and buffer-file-name (file-name-directory buffer-file-name))))))) -(defcustom TeX-master t - "*The master file associated with the current buffer. -If the file being edited is actually included from another file, you -can tell AUCTeX the name of the master file by setting this variable. -If there are multiple levels of nesting, specify the top level file. - -If this variable is nil, AUCTeX will query you for the name. - -If the variable is t, AUCTeX will assume the file is a master file -itself. - -If the variable is 'shared, AUCTeX will query for the name, but not -change the file. - -If the variable is 'dwim, AUCTeX will try to avoid querying by -attempting to `do what I mean'; and then change the file. - -It is suggested that you use the File Variables (see the info node in -the Emacs manual) to set this variable permanently for each file." - :group 'TeX-command - :group 'TeX-parse - :type '(choice (const :tag "Query" nil) - (const :tag "This file" t) - (const :tag "Shared" shared) - (const :tag "Dwim" dwim) - (string :format "%v"))) -(make-variable-buffer-local 'TeX-master) -(put 'TeX-master 'safe-local-variable - '(lambda (x) - (or (stringp x) - (member x (quote (t nil shared dwim)))))) - -(defvar TeX-convert-master t - "*If not nil, automatically convert ``Master:'' lines to file variables. -This will be done when AUCTeX first try to use the master file.") - (defun TeX-add-local-master () "Add local variable for `TeX-master'." (when (and (buffer-file-name) @@ -1638,26 +2056,30 @@ If REGEXP is nil, or \"\", an error will occur." (defun TeX-macro-global () "Return directories containing the site's TeX macro and style files." - (TeX-macro-global-internal "latex" '("/tex/" "/bibtex/bst/") - '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/"))) - -(defun TeX-macro-global-internal (latex search default) - "Return directories containing the site's TeX macro and style files. -LATEX: latex command -SEARCH: search path under system texmf tree -DEFAULT: fallback path list" - (let ((tree-list '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST")) - path-list path exit-status input-dir-list) + (or (TeX-tree-expand '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "latex" '("/tex/" "/bibtex/bst/")) + '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/"))) + +(defun TeX-macro-private () + "Return directories containing the user's TeX macro and style files." + (TeX-tree-expand '("$TEXMFHOME") "latex" '("/tex/" "/bibtex/bst/"))) + +(defun TeX-tree-expand (trees program subdirs) + "Return directories corresponding to the TeX trees TREES. +This is done calling `kpsewhich' where PROGRAM is passed as the +parameter for --progname. SUBDIRS are subdirectories which are +appended to the directories of the TeX trees." + (let (path-list path exit-status input-dir-list) (condition-case nil (catch 'success - (dotimes (i (safe-length tree-list)) + (dotimes (i (safe-length trees)) (setq path (with-output-to-string (setq exit-status (call-process "kpsewhich" nil (list standard-output nil) nil - "--progname" latex - "--expand-braces" (nth i tree-list))))) + "--progname" program + "--expand-braces" (nth i trees))))) (if (zerop exit-status) (progn (add-to-list 'path-list path) (when (zerop i) (throw 'success nil))) @@ -1666,8 +2088,8 @@ DEFAULT: fallback path list" (call-process "kpsewhich" nil (list standard-output nil) nil - "--progname" latex - "--expand-path" (nth i tree-list))))) + "--progname" program + "--expand-path" (nth i trees))))) (when (zerop exit-status) (add-to-list 'path-list path))))) (error nil)) (dolist (elt path-list) @@ -1682,27 +2104,29 @@ DEFAULT: fallback path list" (setq item (substring item (match-end 0) (length item)))) (when (string-match "/+$" item) (setq item (substring item 0 (match-beginning 0)))) - (dolist (subdir search) + (dolist (subdir subdirs) (when (file-exists-p (file-name-as-directory (concat item subdir))) (add-to-list 'input-dir-list (concat item subdir))))))) - (or input-dir-list default))) + input-dir-list)) (defcustom TeX-macro-global (TeX-macro-global) "Directories containing the site's TeX macro and style files." :group 'TeX-file :type '(repeat (directory :format "%v"))) -(defcustom TeX-macro-private (append (TeX-parse-path "TEXINPUTS") - (TeX-parse-path "BIBINPUTS")) +(defcustom TeX-macro-private (or (append (TeX-parse-path "TEXINPUTS") + (TeX-parse-path "BIBINPUTS")) + (TeX-macro-private)) "Directories where you store your personal TeX macros." :group 'TeX-file :type '(repeat (file :format "%v"))) -(defcustom TeX-auto-private (mapcar (lambda (entry) - (expand-file-name TeX-auto-local entry)) - TeX-macro-private) - "List of directories containing automatically generated information. -Must end with a slash. +(defcustom TeX-auto-private + (list (expand-file-name TeX-auto-local + (or (and (boundp 'user-emacs-directory) + (concat user-emacs-directory "auctex/")) + "~/.emacs.d/auctex/"))) + "List of directories containing automatically generated AUCTeX style files. These correspond to the personal TeX macros." :group 'TeX-file @@ -1711,11 +2135,12 @@ These correspond to the personal TeX macros." (if (stringp TeX-auto-private) ;Backward compatibility (setq TeX-auto-private (list TeX-auto-private))) -(defcustom TeX-style-private (mapcar (lambda (entry) - (expand-file-name - TeX-style-local entry)) - TeX-macro-private) - "List of directories containing hand generated information. +(defcustom TeX-style-private + (list (expand-file-name TeX-style-local + (or (and (boundp 'user-emacs-directory) + (concat user-emacs-directory "auctex/")) + "~/.emacs.d/auctex/"))) + "List of directories containing hand-generated AUCTeX style files. These correspond to the personal TeX macros." :group 'TeX-file @@ -1726,12 +2151,17 @@ These correspond to the personal TeX macros." (defcustom TeX-style-path (let ((path)) - (mapcar (lambda (file) (if file (setq path (cons file path)))) + ;; Put directories in an order where the more local files can + ;; override the more global ones. + (mapcar (lambda (file) (when file (add-to-list 'path file t))) (append (list TeX-auto-global TeX-style-global) TeX-auto-private TeX-style-private (list TeX-auto-local TeX-style-local))) path) - "List of directories to search for AUCTeX style files." + "List of directories to search for AUCTeX style files. +Per default the list is built from the values of the variables +`TeX-auto-global', `TeX-style-global', `TeX-auto-private', +`TeX-style-private', `TeX-auto-local', and `TeX-style-local'." :group 'TeX-file :type '(repeat (file :format "%v"))) @@ -1926,18 +2356,6 @@ FORCE is not nil." (defvar TeX-grcl "}" "The TeX group closing character.") (make-variable-buffer-local 'TeX-grcl) -(defcustom plain-TeX-enable-toolbar t - "Enable TeX tool bar in plain TeX mode." - :group 'TeX-tool-bar - :type 'boolean) - -(defun plain-TeX-maybe-install-toolbar () - "Conditionally install tool bar buttons for plain TeX mode. -Install tool bar if `plain-TeX-enable-toolbar' is non-nil." - (when plain-TeX-enable-toolbar - ;; Defined in `tex-bar.el': - (TeX-install-toolbar))) - ;;; Symbols ;; Must be before keymaps. @@ -2241,9 +2659,7 @@ See `TeX-parse-macro' for details." (prin1-to-string head)))))) (t (error "Unknown argument type %s" (prin1-to-string arg)))) (when (and insert-flag (not optional) (TeX-active-mark)) - (if (featurep 'xemacs) - (zmacs-deactivate-region) - (deactivate-mark))))) + (TeX-deactivate-mark)))) (defun TeX-argument-insert (name optional &optional prefix) "Insert NAME surrounded by curly braces. @@ -2326,7 +2742,8 @@ Choose `ignore' if you don't want AUCTeX to install support for font locking." (defvar TeX-format-list '(("JLATEX" japanese-latex-mode - "\\\\\\(documentstyle\\|documentclass\\)[^%\n]*{\\(j[s-]?\\|t\\)\\(article\\|report\\|book\\|slides\\)") + "\\\\\\(documentstyle\\|documentclass\\)[^%\n]*{\\(j[s-]?\\|t\\)\ +\\(article\\|report\\|book\\|slides\\)") ("JTEX" japanese-plain-tex-mode "-- string likely in Japanese TeX --") ("AMSTEX" ams-tex-mode @@ -2338,7 +2755,8 @@ component\\|onderdeel\\|komponent[ea]\\|componenta\\)\ \\|inizia\\(testo\\|progetto\\|prodotto\\|ambiente\\|componente\\)\ \\)\\|%.*?interface=") ("LATEX" latex-mode - "\\\\\\(begin\\|section\\|chapter\\|documentstyle\\|documentclass\\)\\b") + "\\\\\\(begin\\|\\(?:sub\\)\\{0,2\\}section\\|chapter\\|documentstyle\\|\ +documentclass\\)\\b") ("TEX" plain-tex-mode ".")) "*List of format packages to consider when choosing a TeX mode. @@ -2471,6 +2889,10 @@ The algorithm is as follows: (make-local-variable 'TeX-auto-update) (setq TeX-auto-update t) + ;; Minor modes + (when TeX-source-correlate-mode + (TeX-source-correlate-mode 1)) + ;; Let `TeX-master-file' be called after a new file was opened and ;; call `TeX-update-style' on any file opened. (The addition to the ;; hook has to be made here because its local value will be deleted @@ -2495,79 +2917,6 @@ The algorithm is as follows: (TeX-master-file nil nil t)) (TeX-update-style t)) nil t)) -;;; Plain TeX mode - -(defcustom plain-TeX-mode-hook nil - "A hook run in plain TeX mode buffers." - :type 'hook - :group 'TeX-misc) - -;;;###autoload -(defun TeX-plain-tex-mode () - "Major mode in AUCTeX for editing plain TeX files. -See info under AUCTeX for documentation. - -Special commands: -\\{plain-TeX-mode-map} - -Entering `plain-tex-mode' calls the value of `text-mode-hook', -then the value of `TeX-mode-hook', and then the value -of plain-TeX-mode-hook." - (interactive) - (plain-TeX-common-initialization) - (setq major-mode 'plain-tex-mode) - (use-local-map plain-TeX-mode-map) - (easy-menu-add plain-TeX-mode-menu plain-TeX-mode-map) - (easy-menu-add plain-TeX-mode-command-menu plain-TeX-mode-map) - (setq TeX-base-mode-name "TeX") - (setq TeX-command-default "TeX") - (setq TeX-sentinel-default-function 'TeX-TeX-sentinel) - (add-hook 'tool-bar-mode-on-hook 'plain-TeX-maybe-install-toolbar nil t) - (when (if (featurep 'xemacs) - (featurep 'toolbar) - (and (boundp 'tool-bar-mode) tool-bar-mode)) - (plain-TeX-maybe-install-toolbar)) - (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook) - (TeX-set-mode-name)) - -(defun plain-TeX-common-initialization () - "Common initialization for plain TeX like modes." - (VirTeX-common-initialization) - (set-syntax-table TeX-mode-syntax-table) - (setq paragraph-start - (concat - "\\(^[ \t]*$" - "\\|" (regexp-quote TeX-esc) "par\\|" - "^[ \t]*" - (regexp-quote TeX-esc) - "\\(" - "begin\\|end\\|part\\|chapter\\|" - "section\\|subsection\\|subsubsection\\|" - "paragraph\\|include\\|includeonly\\|" - "tableofcontents\\|appendix\\|label\\|caption\\|" - "\\[\\|\\]" ; display math delimitors - "\\)" - "\\|" - "^[ \t]*\\$\\$" ; display math delimitor - "\\)" )) - (setq paragraph-separate - (concat - "\\(" - (regexp-quote TeX-esc) - "par\\|" - "^[ \t]*$\\|" - "^[ \t]*" - (regexp-quote TeX-esc) - "\\(" - "begin\\|end\\|label\\|caption\\|part\\|chapter\\|" - "section\\|subsection\\|subsubsection\\|" - "paragraph\\|include\\|includeonly\\|" - "tableofcontents\\|appendix\\|" (regexp-quote TeX-esc) - "\\)" - "\\)")) - (setq TeX-header-end (regexp-quote "%**end of header")) - (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye"))) - (TeX-run-style-hooks "TEX")) ;;; Hilighting @@ -2804,8 +3153,8 @@ If TEX is a directory, generate style files for all files in the directory." (make-directory TeX-auto-global)) (let ((TeX-file-extensions '("cls" "sty")) (BibTeX-file-extensions nil)) - (mapcar (lambda (macro) (TeX-auto-generate macro TeX-auto-global)) - TeX-macro-global)) + (mapc (lambda (macro) (TeX-auto-generate macro TeX-auto-global)) + TeX-macro-global)) (byte-recompile-directory TeX-auto-global 0)) (defun TeX-auto-store (file) @@ -2820,9 +3169,8 @@ If TEX is a directory, generate style files for all files in the directory." (erase-buffer) (insert "(TeX-add-style-hook \"" style "\"\n" " (lambda ()") - (mapcar (lambda (el) - (TeX-auto-insert el style)) - TeX-auto-parser) + (mapc (lambda (el) (TeX-auto-insert el style)) + TeX-auto-parser) (insert "))\n\n") (write-region (point-min) (point-max) file nil 'silent) (kill-buffer (current-buffer)))) @@ -2884,17 +3232,21 @@ alter the numbering of any ordinary, non-shy groups.") (defvar plain-TeX-auto-regexp-list (let ((token TeX-token-char)) - `((,(concat "\\\\def\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol-check) - (,(concat "\\\\let\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol-check) + `((,(concat "\\\\def\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol-check) + (,(concat "\\\\let\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol-check) (,(concat "\\\\font\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol) (,(concat "\\\\chardef\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol) - (,(concat "\\\\new\\(?:count\\|dimen\\|muskip\\|skip\\)\\\\\\(" token "+\\)[^a-zA-Z@]") + (,(concat "\\\\new\\(?:count\\|dimen\\|muskip\\|skip\\)\\\\\\(" token + "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol) (,(concat "\\\\newfont{?\\\\\\(" token "+\\)}?") 1 TeX-auto-symbol) (,(concat "\\\\typein\\[\\\\\\(" token "+\\)\\]") 1 TeX-auto-symbol) ("\\\\input +\\(\\.*[^#%\\\\\\.\n\r]+\\)\\(\\.[^#%\\\\\\.\n\r]+\\)?" 1 TeX-auto-file) - (,(concat "\\\\mathchardef\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol))) + (,(concat "\\\\mathchardef\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol))) "List of regular expression matching common LaTeX macro definitions.") (defvar TeX-auto-full-regexp-list plain-TeX-auto-regexp-list @@ -3010,7 +3362,7 @@ functions in `TeX-auto-cleanup-hook' after parsing." (let ((case-fold-search nil)) - (mapcar 'TeX-auto-clear-entry TeX-auto-parser) + (mapc 'TeX-auto-clear-entry TeX-auto-parser) (run-hooks 'TeX-auto-prepare-hook) (save-excursion @@ -3398,6 +3750,15 @@ to look backward for." (skip-chars-backward " \t\n") (bobp))) +(defun TeX-deactivate-mark () + "Deactivate the mark. +This is a compatibility function which works both in Emacs and +XEmacs. In XEmacs the region is deactivated instead of the +mark which is sort of equivalent." + (if (featurep 'xemacs) + (zmacs-deactivate-region) + (deactivate-mark))) + (defalias 'TeX-run-mode-hooks (if (fboundp 'run-mode-hooks) 'run-mode-hooks 'run-hooks)) @@ -3578,10 +3939,9 @@ Brace insertion is only done if point is in a math construct and (define-key map "\C-c;" 'TeX-comment-or-uncomment-region) (define-key map "\C-c%" 'TeX-comment-or-uncomment-paragraph) - (define-key map "\C-c\C-t\C-o" 'TeX-Omega-mode) (define-key map "\C-c\C-t\C-p" 'TeX-PDF-mode) (define-key map "\C-c\C-t\C-i" 'TeX-interactive-mode) - (define-key map "\C-c\C-t\C-s" 'TeX-source-specials-mode) + (define-key map "\C-c\C-t\C-s" 'TeX-source-correlate-mode) (define-key map "\C-c\C-t\C-r" 'TeX-pin-region) (define-key map "\C-c\C-w" 'TeX-toggle-debug-bad-boxes); to be removed (define-key map "\C-c\C-t\C-b" 'TeX-toggle-debug-bad-boxes) @@ -3613,12 +3973,6 @@ Brace insertion is only done if point is in a math construct and map) "Keymap for common TeX and LaTeX commands.") -(defvar plain-TeX-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map TeX-mode-map) - map) - "Keymap used in plain TeX mode.") - (defun TeX-mode-specific-command-menu (mode) "Return a Command menu specific to the major MODE." ;; COMPATIBILITY for Emacs < 21 @@ -3635,7 +3989,7 @@ Brace insertion is only done if point is in a math construct and "Return the entries for a Command menu specific to the major MODE." (append (TeX-menu-with-help - '(["Command on" nil :active nil] + `("Command on" [ "Master File" TeX-command-select-master :keys "C-c C-c" :style radio :selected (eq TeX-command-current 'TeX-command-master) @@ -3654,11 +4008,11 @@ Brace insertion is only done if point is in a math construct and (and (boundp 'TeX-command-region-begin) (markerp TeX-command-region-begin))) (TeX-mark-active)) - ;; :visible (eq TeX-command-current 'TeX-command-region) + ;;:visible (eq TeX-command-current 'TeX-command-region) :style toggle :selected (and (boundp 'TeX-command-region-begin) (markerp TeX-command-region-begin)) - :help "Fix the region for \"Command on Region\"" ] + :help "Fix the region for \"Command on Region\""] "-" ["Recenter Output Buffer" TeX-recenter-output-buffer :help "Show the output of current TeX process"] @@ -3670,25 +4024,29 @@ Brace insertion is only done if point is in a math construct and :help "Start a viewer without prompting"] "-" ("TeXing Options" - [ "Use Omega" TeX-Omega-mode - :style toggle :selected TeX-Omega-mode - :help "Use the Omega engine for compiling"] - [ "PDF Mode" TeX-PDF-mode + ,@(mapcar (lambda (x) + (let ((symbol (car x)) (name (nth 1 x))) + `[ ,(format "Use %s engine" name) (TeX-engine-set ',symbol) + :style radio :selected (eq TeX-engine ',symbol) + :help ,(format "Use %s engine for compiling" name) ])) + (TeX-engine-alist)) + "-" + [ "Generate PDF" TeX-PDF-mode :style toggle :selected TeX-PDF-mode - :active (not TeX-Omega-mode) + :active (not (eq TeX-engine 'omega)) :help "Use PDFTeX to generate PDF instead of DVI"] [ "Run Interactively" TeX-interactive-mode :style toggle :selected TeX-interactive-mode :keys "C-c C-t C-i" :help "Stop on errors in a TeX run"] - [ "Source Specials" TeX-source-specials-mode - :style toggle :selected TeX-source-specials-mode + [ "Correlate I/O" TeX-source-correlate-mode + :style toggle :selected TeX-source-correlate-mode :help "Enable forward and inverse search in the previewer"] ["Debug Bad Boxes" TeX-toggle-debug-bad-boxes :style toggle :selected TeX-debug-bad-boxes :keys "C-c C-t C-b" :help "Make \"Next Error\" show overfull and underfull boxes"] ["Debug Warnings" TeX-toggle-debug-warnings :style toggle :selected TeX-debug-warnings - :help "Make \"Next Error\" show warnings"] ))) + :help "Make \"Next Error\" show warnings"]))) (let ((file 'TeX-command-on-current));; is this actually needed? (TeX-maybe-remove-help (delq nil @@ -3718,60 +4076,42 @@ Brace insertion is only done if point is in a math construct and "-" ["Hide All in Current Buffer" TeX-fold-buffer :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-b" :help "Hide all configured TeX constructs in the current buffer"] ["Hide All in Current Region" TeX-fold-region :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-r" :help "Hide all configured TeX constructs in the marked region"] ["Hide All in Current Paragraph" TeX-fold-paragraph :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-p" :help "Hide all configured TeX constructs in the paragraph containing point"] ["Hide Current Macro" TeX-fold-macro :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-m" :help "Hide the macro containing point"] ["Hide Current Environment" TeX-fold-env :visible (not (eq major-mode 'plain-tex-mode)) :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-e" :help "Hide the environment containing point"] ["Hide Current Comment" TeX-fold-comment :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-c" :help "Hide the comment containing point"] "-" ["Show All in Current Buffer" TeX-fold-clearout-buffer :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o b" :help "Permanently show all folded content again"] ["Show All in Current Region" TeX-fold-clearout-region :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o r" :help "Permanently show all folded content in marked region"] ["Show All in Current Paragraph" TeX-fold-clearout-paragraph :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o p" :help "Permanently show all folded content in paragraph containing point"] ["Show Current Item" TeX-fold-clearout-item :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o i" :help "Permanently show the item containing point"] "-" ["Hide or Show Current Item" TeX-fold-dwim :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) - :keys "C-c C-o C-o" :help "Hide or show the item containing point"])) "Menu definition for commands from tex-fold.el.") - -;;; Menus for plain TeX mode -(easy-menu-define plain-TeX-mode-command-menu - plain-TeX-mode-map - "Command menu used in TeX mode." - (TeX-mode-specific-command-menu 'plain-tex-mode)) - (defvar TeX-customization-menu nil) (defvar TeX-common-menu-entries @@ -3799,7 +4139,9 @@ Brace insertion is only done if point is in a math construct and ["Extend this Menu" (progn (easy-menu-add-item - nil (list TeX-base-mode-name) + nil + ;; Ugly hack because docTeX mode uses the LaTeX menu. + (list (if (eq major-mode 'doctex-mode) "LaTeX" TeX-base-mode-name)) (or TeX-customization-menu (setq TeX-customization-menu (customize-menu-create 'AUCTeX "Customize AUCTeX"))))) @@ -3808,90 +4150,20 @@ Brace insertion is only done if point is in a math construct and :help ,(format "Problems with AUCTeX %s? Mail us!" AUCTeX-version)]))) -(defvar plain-TeX-menu-entries - (TeX-menu-with-help - `(["Macro..." TeX-insert-macro - :help "Insert a macro and possibly arguments"] - ["Complete" TeX-complete-symbol - :help "Complete the current macro"] - "-" - ("Insert Font" - ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] - ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] - ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] - ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] - ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] - ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] - ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] - ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] - ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]) - ("Replace Font" - ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] - ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] - ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] - ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] - ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] - ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] - ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] - ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] - ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]) - ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] - "-" - ["Comment or Uncomment Region" TeX-comment-or-uncomment-region - :help "Comment or uncomment the currently selected region"] - ["Comment or Uncomment Paragraph" TeX-comment-or-uncomment-paragraph - :help "Comment or uncomment the paragraph containing point"] - ,TeX-fold-menu - "-" . ,TeX-common-menu-entries))) -(easy-menu-define plain-TeX-mode-menu - plain-TeX-mode-map - "Menu used in plain TeX mode." - (cons "TeX" plain-TeX-menu-entries)) +;;; Verbatim constructs -;;; AmSTeX +(defvar TeX-verbatim-p-function nil + "Mode-specific function to be called by `TeX-verbatim-p'.") +(make-variable-buffer-local 'TeX-verbatim-p-function) -(defvar AmSTeX-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map TeX-mode-map) - map) - "Keymap used in `AmSTeX-mode'.") - -;; Menu for AmSTeX mode -(easy-menu-define AmSTeX-mode-command-menu - AmSTeX-mode-map - "Command menu used in AmsTeX mode." - (TeX-mode-specific-command-menu 'ams-tex-mode)) - -(easy-menu-define AmSTeX-mode-menu - AmSTeX-mode-map - "Menu used in AMS-TeX mode." - (cons "AmS-TeX" plain-TeX-menu-entries)) - -;;;###autoload -(defun ams-tex-mode () - "Major mode in AUCTeX for editing AmS-TeX files. -See info under AUCTeX for documentation. - -Special commands: -\\{AmSTeX-mode-map} - -Entering AmS-tex-mode calls the value of `text-mode-hook', -then the value of `TeX-mode-hook', and then the value -of `AmS-TeX-mode-hook'." - (interactive) - (plain-TeX-common-initialization) - (setq major-mode 'ams-tex-mode) - (use-local-map AmSTeX-mode-map) - - ;; Menu - (easy-menu-add AmSTeX-mode-menu AmSTeX-mode-map) - (easy-menu-add AmSTeX-mode-command-menu AmSTeX-mode-map) - - (setq TeX-base-mode-name "AmS-TeX") - (setq TeX-command-default "AmSTeX") - (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'AmS-TeX-mode-hook) - (TeX-set-mode-name)) +;; XXX: We only have an implementation for LaTeX mode at the moment (Oct 2009). +(defun TeX-verbatim-p (&optional pos) + "Return non-nil if position POS is in a verbatim-like construct. +A mode-specific implementation is required. If it is not +available, the function always returns nil." + (when TeX-verbatim-p-function + (funcall TeX-verbatim-p-function))) ;;; Comments @@ -3999,10 +4271,12 @@ comment characters instead." (eq (preceding-char) ?\r)) nil (save-excursion - (let ((pos (point))) - (re-search-backward "^\\|\r" nil t) - (or (looking-at comment-start-skip) - (re-search-forward comment-start-skip pos t)))))) + (save-match-data + (let ((pos (point))) + (beginning-of-line) + (and (or (looking-at comment-start-skip) + (re-search-forward comment-start-skip pos t)) + (not (TeX-verbatim-p)))))))) (defun TeX-in-commented-line () "Return non-nil if point is in a line consisting only of a comment. @@ -4034,8 +4308,9 @@ If there are no comment starters after potential whitespace at the beginning of the line, return nil." (save-excursion (beginning-of-line) - (when (looking-at (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+")) - (match-string 0)))) + (save-match-data + (when (looking-at (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+")) + (match-string 0))))) (defun TeX-forward-comment-skip (&optional count limit) "Move forward to the next comment skip. @@ -4151,8 +4426,8 @@ regardless of its data type." (save-excursion (let ((count 0) (limit (line-end-position)) char) (while (progn - (skip-chars-forward "^%{}\\\\" limit) - (when (< (point) limit) + (skip-chars-forward "^{}\\\\" limit) + (when (and (< (point) limit) (not (TeX-in-comment))) (setq char (char-after)) (forward-char) (cond ((eq char ?\{) @@ -4186,12 +4461,13 @@ It should be accessed through the function `TeX-search-syntax-table'.") "Return a syntax table for searching purposes. ARGS may be a list of characters. For each of them the respective predefined syntax is set. Currently the parenthetical -characters ?{, ?}, ?[, and ?] are supported. The syntax of each -of these characters not specified will be reset to \" \"." - (let ((char-syntax-alist '((?\{ . "(}") - (?\} . "){") - (?\[ . "(]") - (?\] . ")[")))) +characters ?{, ?}, ?[, ?], ?\(, ?\), ?<, and ?> are supported. +The syntax of each of these characters not specified will be +reset to \" \"." + (let ((char-syntax-alist '((?\{ . "(}") (?\} . "){") + (?\[ . "(]") (?\] . ")[") + (?\( . "()") (?\) . ")(") + (?\< . "(>") (?\> . ")<")))) ;; Clean entries possibly set before. (modify-syntax-entry ?\\ " " TeX-search-syntax-table) (modify-syntax-entry ?@ " " TeX-search-syntax-table) @@ -4206,6 +4482,7 @@ of these characters not specified will be reset to \" \"." (modify-syntax-entry (car elt) " " TeX-search-syntax-table)) ;; Now set what we got. (dolist (elt args) + (unless (assoc elt char-syntax-alist) (error "Char not supported")) (modify-syntax-entry elt (cdr (assoc elt char-syntax-alist)) TeX-search-syntax-table)) ;; Return the syntax table. @@ -4658,22 +4935,17 @@ sign. With optional ARG, insert that many dollar signs." (insert "$"))) (TeX-math-input-method-off)) +(defvar TeX-math-input-method-off-regexp + "^\\(chinese\\|japanese\\|korean\\bulgarian\\russian\\)" + "Regexp matching input methods to be deactivated when entering math mode.") + (defun TeX-math-input-method-off () "Toggle off input method when entering math mode." (and TeX-math-toggle-off-input-method (texmathp) - (TeX-toggle-off-input-method))) - -(defun TeX-toggle-off-input-method () - "Toggle off input methods. -Currently, only support CJK input methods provided by LEIM package." - (cond - ;; LEIM Package - ((and (boundp 'current-input-method) current-input-method - (string-match "^\\(chinese\\|japanese\\|korean\\)" current-input-method)) - (inactivate-input-method)) - (t );; do nothing - )) + (boundp 'current-input-method) current-input-method + (string-match TeX-math-input-method-off-regexp current-input-method) + (inactivate-input-method))) ;;; Simple Commands @@ -4927,11 +5199,10 @@ Your bug report will be posted to the AUCTeX bug reporting list. ;; Explicitely supply doc directory for ;; non-kpathsea-based TeX systems. (unless (stringp TeX-kpathsea-path-delimiter) - (TeX-macro-global-internal - "latex" '("/doc/") - ;; This likely won't improve the outcome but does - ;; not make the situation worse than in the nil case. - `(,@TeX-macro-global ,@TeX-macro-private))) + (or (TeX-tree-expand + '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "latex" '("/doc/")) + `(,@TeX-macro-global ,@TeX-macro-private))) '("dvi" "pdf" "ps" "txt" "html") t t))) (lambda (doc) ;; texdoc in MiKTeX requires --view in order to start @@ -4998,7 +5269,13 @@ NAME may be a package, a command, or a document." (unless (null completions) (add-to-list 'docs (cons completions (nth 0 elt))))))) (if (null docs) - (message "No documentation found") + (progn + (if (executable-find "texdoc") + ;; Fallback if we did not find anything via the backend list. + (let ((doc (read-from-minibuffer "Input for `texdoc': "))) + (when doc (call-process "texdoc" nil 0 nil "--view" doc))) + ;; Give up. + (message "No documentation found"))) ;; Ask the user about the package, command, or document. (when (and (interactive-p) (or (not name) (string= name ""))) @@ -5105,8 +5382,7 @@ NAME may be a package, a command, or a document." ;; buffer-local values of it. (eval-after-load "desktop" '(progn - (dolist (elt '(TeX-master TeX-PDF-mode TeX-interactive-mode - TeX-Omega-mode)) + (dolist (elt '(TeX-master)) (unless (member elt (default-value 'desktop-locals-to-save)) (setq-default desktop-locals-to-save (cons elt (default-value 'desktop-locals-to-save))))) @@ -5119,7 +5395,6 @@ NAME may be a package, a command, or a document." (put 'TeX-insert-quote 'delete-selection t) (put 'TeX-insert-backslash 'delete-selection t) - (provide 'tex) ;; Local Variables: diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/tex.elc b/aquamacs/src/site-lisp/edit-modes/auctex/tex.elc deleted file mode 100644 index 8ca2fcafec6b..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/tex.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.el b/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.el index b3a68aabd4b4..b7bb7f467ff8 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.el @@ -233,14 +233,15 @@ it points to the limit used for searches, usually two paragraphs up.") ;; We need our own syntax table to play with the syntax of () [] and {} ;; For speed reasons we define it statically instead of copying it each time. -(defvar texmathp-syntax-table (make-syntax-table) +(defvar texmathp-syntax-table + (let ((table (make-syntax-table))) + (mapc (lambda (x) (modify-syntax-entry (car x) (cdr x) table)) + '((?\\ . "\\") (?\f .">") (?\n . ">") (?% . "<") + (?\[ . ".") (?\] . ".") (?\{ . "(}") (?\} . "){") + (?\( . ".") (?\) . ".") (?\" . ".") (?& . ".") (?_ . ".") + (?@ . "_") (?~ . " ") (?$ . "$") (?' . "w"))) + table) "Syntax table used while texmathp is parsing.") -(mapcar (lambda (x) (modify-syntax-entry (car x) (cdr x) texmathp-syntax-table)) - '((?\\ . "\\") (?\f .">") (?\n . ">") (?% . "<") - (?\[ . ".") (?\] . ".") (?\{ . "(}") (?\} . "){") - (?\( . ".") (?\) . ".") (?\" . ".") (?& . ".") (?_ . ".") - (?@ . "_") (?~ . " ") (?$ . "$") (?' . "w") - )) ;;;###autoload (defun texmathp () diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.elc b/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.elc deleted file mode 100644 index e3352a29baec..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/texmathp.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.el b/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.el index a7dfb53e5289..ef4edc890a15 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.el @@ -1,6 +1,6 @@ ;;; toolbar-x.el --- fancy toolbar handling in Emacs and XEmacs -;; Copyright (C) 2004, 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -117,14 +117,15 @@ (defvar toolbarx-image-path (nconc (delq nil (mapcar #'(lambda(x) - (and (member + (and x + (member (file-name-nondirectory (directory-file-name x)) '("toolbar" "images")) ;;(file-directory-p x) x)) load-path)) - (list (concat data-directory "images/"))) + (list data-directory)) "List of directories where toolbarx finds its images.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -146,15 +147,13 @@ (defun toolbarx-make-string-from-symbol (symbol) "Return a string from the name of a SYMBOL. Upcase initials and replace dashes by spaces." - (if (eq symbol 'separator) - "--" - (let* ((str (upcase-initials (symbol-name symbol))) - (str2)) - (dolist (i (append str nil)) - (if (eq i 45) ; if dash, push space - (push 32 str2) - (push i str2))) ; else push identical - (concat (nreverse str2))))) + (let* ((str (upcase-initials (symbol-name symbol))) + (str2)) + (dolist (i (append str nil)) + (if (eq i 45) ; if dash, push space + (push 32 str2) + (push i str2))) ; else push identical + (concat (nreverse str2)))) (defun toolbarx-make-symbol-from-string (string) "Return a (intern) symbol from STRING. @@ -504,10 +503,10 @@ documentation of function `toolbarx-process-symbol')." ; (defined with `defimage') (consp (eval val)) (eq (car (eval val)) 'image)) - (and (sequencep val) ; or list or vector with 4 strings or - ; image descriptors + (and (listp val) ; or list with 4 strings or + ; image descriptors (= (length val) 4) - (dolist (i (append val nil) all-obj-ok) + (dolist (i val all-obj-ok) (setq all-obj-ok (and all-obj-ok (or (stringp i) @@ -630,7 +629,6 @@ object VAL of a dropdown group (see documentation of function (let* ((props-types-alist '((:image toolbarx-test-image-type) (:command toolbarx-test-any-type) - (:title toolbarx-test-string-or-nil) (:enable toolbarx-test-any-type) (:visible toolbarx-test-any-type) (:help toolbarx-test-string-or-nil) @@ -1122,15 +1120,14 @@ an extension. If the extension is omitted, `xpm', `xbm' and ;; following should hopefully get us to all images ultimately. (let ((file)) - (dolist (i '("" ".png" ".xpm" ".xbm" ".pbm")) + (dolist (i '("" ".xpm" ".xbm" ".pbm")) (unless file (setq file (locate-library (concat image i) t toolbarx-image-path)))) (if (featurep 'xemacs) (and file (make-glyph file)) (if file (create-image file) - (find-image `((:type png :file ,(concat image ".png")) - (:type xpm :file ,(concat image ".xpm")) + (find-image `((:type xpm :file ,(concat image ".xpm")) (:type xbm :file ,(concat image ".xbm")) (:type pbm :file ,(concat image ".pbm")))))))) @@ -1241,8 +1238,7 @@ function `toolbar-install-toolbar'." (cadr (memq :button filtered-props)))) (menuitem (append (list 'menu-item - (or (cadr (memq :title filtered-props)) - (toolbarx-make-string-from-symbol symbol)) + (toolbarx-make-string-from-symbol symbol) command :image image-descriptor) (when (car help) @@ -1629,14 +1625,12 @@ the lists are built reversed." ;; - remove all specifiers for toolbars witout buttons (if default (progn - (if (memq (default-toolbar-position) '(top bottom)) - (set-specifier default-toolbar-visible-p - (not (not default)) locale) - (set-specifier default-toolbar-visible-p - (not (not default)) locale)) - (if (memq (default-toolbar-position) '(top bottom)) - (set-specifier default-toolbar-height default-height locale) - (set-specifier default-toolbar-width default-width locale)) + ;; Only activate the tool bar if it is already visible. + (when toolbar-visible-p + (set-specifier default-toolbar-visible-p (not (not default)) locale) + (if (memq (default-toolbar-position) '(top bottom)) + (set-specifier default-toolbar-height default-height locale) + (set-specifier default-toolbar-width default-width locale))) (set-specifier default-toolbar default locale)) (remove-specifier default-toolbar locale) (remove-specifier default-toolbar-visible-p locale) @@ -1980,15 +1974,30 @@ this button is ignored." (defconst toolbarx-default-toolbar-meaning-alist - '((separator :image "sep" :command t :enable nil :help "") - (open-file :image ["new" toolbar-file-icon] - :command [find-file toolbar-open] - :enable [(not (window-minibuffer-p - (frame-selected-window menu-updating-frame))) - t] - :help ["Read a file into an Emacs buffer" "Open a file"]) - - (dired :image ["open" toolbar-folder-icon] + `((separator :image "sep" :command t :enable nil :help "") + + (,(if (and (not (featurep 'xemacs)) (>= emacs-major-version 22)) + 'new-file + 'open-file) + :image ["new" toolbar-file-icon] + :command [find-file toolbar-open] + :enable [(not (window-minibuffer-p + (frame-selected-window menu-updating-frame))) + t] + :help ["Specify a new file's name, to edit the file" "Visit new file"]) + + ,(when (and (not (featurep 'xemacs)) (>= emacs-major-version 22)) + '(open-file :image ["open" toolbar-file-icon] + :command [menu-find-file-existing toolbar-open] + :enable [(not (window-minibuffer-p + (frame-selected-window menu-updating-frame))) + t] + :help ["Read a file into an Emacs buffer" "Open a file"])) + + (dired :image [,(if (>= emacs-major-version 22) + "diropen" + "open") + toolbar-folder-icon] :command [dired toolbar-dired] :help ["Read a directory, operate on its files" "Edit a directory"]) @@ -2119,11 +2128,11 @@ this button is ignored." The following buttons are available: * Both Emacs and XEmacs: `open-file', `dired', `save-buffer', -`undo', `cut', `copy', `paste', `search-replace', `print-buffer', -`spell-buffer', `info'. + `undo', `cut', `copy', `paste', `search-replace', `print-buffer', + `spell-buffer', `info'. -* Emacs only: `write-file', `search-forward', `customize', `help', -`kill-buffer', `exit-emacs'. +* Emacs only: `new-file' (Emacs 22+) `write-file', `search-forward', + `customize', `help', `kill-buffer', `exit-emacs'. * XEmacs only: `mail', `compile', `debug', `news'. diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.elc b/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.elc deleted file mode 100644 index 6098917b6eaf..000000000000 Binary files a/aquamacs/src/site-lisp/edit-modes/auctex/toolbar-x.elc and /dev/null differ diff --git a/aquamacs/src/site-lisp/edit-modes/info/auctex.info b/aquamacs/src/site-lisp/edit-modes/info/auctex.info index 443ee3a433ea..fde0099b13f5 100644 --- a/aquamacs/src/site-lisp/edit-modes/info/auctex.info +++ b/aquamacs/src/site-lisp/edit-modes/info/auctex.info @@ -1,6519 +1,119 @@ -This is auctex.info, produced by makeinfo version 4.11 from auctex.texi. +This is auctex.info, produced by makeinfo version 4.13 from auctex.texi. -This manual is for AUCTeX (version 11.85 from 2008-02-10), a +This manual is for AUCTeX (version 11.86 from 2010-02-21), a sophisticated TeX environment for Emacs. Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, -2007, 2008 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, - Version 1.2 or any later version published by the Free Software + Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License." -INFO-DIR-SECTION EmacsINFO-DIR-SECTION TeX +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +END-INFO-DIR-ENTRY +INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY * AUCTeX: (auctex). A sophisticated TeX environment for Emacs. END-INFO-DIR-ENTRY  -File: auctex.info, Node: Top, Next: Copying, Up: (dir) - -AUCTeX -****** - -This manual may be copied under the conditions spelled out in *note -Copying this Manual::. - - AUCTeX is an integrated environment for editing LaTeX, ConTeXt, -docTeX, Texinfo, and TeX files. - - Although AUCTeX contains a large number of features, there are no -reasons to despair. You can continue to write TeX and LaTeX documents -the way you are used to, and only start using the multiple features in -small steps. AUCTeX is not monolithic, each feature described in this -manual is useful by itself, but together they provide an environment -where you will make very few LaTeX errors, and makes it easy to find -the errors that may slip through anyway. - - It is a good idea to make a printout of AUCTeX's reference card -`tex-ref.tex' or one of its typeset versions. - - If you want to make AUCTeX aware of style files and multi-file -documents right away, insert the following in your `.emacs' file. - - (setq TeX-auto-save t) - (setq TeX-parse-self t) - (setq-default TeX-master nil) - - Another thing you should enable is RefTeX, a comprehensive solution -for managing cross references, bibliographies, indices, document -navigation and a few other things. (*note Installation: -(reftex)Installation.) - - For detailed information about the preview-latex subsystem of -AUCTeX, see *note Introduction: (preview-latex)Top. - - There is a mailing list for general discussion about AUCTeX: write a -mail with "subscribe" in the subject to to -join it. Send contributions to . - - Bug reports should go to , suggestions for new -features, and pleas for help should go to either -(the AUCTeX developers), or to if they might have -general interest. Please use the command `M-x TeX-submit-bug-report -RET' to report bugs if possible. You can subscribe to a low-volume -announcement list by sending "subscribe" in the subject of a mail to -. - -* Menu: - -* Copying:: Copying -* Introduction:: Introduction to AUCTeX -* Installation:: Installing AUCTeX -* Quick Start:: Quick Start -* Frequently Used Commands:: Inserting Frequently Used Commands -* Advanced Features:: Advanced Editing Features -* Display:: Controlling Screen Display -* Running TeX and friends:: Starting Processors, Viewers and Other Programs -* Multifile:: Multifile Documents -* Parsing Files:: Automatic Parsing of TeX Files -* Internationalization:: Language Support -* Automatic:: Automatic Customization -* Style Files:: Writing Your own Style Support -* Copying this Manual:: GNU Free Documentation License -* Changes:: Changes and New Features -* Development:: Future Development -* FAQ:: Frequently Asked Questions -* Key Index:: Key Index -* Function Index:: Function Index -* Variable Index:: Variable Index -* Concept Index:: Concept Index - - --- The Detailed Node Listing --- - -Inserting Frequently Used Commands - -* Quotes:: Inserting double quotes -* Font Specifiers:: Inserting Font Specifiers -* Sectioning:: Inserting chapters, sections, etc. -* Environments:: Inserting Environment Templates - -Inserting Environment Templates - -* Equations:: Equations -* Floats:: Floats -* Itemize-like:: Itemize-like -* Tabular-like:: Tabular-like -* Customizing environments:: Customizing environments - -Advanced Editing Features - -* Mathematics:: Entering Mathematics -* Completion:: Completion of macros -* Commenting:: Commenting text -* Indenting:: Reflecting syntactic constructs with whitespace -* Filling:: Automatic and manual line breaking - -Controlling Screen Display - -* Font Locking:: Font Locking -* Folding:: Folding Macros and Environments -* Outline:: Outlining the Document - -Starting Processors, Viewers and Other Programs - -* Commands:: Invoking external commands. -* Viewing:: Invoking external viewers. -* Debugging:: Debugging TeX and LaTeX output. -* Checking:: Checking the document. -* Control:: Controlling the processes. -* Cleaning:: Cleaning intermediate and output files. -* Documentation:: Documentation about macros and packages. - -Language Support - -* European:: Using AUCTeX with European Languages -* Japanese:: Using AUCTeX with Japanese - -Automatic Customization - -* Automatic Global:: Automatic Customization for the Site -* Automatic Private:: Automatic Customization for a User -* Automatic Local:: Automatic Customization for a Directory - -Writing Your own Style Support - -* Simple Style:: A Simple Style File -* Adding Macros:: Adding Support for Macros -* Adding Environments:: Adding Support for Environments -* Adding Other:: Adding Other Information -* Hacking the Parser:: Automatic Extraction of New Things - - -File: auctex.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top - -Copying -******* - -AUCTeX primarily consists of Lisp files for Emacs (and XEmacs), but -there are also installation scripts and files and TeX support files. -All of those are "free"; this means that everyone is free to use them -and free to redistribute them on a free basis. The files of AUCTeX are -not in the public domain; they are copyrighted and there are -restrictions on their distribution, but these restrictions are designed -to permit everything that a good cooperating citizen would want to do. -What is not allowed is to try to prevent others from further sharing -any version of these programs that they might get from you. - - Specifically, we want to make sure that you have the right to give -away copies of the files that constitute AUCTeX, that you receive source -code or else can get it if you want it, that you can change these files -or use pieces of them in new free programs, and that you know you can do -these things. - - To make sure that everyone has such rights, we have to forbid you to -deprive anyone else of these rights. For example, if you distribute -copies of parts of AUCTeX, you must give the recipients all the rights -that you have. You must make sure that they, too, receive or can get -the source code. And you must tell them their rights. - - Also, for our own protection, we must make certain that everyone -finds out that there is no warranty for AUCTeX. If any parts are -modified by someone else and passed on, we want their recipients to -know that what they have is not what we distributed, so that any -problems introduced by others will not reflect on our reputation. - - The precise conditions of the licenses for the files currently being -distributed as part of AUCTeX are found in the General Public Licenses -that accompany them. This manual specifically is covered by the GNU -Free Documentation License (*note Copying this Manual::). - - -File: auctex.info, Node: Introduction, Next: Installation, Prev: Copying, Up: Top - -1 Introduction to AUCTeX -************************ - - This section of the AUCTeX manual gives a brief overview of what -AUCTeX is. It is *not* an attempt to document AUCTeX. Real -documentation for AUCTeX is available in the rest of the manual. - -1.1 Installation -================ - -Read the section *note Installation::, or *note Installation under MS -Windows::, respectively for comprehensive information about how to -install AUCTeX. - - The installation routine tries to make the modes provided by AUCTeX -the default for all supported file types. If this does not happen in -your case, add - (load "auctex.el" nil t t) - to your init file and consult the section *note Loading the -package::. - - If you want to change the modes for which it is operative instead of -the default, use - M-x customize-variable RET TeX-modes RET - - If you want to remove a preinstalled AUCTeX completely before any of -its modes have been used, - (unload-feature 'tex-site) - should accomplish that. - - If you are considering upgrading AUCTeX, the recent changes are -described in *note Changes::. - -1.2 Features -============ - -AUCTeX is a comprehensive customizable integrated environment for -writing input files for TeX/LaTeX/ConTeXt/Texinfo using Emacs or XEmacs. - - It lets you process your source files by running TeX and related -tools (such as output filters, post processors for generating indices -and bibliographies, and viewers) from inside Emacs. AUCTeX lets you -browse through the errors TeX reported, while it moves the cursor -directly to the reported error, and displays some documentation for that -particular error. This will even work when the document is spread over -several files. - - One component of AUCTeX that LaTeX users will find attractive is -preview-latex, a combination of folding and in-source previewing that -provides true "What You See Is What You Get" experience in your -sourcebuffer, while letting you retain full control. preview-latex -comes with its own manual, see *note preview-latex: (preview-latex)Top. - - AUCTeX automatically indents your `LaTeX-source', not only as you -write it -- you can also let it indent and format an entire document. -It has a special outline feature, which can greatly help you `getting an -overview' of a document. - - Apart from these special features, AUCTeX provides a large range of -handy Emacs macros, which in several different ways can help you write -your documents fast and painlessly. - - All features of AUCTeX are documented using the GNU Emacs online -documentation system. That is, documentation for any command is just a -key click away! - - AUCTeX is written entirely in Emacs-Lisp, and hence you can easily -add new features for your own needs. It has become recently a GNU -project. AUCTeX is distributed under the `GNU General Public License -Version 2'. - -1.3 Availability -================ - -The most recent version is always available at - - `http://ftp.gnu.org/pub/gnu/auctex/' - - WWW users may want to check out the AUCTeX page at - - `http://www.gnu.org/software/auctex/' - -1.4 Contacts -============ - -Various mailing lists exist. - - Send a mail with the subject "subscribe" to -in order to join the general discussion list for AUCTeX. Articles -should be sent to . In a similar way, you can -subscribe to the list for just getting important -announcements about AUCTeX. The list is for bug -reports which you should usually file with the `M-x -TeX-submit-bug-report RET' command. - - If you want to address the developers of AUCTeX themselves with -technical issues, they can be found on the discussion list -. - - -File: auctex.info, Node: Installation, Next: Quick Start, Prev: Introduction, Up: Top - -2 Installing AUCTeX -******************* - - Installing AUCTeX should be simple: merely `./configure', `make', -and `make install' for a standard site-wide installation (most other -installations can be done by specifying a `--prefix=...' option). - - On many systems, this will already activate the package, making its -modes the default instead of the built-in modes of Emacs. If this is -not the case, consult *note Loading the package::. Please read through -this document fully before installing anything. The installation -procedure has changed as compared to earlier versions. Users of -MS Windows are asked to consult *Note Installation under MS Windows::. - -* Menu: - -* Prerequisites:: -* Configure:: -* Build/install:: -* Loading the package:: -* Advice for package providers:: -* Advice for non-privileged users:: -* Installation under MS Windows:: -* Customizing:: - - -File: auctex.info, Node: Prerequisites, Next: Configure, Up: Installation - -2.1 Prerequisites -================= - - * A recent version of Emacs, alternatively XEmacs - - Emacs 20 is no longer supported, and neither is XEmacs with a - version of `xemacs-base' older than 1.84 (released in sumo from - 02/02/2004). Using preview-latex requires a version of Emacs - compiled with image support. While the X11 version of Emacs 21 - will likely work, Emacs 22 is the preferred platform. - - Windows - Precompiled versions are available from - `ftp://ftp.gnu.org/gnu/emacs/windows/'. - - Mac OS X - A precompiled version including an installer as well as - preinstalled versions of AUCTeX and preview-latex is - available from - `http://homepage.mac.com/zenitani/emacs-e.html'. - - Debian GNU/Linux - Debian provides `emacs22-gtk' (probably preferable) and - `emacs22' packages in its `unstable' distribution. - - Fedora GNU/Linux - Fedora 8 comes with Emacs 22.1 and Fedora 7 comes with a - developer version of the same. - - openSUSE - openSUSE 10.3 comes with Emacs 22.1. For some earlier - openSUSE versions, Emacs 22.1 is available from - `http://packages.opensuse-community.org/'. - - Self-compiled - Compiling Emacs yourself requires a C compiler and a number - of tools and development libraries. Details are beyond the - scope of this manual. Instructions for checking out the - source code can be found at - `http://savannah.gnu.org/cvs/?group=emacs'. - - If you really need to use Emacs 21 on platforms where this implies - missing image support, you should disable the installation of - preview-latex (see below). - - While XEmacs (version 21.4.15, 21.4.17 or later) is supported, - doing this in a satisfactory manner has proven to be difficult. - This is mostly due to technical shortcomings and differing API's - which are hard to come by. If AUCTeX is your main application for - XEmacs, you are likely to get better results and support by - switching to Emacs. Of course, you can improve support for your - favorite editor by giving feedback in case you encounter bugs. - - * A working TeX installation - - Well, AUCTeX would be pointless without that. Processing - documentation requires TeX, LaTeX and Texinfo during installation. - preview-latex requires Dvips for its operation in DVI mode. The - default configuration of AUCTeX is tailored for teTeX or - TeXlive-based distributions, but can be adapted easily. - - * A recent Ghostscript - - This is needed for operation of preview-latex in both DVI and PDF - mode. Most versions of Ghostscript nowadays in use should work - fine (version 7.0 and newer). If you encounter problems, check - *note Problems with Ghostscript: (preview-latex)Problems with - Ghostscript. - - * The `texinfo' package - - Strictly speaking, you can get away without it if you are building - from the distribution tarball, have not modified any files and - don't need a printed version of the manual: the pregenerated info - file is included in the tarball. At least version 4.0 is required. - - - For some known issues with various software, see *note Known -problems: (preview-latex)Known problems. - - -File: auctex.info, Node: Configure, Next: Build/install, Prev: Prerequisites, Up: Installation - -2.2 Configure -============= - -The first step is to configure the source code, telling it where -various files will be. To do so, run - - ./configure OPTIONS - - (Note: if you have fetched AUCTeX from CVS rather than a regular -release, you will have to first follow the instructions in -`README.CVS'). - - On many machines, you will not need to specify any options, but if -`configure' cannot determine something on its own, you'll need to help -it out with one of these options: - -`--prefix=`/usr/local'' - All automatic placements for package components will be chosen from - sensible existing hierarchies below this: directories like `man', - `share' and `bin' are supposed to be directly below PREFIX. - - Only if no workable placement can be found there, in some cases an - alternative search will be made in a prefix deduced from a suitable - binary. - - `/usr/local' is the default PREFIX, intended to be suitable for a - site-wide installation. If you are packaging this as an operating - system component for distribution, the setting `/usr' will - probably be the right choice. If you are planning to install the - package as a single non-priviledged user, you will typically set - PREFIX to your home directory. - -`--with-emacs[=/PATH/TO/EMACS]' - If you are using a pretest which isn't in your `$PATH', or - `configure' is not finding the right Emacs executable, you can - specify it with this option. - -`--with-xemacs[=/PATH/TO/XEMACS]' - Configure for generation under XEmacs (Emacs is the default). - Again, the name of the right XEmacs executable can be specified, - complete with path if necessary. - -`--with-packagedir=/DIR' - This XEmacs-only option configures the directory for XEmacs - packages. A typical user-local setting would be - `~/.xemacs/xemacs-packages'. If this directory exists and is - below PREFIX, it should be detected automatically. This will - install and activate the package. - -`--without-packagedir' - This XEmacs-only option switches the detection of a package - directory and corresponding installation off. Consequently, the - Emacs installation scheme will be used. This might be appropriate - if you are using a different package system/installer than the - XEmacs one and want to avoid conflicts. - - The Emacs installation scheme has the following options: - -`--with-lispdir=/DIR' - This Emacs-only option specifies the location of the `site-lisp' - directory within `load-path' under which the files will get - installed (the bulk will get installed in a subdirectory). - `./configure' should figure this out by itself. - -`--with-auctexstartfile=`auctex.el'' -`--with-previewstartfile=`preview-latex.el'' - This is the name of the respective startup files. If LISPDIR - contains a subdirectory `site-start.d', the start files are placed - there, and `site-start.el' should load them automatically. Please - be aware that you must not move the start files after installation - since other files are found _relative_ to them. - -`--with-packagelispdir=`auctex'' - This is the directory where the bulk of the package gets located. - The startfile adds this into LOAD-PATH. - -`--with-auto-dir=/DIR' - You can use this option to specify the directory containing - automatically generated information. It is not necessary for most - TeX installs, but may be used if you don't like the directory that - configure is suggesting. - -`--help' - This is not an option specific to AUCTeX. A number of standard - options to `configure' exist, and we do not have the room to - describe them here; a short description of each is available, using - `--help'. If you use `--help=recursive', then also - preview-latex-specific options will get listed. - -`--disable-preview' - This disables configuration and installation of preview-latex. - This option is not actually recommended. If your Emacs does not - support images, you should really upgrade to a newer version. - Distributors should, if possible, refrain from distributing AUCTeX - and preview-latex separately in order to avoid confusion and - upgrade hassles if users install partial packages on their own. - -`--with-texmf-dir=/DIR - --without-texmf-dir' - This option is used for specifying a TDS-compliant directory - hierarchy. Using `--with-texmf-dir=/DIR' you can specify where - the TeX TDS directory hierarchy resides, and the TeX files will - get installed in `/DIR/tex/latex/preview/'. - - If you use the `--without-texmf-dir' option, the TeX-related files - will be kept in the Emacs Lisp tree, and at runtime the - `TEXINPUTS' environment variable will be made to point there. You - can install those files into your own TeX tree at some later time - with `M-x preview-install-styles RET'. - -`--with-tex-dir=/DIR' - If you want to specify an exact directory for the preview TeX - files, use `--with-tex-dir=/DIR'. In this case, the files will be - placed in `/DIR', and you'll also need the following option: - -`--with-doc-dir=/DIR' - This option may be used to specify where the TeX documentation - goes. It is to be used when you are using `--with-tex-dir=/DIR', - but is normally not necessary otherwise. - - -File: auctex.info, Node: Build/install, Next: Loading the package, Prev: Configure, Up: Installation - -2.3 Build/install -================= - -Once `configure' has been run, simply enter - - make - -at the prompt to byte-compile the lisp files, extract the TeX files and -build the documentation files. To install the files into the locations -chosen earlier, type - - make install - - You may need special privileges to install, e.g., if you are -installing into system directories. - - -File: auctex.info, Node: Loading the package, Next: Advice for package providers, Prev: Build/install, Up: Installation - -2.4 Loading the package -======================= - -You can detect the successful activation of AUCTeX and preview-latex in -the menus after loading a LaTeX file like `preview/circ.tex': AUCTeX -then gives you a `Command' menu, and preview-latex gives you a -`Preview' menu. - - For XEmacs, if the installation occured into a valid package -directory (which is the default), then this should work out of the box. - - With Emacs (or if you explicitly disabled use of the package system), -the startup files `auctex.el' and `preview-latex.el' may already be in -a directory of the `site-start.d/' variety if your Emacs installation -provides it. In that case they should be automatically loaded on -startup and nothing else needs to be done. If not, they should at -least have been placed somewhere in your `load-path'. You can then -load them by placing the lines - - (load "auctex.el" nil t t) - (load "preview-latex.el" nil t t) - - into your `~/.emacs' file. - - If you explicitly used `--with-lispdir', you may need to add the -specified directory into Emacs' `load-path' variable by adding -something like - - (add-to-list 'load-path "~/elisp") - - before the above lines into your Emacs startup file. - - For site-wide activation in GNU Emacs, see *Note Advice for package -providers::. - - That is all. There are other ways of achieving the equivalent thing, -but we don't mention them here any more since they are not better, and -people got confused into trying everything at once. - - -File: auctex.info, Node: Advice for package providers, Next: Advice for non-privileged users, Prev: Loading the package, Up: Installation - -2.5 Providing AUCTeX as a package -================================= - -As a package provider, you should make sure that your users will be -served best according to their intentions, and keep in mind that a -system might be used by more than one user, with different preferences. - - There are people that prefer the built-in Emacs modes for editing -TeX files, in particular plain TeX users. There are various ways to -tell AUCTeX even after auto-activation that it should not get used, and -they are described in *note Introduction to AUCTeX: Introduction. - - So if you have users that don't want to use the preinstalled AUCTeX, -they can easily get rid of it. Activating AUCTeX by default is -therefore a good choice. - - If the installation procedure did not achieve this already by placing -`auctex.el' and `preview-latex.el' into a possibly existing -`site-start.d' directory, you can do this by placing - - (load "auctex.el" nil t t) - (load "preview-latex.el" nil t t) - -in the system-wide `site-start.el'. - - If your package is intended as an XEmacs package or to accompany a -precompiled version of Emacs, you might not know which TeX system will -be available when preview-latex gets used. In this case you should -build using the `--without-texmf-dir' option described previously. -This can also be convenient for systems that are intended to support -more than a single TeX distribution. Since more often than not TeX -packages for operating system distributions are either much more -outdated or much less complete than separately provided systems like -TeX Live, this method may be generally preferable when providing -packages. - - The following package structure would be adequate for a typical fully -supported Unix-like installation: - -`preview-tetex' - Style files and documentation for `preview.sty', placed into a TeX - tree where it is accessible from the teTeX executables usually - delivered with a system. If there are other commonly used TeX - system packages, it might be appropriate to provide separate - packages for those. - -`auctex-emacs-tetex' - This package will require the installation of `preview-tetex' and - will record in `TeX-macro-global' where to find the TeX tree. It - is also a good idea to run - emacs -batch -f TeX-auto-generate-global - when either AUCTeX or teTeX get installed or upgraded. If your - users might want to work with a different TeX distribution - (nowadays pretty common), instead consider the following: - -`auctex-emacs' - This package will be compiled with `--without-texmf-dir' and will - consequently contain the `preview' style files in its private - directory. It will probably not be possible to initialize - `TeX-macro-global' to a sensible value, so running - `TeX-auto-generate-global' does not appear useful. This package - would neither conflict with nor provide `preview-tetex'. - -`auctex-xemacs-tetex' -`auctex-xemacs' - Those are the obvious XEmacs equivalents. For XEmacs, there is the - additional problem that the XEmacs sumo package tree already - possibly provides its own version of AUCTeX, and the user might - even have used the XEmacs package manager to updating this - package, or even installing a private AUCTeX version. So you - should make sure that such a package will not conflict with - existing XEmacs packages and will be at an appropriate place in - the load order (after site-wide and user-specific locations, but - before a distribution-specific sumo package tree). Using the - `--without-packagedir' option might be one idea to avoid - conflicts. Another might be to refrain from providing an XEmacs - package and just rely on the user or system administrator to - instead use the XEmacs package system. - - -File: auctex.info, Node: Advice for non-privileged users, Next: Installation under MS Windows, Prev: Advice for package providers, Up: Installation - -2.6 Installation for non-privileged users -========================================= - -Often people without system administration privileges want to install -software for their private use. In that case you need to pass more -options to the `configure' script. For XEmacs users, this is fairly -easy, because the XEmacs package system has been designed to make this -sort of thing practical: but GNU Emacs users (and XEmacs users for whom -the package system is for some reason misbehaving) may need to do a -little more work. - - The main expedient is using the `--prefix' option to the `configure' -script, and let it point to the personal home directory. In that way, -resulting binaries will be installed under the `bin' subdirectory of -your home directory, manual pages under `man' and so on. It is -reasonably easy to maintain a bunch of personal software, since the -prefix argument is supported by most `configure' scripts. - - You'll have to add something like -`/home/myself/share/emacs/site-lisp' to your `load-path' variable, if -it isn't there already. - - XEmacs users can achieve the same end by pointing `configure' at an -appropriate package directory (normally -`--with-packagedir=~/.xemacs/xemacs-packages' will serve). The package -directory stands a good chance at being detected automatically as long -as it is in a subtree of the specified PREFIX. - - Now here is another thing to ponder: perhaps you want to make it easy -for other users to share parts of your personal Emacs configuration. In -general, you can do this by writing `~myself/' anywhere where you -specify paths to something installed in your personal subdirectories, -not merely `~/', since the latter, when used by other users, will point -to non-existent files. - - For yourself, it will do to manipulate environment variables in your -`.profile' resp. `.login' files. But if people will be copying just -Elisp files, their copies will not work. While it would in general be -preferable if the added components where available from a shell level, -too (like when you call the standalone info reader, or try using -`preview.sty' for functionality besides of Emacs previews), it will be -a big help already if things work from inside of Emacs. - - Here is how to do the various parts: - -Making the Elisp available --------------------------- - -In GNU Emacs, it should be sufficient if people just do - - (load "~myself/share/emacs/site-lisp/auctex.el" nil t t) - (load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t) - - where the path points to your personal installation. The rest of the -package should be found relative from there without further ado. - - In XEmacs, you should ask the other users to add symbolic links in -the subdirectories `lisp', `info' and `etc' of their -`~/.xemacs/xemacs-packages/' directory. (Alas, there is presently no -easy programmatic way to do this, except to have a script do the -symlinking for them.) - -Making the Info files available -------------------------------- - -For making the info files accessible from within Elisp, something like -the following might be convenient to add into your or other people's -startup files: - - (eval-after-load 'info - '(add-to-list 'Info-directory-list "~myself/info")) - - In XEmacs, as long as XEmacs can see the package, there should be no -need to do anything at all; the info files should be immediately -visible. However, you might want to set `INFOPATH' anyway, for the -sake of standalone readers outside of XEmacs. (The info files in XEmacs -are normally in `~/.xemacs/xemacs-packages/info'.) - -Making the LaTeX style available --------------------------------- - -If you want others to be able to share your installation, you should -configure it using `--without-texmf-dir', in which case things should -work as well for them as for you. - - -File: auctex.info, Node: Installation under MS Windows, Next: Customizing, Prev: Advice for non-privileged users, Up: Installation - -2.7 Installation under MS Windows -================================= - -In a Nutshell -------------- - -The following are brief installation instructions for the impatient. In -case you don't understand some of this, run into trouble of some sort, -or need more elaborate information, refer to the detailed instructions -further below. - - 1. Install the prerequisites, i.e. Emacs or XEmacs, MSYS or Cygwin, a - TeX system, and Ghostscript. - - 2. Open the MSYS shell or a Cygwin shell and change to the directory - containing the unzipped file contents. - - 3. Configure AUCTeX: - - For Emacs: Many people like to install AUCTeX into the pseudo file - system hierarchy set up by the Emacs installation. Assuming Emacs - is installed in `C:/Program Files/Emacs' and the directory for - local additions of your TeX system, e.g. MiKTeX, is - `C:/localtexmf', you can do this by typing the following statement - at the shell prompt: - - ./configure --prefix='C:/Program Files/Emacs' \ - --infodir='C:/Program Files/Emacs/info' \ - --with-texmf-dir='C:/localtexmf' - - For XEmacs: You can install AUCTeX as an XEmacs package. Assuming - XEmacs is installed in `C:/Program Files/XEmacs' and the directory - for local additions of your TeX system, e.g. MiKTeX, is - `C:/localtexmf', you can do this by typing the following command at - the shell prompt: - - ./configure --with-xemacs='C:/Program Files/XEmacs/bin/xemacs' \ - --with-texmf-dir='C:/localtexmf' - - The commands above are examples for common usage. More on - configuration options can be found in the detailed installation - instructions below. - - If the configuration script failed to find all required programs, - make sure that these programs are in your system path and add - directories containing the programs to the `PATH' environment - variable if necessary. Here is how to do that in W2000/XP: - - 1. On the desktop, right click "My Computer" and select - properties. - - 2. Click on "Advanced" in the "System Properties" window. - - 3. Select "Environment Variables". - - 4. Select "path" in "System Variables" and click "edit". Move - to the front in the line (this might require scrolling) and - add the missing path including drive letter, ended with a - semicolon. - - 4. If there were no further error messages, type - - make - - In case there were, please refer to the detailed description below. - - 5. Finish the installation by typing - - make install - -Detailed Installation Instructions ----------------------------------- - -Installation of AUCTeX under Windows is in itself not more complicated -than on other platforms. However, meeting the prerequisites might -require more work than on some other platforms, and feel less natural. - - If you are experiencing any problems, even if you think they are of -your own making, be sure to report them to so -that we can explain things better in future. - - Windows is a problematic platform for installation scripts. The main -problem is that the installation procedure requires consistent file -names in order to find its way in the directory hierarchy, and Windows -path names are a mess. - - The installation procedure tries finding stuff in system search paths -and in Emacs paths. For that to succeed, you have to use the same -syntax and spelling and case of paths everywhere: in your system search -paths, in Emacs' `load-path' variable, as argument to the scripts. If -your path names contain spaces or other `shell-unfriendly' characters, -most notably backslashes for directory separators, place the whole path -in `"double quote marks"' whenever you specify it on a command line. - - Avoid `helpful' magic file names like `/cygdrive/c' and -`C:\PROGRA~1\' like the plague. It is quite unlikely that the scripts -will be able to identify the actual file names involved. Use the full -paths, making use of normal Windows drive letters like ` 'C:/Program -Files/Emacs' ' where required, and using the same combination of upper- -and lowercase letters as in the actual files. File names containing -shell-special characters like spaces or backslashes (if you prefer that -syntax) need to get properly quoted to the shell: the above example -used single quotes for that. - - Ok, now here are the steps to perform: - - 1. You need to unpack the AUCTeX distribution (which you seemingly - have done since you are reading this). It must be unpacked in a - separate installation directory outside of your Emacs file - hierarchy: the installation will later copy all necessary files to - their final destination, and you can ultimately remove the - directory where you unpacked the files. - - Line endings are a problem under Windows. The distribution - contains only text files, and theoretically most of the involved - tools should get along with that. However, the files are - processed by various utilities, and it is conceivable that not all - of them will use the same line ending conventions. If you - encounter problems, it might help if you try unpacking (or - checking out) the files in binary mode, if your tools allow that. - - If you don't have a suitable unpacking tool, skip to the next - step: this should provide you with a working `unzip' command. - - 2. The installation of AUCTeX will require the MSYS tool set from - `http://www.mingw.org/' or the Cygwin tool set from - `http://cygwin.com/'. The latter is slower and larger (the - download size of the base system is about 15 MB) but comes with a - package manager that allows for updating the tool set and - installing additional packages like, for example, the spell - checker aspell. - - If Cygwin specific paths like `/cygdrive/c' crop up in the course - of the installation, using a non-Cygwin Emacs could conceivably - cause trouble. Using Cygwin either for everything or nothing - might save headaches, _if_ things don't work out. - - 3. Install a current version of XEmacs from `http://www.xemacs.org/' - or Emacs 22 from `ftp://ftp.gnu.org/gnu/emacs/windows/'. Emacs 22 - is the recommended choice because it is currently the primary - platform for AUCTeX development. - - 4. You need a working TeX installation. One popular installation - under Windows is MiKTeX (http://www.miktex.org). Another much more - extensive system is TeX Live (http://www.tug.org/texlive) which is - rather close to its Unix cousins. - - 5. A working copy of Ghostscript (http://www.cs.wisc.edu/~ghost/) is - required for preview-latex operation. Examining the output from - gswin32c -h - on a Windows command line should tell you whether your Ghostscript - supports the `png16m' device needed for PNG support. MiKTeX - apparently comes with its own Ghostscript called `mgs.exe'. - - 6. Perl (http://www.perl.org) is needed for rebuilding the - documentation if you are working with a copy from CVS or have - touched documentation source files in the preview-latex part. If - the line endings of the file `preview/latex/preview.dtx' don't - correspond with what Perl calls `\n' when reading text files, - you'll run into trouble. - - 7. Now the fun stuff starts. If you have not yet done so, unpack the - AUCTeX distribution into a separate directory after rereading the - instructions for unpacking above. - - 8. Ready for takeoff. Start some shell (typically `bash') capable of - running `configure', change into the installation directory and - call `./configure' with appropriate options. - - Typical options you'll want to specify will be - `--prefix=DRIVE:/PATH/TO/EMACS-HIERARCHY' - which tells `configure' where to perform the installation. It - may also make `configure' find Emacs or XEmacs automatically; - if this doesn't happen, try one of `--with-emacs' or - `--with-xemacs' as described below. All automatic detection - of files and directories restricts itself to directories - below the PREFIX or in the same hierarchy as the program - accessing the files. Usually, directories like `man', - `share' and `bin' will be situated right under PREFIX. - - This option also affects the defaults for placing the Texinfo - documentation files (see also `--infodir' below) and - automatically generated style hooks. - - If you have a central directory hierarchy (not untypical with - Cygwin) for such stuff, you might want to specify its root - here. You stand a good chance that this will be the only - option you need to supply, as long as your TeX-related - executables are in your system path, which they better be for - AUCTeX's operation, anyway. - - `--with-emacs' - if you are installing for a version of Emacs. You can use - `--with-emacs=DRIVE:/PATH/TO/EMACS' to specify the name of the - installed Emacs executable, complete with its path if - necessary (if Emacs is not within a directory specified in - your `PATH' environment setting). - - `--with-xemacs' - if you are installing for a version of XEmacs. Again, you - can use `--with-xemacs=DRIVE:/PATH/TO/XEMACS' to specify the - name of the installed XEmacs executable complete with its - path if necessary. It may also be necessary to specify this - option if a copy of Emacs is found in your `PATH' environment - setting, but you still would like to install a copy of AUCTeX - for XEmacs. - - `--with-packagedir=DRIVE:/DIR' - is an XEmacs-only option giving the location of the package - directory. This will install and activate the package. - Emacs uses a different installation scheme: - - `--with-lispdir=DRIVE:/PATH/TO/SITE-LISP' - This Emacs-only option tells a place in `load-path' below - which the files are situated. The startup files `auctex.el' - and `preview-latex.el' will get installed here unless a - subdirectory `site-start.d' exists which will then be used - instead. The other files from AUCTeX will be installed in a - subdirectory called `auctex'. - - If you think that you need a different setup, please refer to - the full installation instructions in *note Configure::. - - `--infodir=DRIVE:/PATH/TO/INFO/DIRECTORY' - If you are installing into an Emacs directory, info files - have to be put into the `info' folder below that directory. - The configuration script will usually try to install into the - folder `share/info', so you have to override this by - specifying something like `--infodir='C:/Program Files/info'' - for the configure call. - - `--with-auto-dir=DRIVE:/DIR' - Directory containing automatically generated information. - You should not normally need to set this, as `--prefix' - should take care of this. - - `--disable-preview' - Use this option if your Emacs version is unable to support - image display. This will be the case if you are using a - native variant of Emacs 21. - - `--with-texmf-dir=DRIVE:/DIR' - This will specify the directory where your TeX installation - sits. If your TeX installation does not conform to the TDS - (TeX directory standard), you may need to specify more - options to get everything in place. - - For more information about any of the above and additional - options, see *note Configure::. - - Calling `./configure --help=recursive' will tell about other - options, but those are almost never required. - - Some executables might not be found in your path. That is not a - good idea, but you can get around by specifying environment - variables to `configure': - GS="DRIVE:/PATH/TO/GSWIN32C.EXE" ./configure ... - should work for this purpose. `gswin32c.exe' is the usual name for - the required _command line_ executable under Windows; in contrast, - `gswin32.exe' is likely to fail. - - As an alternative to specifying variables for the `configure' call - you can add directories containing the required executables to the - `PATH' variable of your Windows system. This is especially a good - idea if Emacs has trouble finding the respective programs later - during normal operation. - - 9. Run `make' in the installation directory. - - 10. Run `make install' in the installation directory. - - 11. With XEmacs, AUCTeX and preview-latex should now be active by - default. With Emacs, activation depends on a working - `site-start.d' directory or similar setup, since then the startup - files `auctex.el' and `preview-latex.el' will have been placed - there. If this has not been done, you should be able to load the - startup files manually with - (load "auctex.el" nil t t) - (load "preview-latex.el" nil t t) - in either a site-wide `site-start.el' or your personal startup file - (usually accessible as `~/.emacs' from within Emacs and - `~/.xemacs/init.el' from within XEmacs). - - The default configuration of AUCTeX is probably not the best fit - for Windows systems. You might want to add - (require 'tex-mik) - or - (require 'tex-fptex) - in order to get more appropriate values for MiKTeX and fpTeX, - respectively after loading `auctex.el' and `preview-latex.el'. - - You can always use - - M-x customize-group RET AUCTeX RET - - in order to customize more stuff, or use the `Customize' menu. - - 12. Load `preview/circ.tex' into Emacs or XEmacs and see if you get the - `Command' menu. Try using it to LaTeX the file. - - 13. Check whether the `Preview' menu is available in this file. Use it - to generate previews for the document. - - If this barfs and tells you that image type `png' is not - supported, try adding the line - - (setq preview-image-type 'pnm) - - at the end of your installed version of `preview-latex.el'. If - this helps, complain to wherever you got your Emacs from: all - current Emacs/XEmacs versions capable of running preview-latex by - now can be compiled to support PNG images. Which is important, - because PNM files take away *vast* amounts of disk space, and thus - also of load/save time. - - Well, that about is all. Have fun! - - -File: auctex.info, Node: Customizing, Prev: Installation under MS Windows, Up: Installation - -2.8 Customizing -=============== - -Most of the site-specific customization should already have happened -during configuration of AUCTeX. Any further customization can be done -with customization buffers directly in Emacs. Just type `M-x -customize-group RET AUCTeX RET' to open the customization group for -AUCTeX or use the menu entries provided in the mode menus. Editing the -file `tex-site.el' as suggested in former versions of AUCTeX should not -be done anymore because the installation routine will overwrite those -changes. - - You might check some variables with a special significance. They are -accessible directly by typing `M-x customize-variable RET -RET'. - - -- User Option: TeX-macro-global - Directories containing the site's TeX style files. - - Normally, AUCTeX will only allow you to complete macros and -environments which are built-in, specified in AUCTeX style files or -defined by yourself. If you issue the `M-x TeX-auto-generate-global' -command after loading AUCTeX, you will be able to complete on all -macros available in the standard style files used by your document. To -do this, you must set this variable to a list of directories where the -standard style files are located. The directories will be searched -recursively, so there is no reason to list subdirectories explicitly. -Automatic configuration will already have set the variable for you if -it could use the program `kpsewhich'. In this case you normally don't -have to alter anything. - - -File: auctex.info, Node: Quick Start, Next: Frequently Used Commands, Prev: Installation, Up: Top - -3 Quick Start -************* - -AUCTeX is a powerful program offering many features and configuration -options. If you are new to AUCTeX this might be deterrent. -Fortunately you do not have to learn everything at once. This Quick -Start Guide will give you the knowledge of the most important commands -and enable you to prepare your first LaTeX document with AUCTeX after -only a few minutes of reading. - - In this introduction, we assume that AUCTeX is already installed on -your system. If this is not the case, you should read the file -`INSTALL' in the base directory of the unpacked distribution tarball. -These installation instructions are available in this manual as well, -*note Installation::. We also assume that you are familiar with the -way keystrokes are written in Emacs manuals. If not, have a look at -the Emacs Tutorial in the Help menu. - - If AUCTeX is installed, you might still need to activate it, by -inserting - - (load "auctex.el" nil t t) - - in your user init file.(1) In order to get support for many of the -LaTeX packages you will use in your documents, you should enable -document parsing as well, which can be achieved by putting - - (setq TeX-auto-save t) - (setq TeX-parse-self t) - - into your init file. Finally, if you often use `\include' or -`\input', you should make AUCTeX aware of the multi-file document -structure. You can do this by inserting - - (setq-default TeX-master nil) - - into your init file. Each time you open a new file, AUCTeX will then -ask you for a master file. - -* Menu: - -* Editing:: Functions for editing TeX files -* Processing:: Creating and viewing output, debugging - - ---------- Footnotes ---------- - - (1) This usually is a file in your home directory called `.emacs' if -you are utilizing GNU Emacs or `.xemacs/init.el' if you are using -XEmacs. - - -File: auctex.info, Node: Editing, Next: Processing, Up: Quick Start - -3.1 Functions for editing TeX files -=================================== - -3.1.1 Making your TeX code more readable ----------------------------------------- - -AUCTeX can do syntax highlighting of your source code, that means -commands will get special colors or fonts. You can enable it locally by -typing `M-x font-lock-mode RET'. If you want to have font locking -activated generally, enable `global-font-lock-mode', e.g. with `M-x -customize-variable RET global-font-lock-mode RET'. - - AUCTeX will indent new lines to indicate their syntactical -relationship to the surrounding text. For example, the text of a -`\footnote' or text inside of an environment will be indented relative -to the text around it. If the indenting has gotten wrong after adding -or deleting some characters, use to reindent the line, `M-q' for -the whole paragraph, or `M-x LaTeX-fill-buffer RET' for the whole -buffer. - -3.1.2 Entering sectioning commands ----------------------------------- - -Insertion of sectioning macros, that is `\chapter', `\section', -`\subsection', etc. and accompanying `\label' commands may be eased by -using `C-c C-s'. You will be asked for the section level. As nearly -everywhere in AUCTeX, you can use the or key to get a list -of available level names, and to auto-complete what you started typing. -Next, you will be asked for the printed title of the section, and last -you will be asked for a label to be associated with the section. - -3.1.3 Inserting environments ----------------------------- - -Similarly, you can insert environments, that is `\begin{}'-`\end{}' -pairs: Type `C-c C-e', and select an environment type. Again, you can -use or to get a list, and to complete what you type. -Actually, the list will not only provide standard LaTeX environments, -but also take your `\documentclass' and `\usepackage' commands into -account if you have parsing enabled by setting `TeX-parse-self' to `t'. -If you use a couple of environments frequently, you can use the up and -down arrow keys (or `M-p' and `M-n') in the minibuffer to get back to -the previously inserted commands. - - Some environments need additional arguments. Often, AUCTeX knows -about this and asks you to enter a value. - -3.1.4 Inserting macros ----------------------- - -`C-c C-m', or simply `C-c RET' will give you a prompt that asks you for -a LaTeX macro. You can use for completion, or the up/down arrow -keys (or `M-p' and `M-n') to browse the command history. In many -cases, AUCTeX knows which arguments a macro needs and will ask you for -that. It even can differentiate between mandatory and optional -arguments--for details, see *note Completion::. - - An additional help for inserting macros is provided by the -possibility to complete macros right in the buffer. With point at the -end of a partially written macro, you can complete it by typing `M-TAB'. - -3.1.5 Changing the font ------------------------ - -AUCTeX provides convenient keyboard shortcuts for inserting macros -which specify the font to be used for typesetting certain parts of the -text. They start with `C-c C-f', and the last `C-' combination tells -AUCTeX which font you want: - -`C-c C-f C-b' - Insert bold face `\textbf{-!-}' text. - -`C-c C-f C-i' - Insert italics `\textit{-!-}' text. - -`C-c C-f C-e' - Insert emphasized `\emph{-!-}' text. - -`C-c C-f C-s' - Insert slanted `\textsl{-!-}' text. - -`C-c C-f C-r' - Insert roman \textrm{-!-} text. - -`C-c C-f C-f' - Insert sans serif `\textsf{-!-}' text. - -`C-c C-f C-t' - Insert typewriter `\texttt{-!-}' text. - -`C-c C-f C-c' - Insert SMALL CAPS `\textsc{-!-}' text. - -`C-c C-f C-d' - Delete the innermost font specification containing point. - - - If you want to change font attributes of existing text, mark it as a -region, and then invoke the commands. If no region is selected, the -command will be inserted with empty braces, and you can start typing the -changed text. - - Most of those commands will also work in math mode, but then macros -like `\mathbf' will be inserted. - -3.1.6 Other useful features ---------------------------- - -AUCTeX also tries to help you when inserting the right "quote" signs -for your language, dollar signs to typeset math, or pairs of braces. -It offers shortcuts for commenting out text (`C-c ;' for the current -region or `C-c %' for the paragraph you are in). The same keystrokes -will remove the % signs, if the region or paragraph is commented out -yet. With `TeX-fold-mode', you can hide certain parts (like footnotes, -references etc.) that you do not edit currently. Support for Emacs' -outline mode is provided as well. And there's more, but this is beyond -the scope of this Quick Start Guide. - - -File: auctex.info, Node: Processing, Prev: Editing, Up: Quick Start - -3.2 Creating and viewing output, debugging -========================================== - -3.2.1 One Command for LaTeX, helpers, viewers, and printing ------------------------------------------------------------ - -If you have typed some text and want to run LaTeX (or TeX, or other -programs--see below) on it, type `C-c C-c'. If applicable, you will be -asked whether you want to save changes, and which program you want to -invoke. In many cases, the choice that AUCTeX suggests will be just -what you want: first `latex', then a viewer. If a `latex' run produces -or changes input files for `makeindex', the next suggestion will be to -run that program, and AUCTeX knows that you need to run `latex' again -afterwards--the same holds for BibTeX. - - When no processor invocation is necessary anymore, AUCTeX will -suggest to run a viewer, or you can chose to create a PostScript file -using `dvips', or to directly print it. - - At this place, a warning needs to be given: First, although AUCTeX is -really good in detecting the standard situations when an additional -`latex' run is necessary, it cannot detect it always. Second, the -creation of PostScript files or direct printing currently only works -when your output file is a DVI file, not a PDF file. - - Ah, you didn't know you can do both? That brings us to the next -topic. - -3.2.2 Choosing an output format -------------------------------- - -From a LaTeX file, you can produce DVI output, or a PDF file directly -via `pdflatex'. You can switch on source specials for easier -navigation in the output file, or tell `latex' to stop after an error -(usually `\noninteractive' is used, to allow you to detect all errors -in a single run). - - These options are controlled by toggles, the keystrokes should be -easy to memorize: - -`C-c C-t C-p' - This command toggles between DVI and PDF output - -`C-c C-t C-i' - toggles interactive mode - -`C-c C-t C-s' - toggles source specials support - -`C-c C-t C-o' - toggles usage of Omega/lambda. - - -3.2.3 Debugging LaTeX ---------------------- - -When AUCTeX runs a program, it creates an output buffer in which it -displays the output of the command. If there is a syntactical error in -your file, `latex' will not complete successfully. AUCTeX will tell you -that, and you can get to the place where the first error occured by -pressing `C-c `' (the last character is a backtick). The view will be -split in two windows, the output will be displayed in the lower buffer, -and both buffers will be centered around the place where the error -ocurred. You can then try to fix it in the document buffer, and use -the same keystrokes to get to the next error. This procedure may be -repeated until all errors have been dealt with. By pressing `C-c C-w' -(`TeX-toggle-debug-boxes') you can toggle whether AUCTeX should notify -you of overfull and underfull boxes in addition to regular errors. - - If a command got stuck in a seemingly infinite loop, or you want to -stop execution for other reasons, you can use `C-c C-k' (for "kill"). -Similar to `C-l', which centers the buffer you are in around your -current position, `C-c C-l' centers the output buffer so that the last -lines added at the bottom become visible. - -3.2.4 Running LaTeX on parts of your document ---------------------------------------------- - -If you want to check how some part of your text looks like, and do not -want to wait until the whole document has been typeset, then mark it as -a region and use `C-c C-r'. It behaves just like `C-c C-c', but it -only uses the document preamble and the region you marked. - - If you are using `\include' or `\input' to structure your document, -try `C-c C-b' while you are editing one of the included files. It will -run `latex' only on the current buffer, using the preamble from the -master file. - - -File: auctex.info, Node: Frequently Used Commands, Next: Advanced Features, Prev: Quick Start, Up: Top - -4 Inserting Frequently Used Commands -************************************ - -The most commonly used commands/macros of AUCTeX are those which simply -insert templates for often used TeX and/or LaTeX/ConTeXt constructs, -like font changes, handling of environments, etc. These features are -very simple, and easy to learn, and help you avoid stupid mistakes like -mismatched braces, or `\begin{}'-`\end{}' pairs. - -* Menu: - -* Quotes:: Inserting double quotes -* Font Specifiers:: Inserting Font Specifiers -* Sectioning:: Inserting chapters, sections, etc. -* Environments:: Inserting Environment Templates - - -File: auctex.info, Node: Quotes, Next: Font Specifiers, Up: Frequently Used Commands - -4.1 Insertion of Quotes, Dollars, and Braces -============================================ - -Quotation Marks ---------------- - -In TeX, literal double quotes `"like this"' are seldom used, instead -two single quotes are used ```like this'''. To help you insert these -efficiently, AUCTeX allows you to continue to press `"' to insert two -single quotes. To get a literal double quote, press `"' twice. - - -- Command: TeX-insert-quote COUNT - (`"') Insert the appropriate quote marks for TeX. - - Inserts the value of `TeX-open-quote' (normally ```') or - `TeX-close-quote' (normally `''') depending on the context. With - prefix argument, always inserts `"' characters. - - -- User Option: TeX-open-quote - String inserted by typing `"' to open a quotation. (*Note - European::, for language-specific quotation mark insertion.) - - -- User Option: TeX-close-quote - String inserted by typing `"' to close a quotation. (*Note - European::, for language-specific quotation mark insertion.) - - -- User Option: TeX-quote-after-quote - Determines the behavior of `"'. If it is non-nil, typing `"' will - insert a literal double quote. The respective values of - `TeX-open-quote' and `TeX-close-quote' will be inserted after - typing `"' once again. - - The `babel' package provides special support for the requirements of -typesetting quotation marks in many different languages. If you use -this package, either directly or by loading a language-specific style -file, you should also use the special commands for quote insertion -instead of the standard quotes shown above. AUCTeX is able to -recognize several of these languages and will change quote insertion -accordingly. *Note European::, for details about this feature and how -to control it. - - In case you are using the `csquotes' package, you should customize -`LaTeX-csquotes-open-quote', `LaTeX-csquotes-close-quote' and -`LaTeX-csquotes-quote-after-quote'. The quotation characters will only -be used if both variables--`LaTeX-csquotes-open-quote' and -`LaTeX-csquotes-close-quote'--are non-empty strings. But then the -`csquotes'-related values will take precedence over the -language-specific ones. - -Dollar Signs ------------- - -In AUCTeX, dollar signs should match like they do in TeX. This has -been partially implemented, we assume dollar signs always match within -a paragraph. The first `$' you insert in a paragraph will do nothing -special. The second `$' will match the first. This will be indicated -by moving the cursor temporarily over the first dollar sign. - - -- Command: TeX-insert-dollar ARG - (`$') Insert dollar sign. - - Show matching dollar sign if this dollar sign end the TeX math - mode. Ensure double dollar signs match up correctly by inserting - extra dollar signs when needed if `TeX-math-close-double-dollar' - is non-nil. - - With optional ARG, insert that many dollar signs. - - -- User Option: TeX-math-close-double-dollar - Control the insertion of double dollar signs for delimiting display - math. (Note that you should not use double dollar signs in LaTeX - because this practice can lead to wrong spacing in typeset - documents.) If the variable is non-nil and you enter a dollar - sign that matches a double dollar sign `$$' AUCTeX will - automatically insert two dollar signs. - -Braces ------- - -To avoid unbalanced braces, it is useful to insert them pairwise. You -can do this by typing `C-c {'. - - -- Command: TeX-insert-braces - (`C-c {') Make a pair of braces and position the cursor to type - inside of them. If there is an active region, put braces around - it and leave point after the closing brace. - - -File: auctex.info, Node: Font Specifiers, Next: Sectioning, Prev: Quotes, Up: Frequently Used Commands - -4.2 Inserting Font Specifiers -============================= - -Perhaps the most used keyboard commands of AUCTeX are the short-cuts -available for easy insertion of font changing macros. - - If you give an argument (that is, type `C-u') to the font command, -the innermost font will be replaced, i.e. the font in the TeX group -around point will be changed. The following table shows the available -commands, with `-!-' indicating the position where the text will be -inserted. - -`C-c C-f C-b' - Insert bold face `\textbf{-!-}' text. - -`C-c C-f C-i' - Insert italics `\textit{-!-}' text. - -`C-c C-f C-e' - Insert emphasized `\emph{-!-}' text. - -`C-c C-f C-s' - Insert slanted `\textsl{-!-}' text. - -`C-c C-f C-r' - Insert roman \textrm{-!-} text. - -`C-c C-f C-f' - Insert sans serif `\textsf{-!-}' text. - -`C-c C-f C-t' - Insert typewriter `\texttt{-!-}' text. - -`C-c C-f C-c' - Insert SMALL CAPS `\textsc{-!-}' text. - -`C-c C-f C-d' - Delete the innermost font specification containing point. - - - -- Command: TeX-font ARG - (`C-c C-f') Insert template for font change command. - - If REPLACE is not nil, replace current font. WHAT determines the - font to use, as specified by `TeX-font-list'. - - -- User Option: TeX-font-list - List of fonts used by TeX-font. - - Each entry is a list with three elements. The first element is the - key to activate the font. The second element is the string to - insert before point, and the third element is the string to insert - after point. An optional fourth element means always replace if - not nil. - - -File: auctex.info, Node: Sectioning, Next: Environments, Prev: Font Specifiers, Up: Frequently Used Commands - -4.3 Inserting chapters, sections, etc. -====================================== - -Insertion of sectioning macros, that is `\chapter', `\section', -`\subsection', etc. and accompanying `\label''s may be eased by using -`C-c C-s'. This command is highly customizable, the following -describes the default behavior. - - When invoking you will be asked for a section macro to insert. An -appropriate default is automatically selected by AUCTeX, that is -either: at the top of the document; the top level sectioning for that -document style, and any other place: The same as the last occurring -sectioning command. - - Next, you will be asked for the actual name of that section, and -last you will be asked for a label to be associated with that section. -The label will be prefixed by the value specified in -`LaTeX-section-hook'. - - -- Command: LaTeX-section ARG - (`C-c C-s') Insert a sectioning command. - - Determine the type of section to be inserted, by the argument ARG. - - * If ARG is nil or missing, use the current level. - - * If ARG is a list (selected by C-u), go downward one level. - - * If ARG is negative, go up that many levels. - - * If ARG is positive or zero, use absolute level: - + 0 : part - - + 1 : chapter - - + 2 : section - - + 3 : subsection - - + 4 : subsubsection - - + 5 : paragraph - - + 6 : subparagraph - - The following variables can be set to customize the function. - - `LaTeX-section-hook' - Hooks to be run when inserting a section. - - `LaTeX-section-label' - Prefix to all section references. - - - The precise behavior of `LaTeX-section' is defined by the contents -of `LaTeX-section-hook'. - - -- User Option: LaTeX-section-hook - List of hooks to run when a new section is inserted. - - The following variables are set before the hooks are run - - LEVEL - Numeric section level, default set by prefix arg to - `LaTeX-section'. - - NAME - Name of the sectioning command, derived from LEVEL. - - TITLE - The title of the section, default to an empty string. - - TOC - Entry for the table of contents list, default nil. - - DONE-MARK - Position of point afterwards, default nil meaning after the - inserted text. - - A number of hooks are already defined. Most likely, you will be - able to get the desired functionality by choosing from these hooks. - - `LaTeX-section-heading' - Query the user about the name of the sectioning command. - Modifies LEVEL and NAME. - - `LaTeX-section-title' - Query the user about the title of the section. Modifies TITLE. - - `LaTeX-section-toc' - Query the user for the toc entry. Modifies TOC. - - `LaTeX-section-section' - Insert LaTeX section command according to NAME, TITLE, and - TOC. If TOC is nil, no toc entry is inserted. If TOC or - TITLE are empty strings, DONE-MARK will be placed at the - point they should be inserted. - - `LaTeX-section-label' - Insert a label after the section command. Controlled by the - variable `LaTeX-section-label'. - - To get a full featured `LaTeX-section' command, insert - - (setq LaTeX-section-hook - '(LaTeX-section-heading - LaTeX-section-title - LaTeX-section-toc - LaTeX-section-section - LaTeX-section-label)) - - in your `.emacs' file. - - The behavior of `LaTeX-section-label' is determined by the variable -`LaTeX-section-label'. - - -- User Option: LaTeX-section-label - Default prefix when asking for a label. - - If it is a string, it is used unchanged for all kinds of sections. - If it is nil, no label is inserted. If it is a list, the list is - searched for a member whose car is equal to the name of the - sectioning command being inserted. The cdr is then used as the - prefix. If the name is not found, or if the cdr is nil, no label - is inserted. - - By default, chapters have a prefix of `cha:' while sections and - subsections have a prefix of `sec:'. Labels are not automatically - inserted for other types of sections. - - -File: auctex.info, Node: Environments, Prev: Sectioning, Up: Frequently Used Commands - -4.4 Inserting Environment Templates -=================================== - -A large apparatus is available that supports insertions of environments, -that is `\begin{}' -- `\end{}' pairs. - - AUCTeX is aware of most of the actual environments available in a -specific document. This is achieved by examining your `\documentclass' -command, and consulting a precompiled list of environments available in -a large number of styles. - - You insert an environment with `C-c C-e', and select an environment -type. Depending on the environment, AUCTeX may ask more questions -about the optional parts of the selected environment type. With `C-u -C-c C-e' you will change the current environment. - - -- Command: LaTeX-environment ARG - (`C-c C-e') AUCTeX will prompt you for an environment to insert. - At this prompt, you may press or to complete a - partially written name, and/or to get a list of available - environments. After selection of a specific environment AUCTeX may - prompt you for further specifications. - - If the optional argument ARG is not-nil (i.e. you have given a - prefix argument), the current environment is modified and no new - environment is inserted. - - As a default selection, AUCTeX will suggest the environment last -inserted or, as the first choice the value of the variable -`LaTeX-default-environment'. - - -- User Option: LaTeX-default-environment - Default environment to insert when invoking `LaTeX-environment' - first time. - - If the document is empty, or the cursor is placed at the top of the -document, AUCTeX will default to insert a `document' environment. - - Most of these are described further in the following sections, and -you may easily specify more. *Note Customizing environments::. - -* Menu: - -* Equations:: Equations -* Floats:: Floats -* Itemize-like:: Itemize-like -* Tabular-like:: Tabular-like -* Customizing environments:: Customizing environments - - You can close the current environment with `C-c ]', but we suggest -that you use `C-c C-e' to insert complete environments instead. - - -- Command: LaTeX-close-environment - (`C-c ]') Insert an `\end' that matches the current environment. - - -File: auctex.info, Node: Equations, Next: Floats, Up: Environments - -4.4.1 Equations ---------------- - -When inserting equation-like environments, the `\label' will have a -default prefix, which is controlled by the following variables: - - -- User Option: LaTeX-equation-label - Prefix to use for `equation' labels. - - -- User Option: LaTeX-eqnarray-label - Prefix to use for `eqnarray' labels. - - -- User Option: LaTeX-amsmath-label - Prefix to use for amsmath equation labels. Amsmath equations - include `align', `alignat', `xalignat', `aligned', `flalign' and - `gather'. - - -File: auctex.info, Node: Floats, Next: Itemize-like, Prev: Equations, Up: Environments - -4.4.2 Floats ------------- - -Figures and tables (i.e., floats) may also be inserted using AUCTeX. -After choosing either `figure' or `table' in the environment list -described above, you will be prompted for a number of additional things. - -FLOAT POSITION - This is the optional argument of float environments that controls - how they are placed in the final document. In LaTeX this is a - sequence of the letters `htbp' as described in the LaTeX manual. - The value will default to the value of `LaTeX-float'. - -CAPTION - This is the caption of the float. The default is to insert the - caption at the bottom of the float. You can specify floats where - the caption should be placed at the top with - `LaTeX-top-caption-list'. - -LABEL - The label of this float. The label will have a default prefix, - which is controlled by the variables `LaTeX-figure-label' and - `LaTeX-table-label'. - - Moreover, you will be asked if you want the contents of the float -environment to be horizontally centered. Upon a positive answer a -`\centering' macro will be inserted at the beginning of the float -environment. - - -- User Option: LaTeX-float - Default placement for floats. - - -- User Option: LaTeX-figure-label - Prefix to use for figure labels. - - -- User Option: LaTeX-table-label - Prefix to use for table labels. - - -- User Option: LaTeX-top-caption-list - List of float environments with top caption. - - -File: auctex.info, Node: Itemize-like, Next: Tabular-like, Prev: Floats, Up: Environments - -4.4.3 Itemize-like ------------------- - -In an itemize-like environment, nodes (i.e., `\item's) may be inserted -using `C-c '. - - -- Command: LaTeX-insert-item - (`C-c ') Close the current item, move to the next line and - insert an appropriate `\item' for the current environment. That is, - `itemize' and `enumerate' will have `\item ' inserted, while - `description' will have `\item[]' inserted. - - -File: auctex.info, Node: Tabular-like, Next: Customizing environments, Prev: Itemize-like, Up: Environments - -4.4.4 Tabular-like ------------------- - -When inserting Tabular-like environments, that is, `tabular' `array' -etc., you will be prompted for a template for that environment. -Related variables: - - -- User Option: LaTeX-default-format - Default format string for array and tabular environments. - - -- User Option: LaTeX-default-position - Default position string for array and tabular environments. If - nil, act like the empty string is given, but don't prompt for a - position. - - -File: auctex.info, Node: Customizing environments, Prev: Tabular-like, Up: Environments - -4.4.5 Customizing environments ------------------------------- - -*Note Adding Environments::, for how to customize the list of known -environments. - - -File: auctex.info, Node: Advanced Features, Next: Display, Prev: Frequently Used Commands, Up: Top - -5 Advanced Editing Features -*************************** - -The previous chapter described how to write the main body of the text -easily and with a minimum of errors. In this chapter we will describe -some features for entering more specialized sorts of text, for -formatting the source by indenting and filling and for navigating -through the document. - -* Menu: - -* Mathematics:: Entering Mathematics -* Completion:: Completion of macros -* Commenting:: Commenting text -* Indenting:: Reflecting syntactic constructs with whitespace -* Filling:: Automatic and manual line breaking - - -File: auctex.info, Node: Mathematics, Next: Completion, Up: Advanced Features - -5.1 Entering Mathematics -======================== - -TeX is written by a mathematician, and has always contained good -support for formatting mathematical text. AUCTeX supports this -tradition, by offering a special minor mode for entering text with many -mathematical symbols. You can enter this mode by typing `C-c ~'. - - -- Command: LaTeX-math-mode - (`C-c ~') Toggle LaTeX Math mode. This is a minor mode rebinding - the key `LaTeX-math-abbrev-prefix' to allow easy typing of - mathematical symbols. ``' will read a character from the keyboard, - and insert the symbol as specified in `LaTeX-math-default' and - `LaTeX-math-list'. If given a prefix argument, the symbol will be - surrounded by dollar signs. - - You can use another prefix key (instead of ``') by setting the -variable `LaTeX-math-abbrev-prefix'. - - To enable LaTeX Math mode by default, add the following in your -`.emacs' file: - (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) - - -- User Option: LaTeX-math-abbrev-prefix - A string containing the prefix of `LaTeX-math-mode' commands; This - value defaults to ``'. - - The string has to be a key or key sequence in a format understood - by the `kbd' macro. This corresponds to the syntax usually used - in the manuals for Emacs Emacs Lisp. - - The variable `LaTeX-math-list' allows you to add your own mappings. - - -- User Option: LaTeX-math-list - A list containing user-defined keys and commands to be used in - LaTeX Math mode. Each entry should be a list of two to four - elements. - - First, the key to be used after `LaTeX-math-abbrev-prefix' for - macro insertion. If it is nil, the symbol has no associated - keystroke (it is available in the menu, though). - - Second, a string representing the name of the macro (without a - leading backslash.) - - Third, a string representing the name of a submenu the command - should be added to. Use a list of strings in case of nested menus. - - Fourth, the position of a Unicode character to be displayed in the - menu alongside the macro name. This is an integer value. - - -- User Option: LaTeX-math-menu-unicode - Whether the LaTeX menu should try using Unicode for effect. Your - Emacs built must be able to display include Unicode characters in - menus for this feature. - - AUCTeX's reference card `tex-ref.tex' includes a list of all math -mode commands. - - AUCTeX can help you write subscripts and superscripts in math -constructs by automatically inserting a pair of braces after typing <_> -or <^> respectively and putting point between the braces. In order to -enable this feature, set the variable -`TeX-electric-sub-and-superscript' to a non-nil value. - - -- User Option: TeX-electric-sub-and-superscript - If non-nil, insert braces after typing <^> and <_> in math mode. - - -File: auctex.info, Node: Completion, Next: Commenting, Prev: Mathematics, Up: Advanced Features - -5.2 Completion -============== - -Emacs lisp programmers probably know the `lisp-complete-symbol' -command, usually bound to `M-'. Users of the wonderful ispell -mode know and love the `ispell-complete-word' command from that -package. Similarly, AUCTeX has a `TeX-complete-symbol' command, -usually bound to `M-'. Using `LaTeX-complete-symbol' makes it -easier to type and remember the names of long LaTeX macros. - - In order to use `TeX-complete-symbol', you should write a backslash -and the start of the macro. Typing `M-' will now complete as much -of the macro, as it unambiguously can. For example, if you type -``\renewc'' and then `M-', it will expand to ``\renewcommand''. - - -- Command: TeX-complete-symbol - (`M-') Complete TeX symbol before point. - - A more direct way to insert a macro is with `TeX-insert-macro', -bound to `C-c C-m'. It has the advantage over completion that it knows -about the argument of most standard LaTeX macros, and will prompt for -them. It also knows about the type of the arguments, so it will for -example give completion for the argument to `\include'. Some examples -are listed below. - - -- Command: TeX-insert-macro - (`C-c C-m' or `C-c RET') Prompt (with completion) for the name of - a TeX macro, and if AUCTeX knows the macro, prompt for each - argument. - - As a default selection, AUCTeX will suggest the macro last inserted -or, as the first choice the value of the variable `TeX-default-macro'. - - -- User Option: TeX-insert-macro-default-style - Specifies whether `TeX-insert-macro' will ask for all optional - arguments. - - If set to the symbol `show-optional-args', `TeX-insert-macro' asks - for optional arguments of TeX macros. If set to - `mandatory-args-only', `TeX-insert-macro' asks only for mandatory - arguments. When `TeX-insert-macro' is called with prefix argument - (`C-u'), it's the other way round. - - Note that for some macros, there are special mechanisms, e.g. - `LaTeX-includegraphics-options-alist'. - - - -- User Option: TeX-default-macro - Default macro to insert when invoking `TeX-insert-macro' first - time. - - A faster alternative is to bind the function `TeX-electric-macro' to -`\'. This can be done by setting the variable `TeX-electric-escape' - - -- User Option: TeX-electric-escape - If this is non-nil when AUCTeX is loaded, the TeX escape character - `\' will be bound to `TeX-electric-macro' - - The difference between `TeX-insert-macro' and `TeX-electric-macro' -is that space will complete and exit from the minibuffer in -`TeX-electric-macro'. Use if you merely want to complete. - - -- Command: TeX-electric-macro - Prompt (with completion) for the name of a TeX macro, and if - AUCTeX knows the macro, prompt for each argument. Space will - complete and exit. - - By default AUCTeX will put an empty set braces `{}' after a macro -with no arguments to stop it from eating the next whitespace. This can -be stopped by entering `LaTeX-math-mode', *note Mathematics::, or by -setting `TeX-insert-braces' to nil. - - -- User Option: TeX-insert-braces - If non-nil, append a empty pair of braces after inserting a macro. - - Completions work because AUCTeX can analyze TeX files, and store -symbols in emacs lisp files for later retrieval. *Note Automatic::, for -more information. - - AUCTeX will also make completion for many macro arguments, for -example existing labels when you enter a `\ref' macro with -`TeX-insert-macro' or `TeX-electric-macro', and BibTeX entries when you -enter a `\cite' macro. For this kind of completion to work, parsing -must be enabled as described in *note Parsing Files::. For `\cite' you -must also make sure that the BibTeX files have been saved at least once -after you enabled automatic parsing on save, and that the basename of -the BibTeX file does not conflict with the basename of one of TeX files. - - -File: auctex.info, Node: Commenting, Next: Indenting, Prev: Completion, Up: Advanced Features - -5.3 Commenting -============== - -It is often necessary to comment out temporarily a region of TeX or -LaTeX code. This can be done with the commands `C-c ;' and `C-c %'. -`C-c ;' will comment out all lines in the current region, while `C-c %' -will comment out the current paragraph. Type `C-c ;' again to -uncomment all lines of a commented region, or `C-c %' again to -uncomment all comment lines around point. These commands will insert -or remove a single `%' respectively. - - -- Command: TeX-comment-or-uncomment-region - (`C-c ;') Add or remove `%' from the beginning of each line in the - current region. Uncommenting works only if the region encloses - solely commented lines. If AUCTeX should not try to guess if the - region should be commented or uncommented the commands - `TeX-comment-region' and `TeX-uncomment-region' can be used to - explicitly comment or uncomment the region in concern. - - -- Command: TeX-comment-or-uncomment-paragraph - (`C-c %') Add or remove `%' from the beginning of each line in the - current paragraph. When removing `%' characters the paragraph is - considered to consist of all preceding and succeeding lines - starting with a `%', until the first non-comment line. - - -File: auctex.info, Node: Indenting, Next: Filling, Prev: Commenting, Up: Advanced Features - -5.4 Indenting -============= - -Indentation means the addition of whitespace at the beginning of lines -to reflect special syntactical constructs. This makes it easier to see -the structure of the document, and to catch errors such as a missing -closing brace. Thus, the indentation is done for precisely the same -reasons that you would indent ordinary computer programs. - - Indentation is done by LaTeX environments and by TeX groups, that is -the body of an environment is indented by the value of -`LaTeX-indent-level' (default 2). Also, items of an `itemize-like' -environment are indented by the value of `LaTeX-item-indent', default --2. If more environments are nested, they are indented `accumulated' -just like most programming languages usually are seen indented in -nested constructs. - - You can explicitely indent single lines, usually by pressing , -or marked regions by calling `indent-region' on it. If you have -`auto-fill-mode' enabled and a line is broken while you type it, Emacs -automatically cares about the indentation in the following line. If -you want to have a similar behavior upon typing , you can -customize the variable `TeX-newline-function' and change the default of -`newline' which does no indentation to `newline-and-indent' which -indents the new line or `reindent-then-newline-and-indent' which -indents both the current and the new line. - - There are certain LaTeX environments which should be indented in a -special way, like `tabular' or `verbatim'. Those environments may be -specified in the variable `LaTeX-indent-environment-list' together with -their special indentation functions. Taking the `verbatim' environment -as an example you can see that `current-indentation' is used as the -indentation function. This will stop AUCTeX from doing any indentation -in the environment if you hit for example. - - There are environments in `LaTeX-indent-environment-list' which do -not bring a special indentation function with them. This is due to the -fact that first the respective functions are not implemented yet and -second that filling will be disabled for the specified environments. -This shall prevent the source code from being messed up by accidently -filling those environments with the standard filling routine. If you -think that providing special filling routines for such environments -would be an appropriate and challenging task for you, you are invited to -contribute. (*Note Filling::, for further information about the filling -functionality) - - The check for the indentation function may be enabled or disabled by -customizing the variable `LaTeX-indent-environment-check'. - - As a side note with regard to formatting special environments: Newer -Emacsen include `align.el' and therefore provide some support for -formatting `tabular' and `tabbing' environments with the function -`align-current' which will nicely align columns in the source code. - - AUCTeX is able to format commented parts of your code just as any -other part. This means LaTeX environments and TeX groups in comments -will be indented syntactically correct if the variable -`LaTeX-syntactic-comments' is set to t. If you disable it, comments -will be filled like normal text and no syntactic indentation will be -done. - - Following you will find a list of most commands and variables related -to indenting with a small summary in each case: - -`' - `LaTeX-indent-line' will indent the current line. - -`' - `newline-and-indent' inserts a new line (much like ) and - moves the cursor to an appropriate position by the left margin. - - Most keyboards nowadays don't have a linefeed key and `C-j' is - tedious to type. Therefore you can customize AUCTeX to perform - indentation (or to make coffee) upon typing as well. The - respective option is called `TeX-newline-function'. - -`C-j' - Alias for - - -- User Option: LaTeX-indent-environment-list - List of environments with special indentation. The second element - in each entry is the function to calculate the indentation level in - columns. - - The filling code currently cannot handle tabular-like environments - which will be completely messed-up if you try to format them. - This is why most of these environments are included in this - customization option without a special indentation function. This - will prevent that they get filled. - - -- User Option: LaTeX-indent-level - Number of spaces to add to the indentation for each `\begin' not - matched by a `\end'. - - -- User Option: LaTeX-item-indent - Number of spaces to add to the indentation for `\item''s in list - environments. - - -- User Option: TeX-brace-indent-level - Number of spaces to add to the indentation for each `{' not - matched by a `}'. - - -- User Option: LaTeX-syntactic-comments - If non-nil comments will be filled and indented according to LaTeX - syntax. Otherwise they will be filled like normal text. - - -- User Option: TeX-newline-function - Used to specify the function which is called when is pressed. - This will normally be `newline' which simply inserts a new line. - In case you want to have AUCTeX do indentation as well when you - press , use the built-in functions `newline-and-indent' or - `reindent-then-newline-and-indent'. The former inserts a new line - and indents the following line, i.e. it moves the cursor to the - right position and therefore acts as if you pressed . The - latter function additionally indents the current line. If you - choose `Other', you can specify your own fancy function to be - called when is pressed. - - -File: auctex.info, Node: Filling, Prev: Indenting, Up: Advanced Features - -5.5 Filling -=========== - -Filling deals with the insertion of line breaks to prevent lines from -becoming wider than what is specified in `fill-column'. The linebreaks -will be inserted automatically if `auto-fill-mode' is enabled. In this -case the source is not only filled but also indented automatically as -you write it. - - `auto-fill-mode' can be enabled for AUCTeX by calling -`turn-on-auto-fill' in one of the hooks AUCTeX is running. For all -text modes with `text-mode-hook', for all AUCTeX modes with -`TeX-mode-hook' or for specific modes with `plain-TeX-mode-hook', -`LaTeX-mode-hook', `ConTeXt-mode-hook' or `docTeX-mode-hook'. As an -example, if you want to enable `auto-fill-mode' in `LaTeX-mode', put the -following into your init file: - - (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) - - You can manually fill explicitely marked regions, paragraphs, -environments, complete sections, or the whole buffer. (Note that manual -filling in AUCTeX will indent the start of the region to be filled in -contrast to many other Emacs modes.) - - There are some syntactical constructs which are handled specially -with regard to filling. These are so-called code comments and paragraph -commands. - - Code comments are comments preceded by code or text in the same line. -Upon filling a region, code comments themselves will not get filled. -Filling is done from the start of the region to the line with the code -comment and continues after it. In order to prevent overfull lines in -the source code, a linebreak will be inserted before the last -non-comment word by default. This can be changed by customizing -`LaTeX-fill-break-before-code-comments'. If you have overfull lines -with code comments you can fill those explicitely by calling -`LaTeX-fill-paragraph' or pressing `M-q' with the cursor positioned on -them. This will add linebreaks in the comment and indent subsequent -comment lines to the column of the comment in the first line of the -code comment. In this special case `M-q' only acts on the current line -and not on the whole paragraph. - - Lines with `\par' are treated similarly to code comments, i.e. -`\par' will be treated as paragraph boundary which should not be -followed by other code or text. But it is not treated as a real -paragraph boundary like an empty line where filling a paragraph would -stop. - - Paragraph commands like `\section' or `\noindent' (the list of -commands is defined by `LaTeX-paragraph-commands') are often to be -placed in their own line(s). This means they should not be consecuted -with any preceding or following adjacent lines of text. AUCTeX will -prevent this from happening if you do not put any text except another -macro after the end of the last brace of the respective macro. If -there is other text after the macro, AUCTeX regards this as a sign that -the macro is part of the following paragraph. - - Here are some examples: - - \begin{quote} - text text text text - - \begin{quote}\label{foo} - text text text text - - If you press `M-q' on the first line in both examples, nothing will -change. But if you write - - \begin{quote} text - text text text text - - and press `M-q', you will get - - \begin{quote} text text text text text - - Besides code comments and paragraph commands, another speciality of -filling in AUCTeX involves commented lines. You should be aware that -these comments are treated as islands in the rest of the LaTeX code if -syntactic filling is enabled. This means, for example, if you try to -fill an environment with `LaTeX-fill-environment' and have the cursor -placed on a commented line which does not have a surrounding -environment inside the comment, AUCTeX will report an error. - - The relevant commands and variables with regard to filling are: - -`C-c C-q C-p' - `LaTeX-fill-paragraph' will fill and indent the current paragraph. - -`M-q' - Alias for `C-c C-q C-p' - -`C-c C-q C-e' - `LaTeX-fill-environment' will fill and indent the current - environment. This may e.g. be the `document' environment, in - which case the entire document will be formatted. - -`C-c C-q C-s' - `LaTeX-fill-section' will fill and indent the current logical - sectional unit. - -`C-c C-q C-r' - `LaTeX-fill-region' will fill and indent the current region. - - -- User Option: LaTeX-fill-break-at-separators - List of separators before or after which respectively linebreaks - will be inserted if they do not fit into one line. The separators - can be curly braces, brackets, switches for inline math (`$', `\(', - `\)') and switches for display math (`\[', `\]'). Such formatting - can be useful to make macros and math more visible or to prevent - overfull lines in the LaTeX source in case a package for - displaying formatted TeX output inside the Emacs buffer, like - preview-latex, is used. - - -- User Option: LaTeX-fill-break-before-code-comments - Code comments are comments preceded by some other text in the same - line. When a paragraph containing such a comment is to be filled, - the comment start will be seen as a border after which no line - breaks will be inserted in the same line. If the option - `LaTeX-fill-break-before-code-comments' is enabled (which is the - default) and the comment does not fit into the line, a line break - will be inserted before the last non-comment word to minimize the - chance that the line becomes overfull. - - -File: auctex.info, Node: Display, Next: Running TeX and friends, Prev: Advanced Features, Up: Top - -6 Controlling Screen Display -**************************** - -It is often desirable to get visual help of what markup code in a text -actually does whithout having to decipher it explicitely. For this -purpose Emacs and AUCTeX provide font locking (also known as syntax -highlighting) which visually sets off markup code like macros or -environments by using different colors or fonts. For example text to be -typeset in italics can be displayed with an italic font in the editor as -well, or labels and references get their own distinct color. - - While font locking helps you grasp the purpose of markup code and -separate markup from content, the markup code can still be distracting. -AUCTeX lets you hide those parts and show them again at request with -its built-in support for hiding macros and environments which we call -folding here. - - Besides folding of macros and environments, AUCTeX provides support -for Emacs' outline mode which lets you narrow the buffer content to -certain sections of your text by hiding the parts not belonging to these -sections. - -* Menu: - -* Font Locking:: Font Locking -* Folding:: Folding Macros and Environments -* Outline:: Outlining the Document - - -File: auctex.info, Node: Font Locking, Next: Folding, Up: Display - -6.1 Font Locking -================ - -Font locking is supposed to improve readability of the source code by -highlighting certain keywords with different colors or fonts. It -thereby lets you recognize the function of markup code to a certain -extent without having to read the markup command. For general -information on controlling font locking with Emacs' Font Lock mode, see -*note Font Lock Mode: (emacs)Font Lock. - - -- User Option: TeX-install-font-lock - Once font locking is enabled globally or for the major modes - provided by AUCTeX, the font locking patterns and functionality of - font-latex are activated by default. You can switch to a - different font locking scheme or disable font locking in AUCTeX by - customizing the variable `TeX-install-font-lock'. - - Besides font-latex AUCTeX ships with a scheme which is derived - from Emacs' default LaTeX mode and activated by choosing - `tex-font-setup'. Be aware that this scheme is not coupled with - AUCTeX's style system and not the focus of development. Therefore - and due to font-latex being much more feature-rich the following - explanations will only cover font-latex. - - In case you want to hook in your own fontification scheme, you can - choose `other' and insert the name of the function which sets up - your font locking patterns. If you want to disable fontification - in AUCTeX completely, choose `ignore'. - - font-latex provides many options for customization which are -accessible with `M-x customize-group RET font-latex RET'. For this -description the various options are explained in conceptional groups. - -Macros -====== - -Highlighting of macros can be customized by adapting keyword lists which -can be found in the customization group `font-latex-keywords'. The -lists contain names of macros without the leading backslash. - - Three types of macros can be handled differently with respect to -fontification: - - 1. Commands of the form `\foo[bar]{baz}' which consist of the macro - itself, optional arguments in square brackets and mandatory - arguments in curly braces. For the command itself the face - `font-lock-keyword-face' will be used and for the optional - arguments the face `font-lock-variable-name-face'. The face - applied to the mandatory argument depends on the macro class - represented by the respective built-in variables. - - 2. Declaration macros of the form `{\foo text}' which consist of the - macro which may be enclosed in a TeX group together with text to be - affected by the macro. In case a TeX group is present, the macro - will get the face `font-lock-keyword-face' and the text will get - the face configured for the respective macro class. If no TeX - group is present, the latter face will be applied to the macro - itself. - - 3. Simple macros of the form `\foo' which do not have any arguments or - groupings. The respective face will be applied to the macro - itself. - -General macro classes ---------------------- - -font-latex provides keyword lists for different macro classes which are -described in the following table: - -`font-latex-match-function-keywords' - Keywords for macros defining or related to functions, like - `\newcommand'. - Type: `\macro[...]{...}' - Face: `font-lock-function-name-face' - -`font-latex-match-reference-keywords' - Keywords for macros defining or related to references, like `\ref'. - Type: `\macro[...]{...}' - Face: `font-lock-constant-face' - -`font-latex-match-textual-keywords' - Keywords for macros specifying textual content, like `\caption'. - Type: `\macro[...]{...}' - Face: `font-lock-type-face' - -`font-latex-match-variable-keywords' - Keywords for macros defining or related to variables, like - `\setlength'. - Type: `\macro[...]{...}{...}' - Face: `font-lock-variable-name-face' - -`font-latex-match-warning-keywords' - Keywords for important macros, e.g. affecting line or page break, - like `\clearpage'. - Type: `\macro' - Face: `font-latex-warning-face' - -Sectioning commands -------------------- - -Sectioning commands are macros like `\chapter' or `\section'. For -these commands there are two fontification schemes which may be -selected by customizing the variable `font-latex-fontify-sectioning'. - - -- User Option: font-latex-fontify-sectioning - Per default sectioning commands will be shown in a larger, - proportional font, which corresponds to a number for this - variable. The font size varies with the sectioning level, e.g. - `\part' (`font-latex-sectioning-0-face') has a larger font than - `\paragraph' (`font-latex-sectioning-5-face'). Typically, values - from 1.05 to 1.3 for `font-latex-fontify-sectioning' give best - results, depending on your font setup. If you rather like to use - the base font and a different color, set the variable to the symbol - `color'. In this case the face `font-lock-type-face' will be used - to fontify the argument of the sectioning commands. - - You can make font-latex aware of your own sectioning commands be -adding them to the keyword lists: -`font-latex-match-sectioning-0-keywords' -(`font-latex-sectioning-0-face') ... -`font-latex-match-sectioning-5-keywords' -(`font-latex-sectioning-5-face'). - - Related to sectioning there is special support for slide titles which -may be fontified with the face `font-latex-slide-title-face'. You can -add macros which should appear in this face by customizing the variable -`font-latex-match-slide-title-keywords'. - -Commands for changing fonts ---------------------------- - -LaTeX provides various macros for changing fonts or font attributes. -For example, you can select an italic font with `\textit{...}' or bold -with `\textbf{...}'. An alternative way to specify these fonts is to -use special macros in TeX groups, like `{\itshape ...}' for italics and -`{\bfseries ...}' for bold. As mentioned above, we call the former -variants commands and the latter declarations. - - Besides the macros for changing fonts provided by LaTeX there is an -infinite number of other macros--either defined by yourself for logical -markup or defined by macro packages--which affect the font in the -typeset text. While LaTeX's built-in macros and macros of packages -known by AUCTeX are already handled by font-latex, different keyword -lists per type style and macro type are provided for entering your own -macros which are listed in the table below. - -`font-latex-match-bold-command-keywords' - Keywords for commands specifying a bold type style. - Face: `font-latex-bold-face' - -`font-latex-match-italic-command-keywords' - Keywords for commands specifying an italic font. - Face: `font-latex-italic-face' - -`font-latex-match-math-command-keywords' - Keywords for commands specifying a math font. - Face: `font-latex-math-face' - -`font-latex-match-type-command-keywords' - Keywords for commands specifying a typewriter font. - Face: `font-lock-type-face' - -`font-latex-match-bold-declaration-keywords' - Keywords for declarations specifying a bold type style. - Face: `font-latex-bold-face' - -`font-latex-match-italic-declaration-keywords' - Keywords for declarations specifying an italic font. - Face: `font-latex-italic-face' - -`font-latex-match-type-declaration-keywords' - Keywords for declarations specifying a typewriter font. - Face: `font-latex-type-face' - -Deactivating defaults of built-in keyword classes -------------------------------------------------- - -font-latex ships with predefined lists of keywords for the classes -described above. You can disable these defaults per class by -customizing the variable `font-latex-deactivated-keyword-classes'. -This is a list of strings for keyword classes to be deactivated. Valid -entries are \"warning\", \"variable\", \"reference\", \"function\" , -\"sectioning-0\", \"sectioning-1\", \"sectioning-2\", \"sectioning-3\", -\"sectioning-4\", \"sectioning-5\", \"textual\", \"bold-command\", -\"italic-command\", \"math-command\", \"type-command\", -\"bold-declaration\", \"italic-declaration\", \"type-declaration\". - - You can also get rid of certain keywords only. For example if you -want to remove highlighting of footnotes as references you can put the -following stanza into your init file: - - (eval-after-load "font-latex" - '(setq-default - font-latex-match-reference-keywords-local - (remove "footnote" font-latex-match-reference-keywords-local))) - - But note that this means fiddling with font-latex's internals and is -not guaranteed to work in future versions of font-latex. - -User-defined keyword classes ----------------------------- - -In case the customization options explained above do not suffice for -your needs, you can specify your own keyword classes by customizing the -variable `font-latex-user-keyword-classes'. - - -- User Option: font-latex-user-keyword-classes - Every keyword class consists of four parts, a name, a list of - keywords, a face and a specifier for the type of macros to be - highlighted. - - When adding new entries, you have to use unique values for the - class names, i.e. they must not clash with names of the built-in - keyword classes or other names given by you. Additionally the - names must not contain spaces. - - The keywords are names of commands you want to match omitting the - leading backslash. - - The face argument can either be an existing face or font - specifications made by you. (The latter option is not available - on XEmacs.) - - There are three alternatives for the type of keywords--"Command - with arguments", "Declaration inside TeX group" and "Command - without arguments"--which correspond with the macro types - explained above. - -Quotes -====== - -Text in quotation marks is displayed with the face -`font-latex-string-face'. Besides the various forms of opening and -closing double and single quotation marks, so-called guillemets (<<, >>) -can be used for quoting. Because there are two styles of using -them--French style: << text >>; German style: >>text<<--you can -customize the variable `font-latex-quotes' to tell font-latex which -type you are using if the correct value cannot be derived from document -properties. - - -- User Option: font-latex-quotes - The default value of `font-latex-quotes' is `auto' which means - that font-latex will try to derive the correct type of quotation - mark matching from document properties like the language option - supplied to the babel LaTeX package. - - If the automatic detection fails for you and you mostly use one - specific style you can set it to a specific language-dependent - value as well. Set the value to `german' if you are using - >>German quotes<< and to `french' if you are using << French - quotes >>. font-latex will recognize the different ways these - quotes can be given in your source code, i.e. (`"<', `">'), (`<<', - `>>') and the respective 8-bit variants. - - If you set `font-latex-quotes' to nil, quoted content will not be - fontified. - -Subscript and superscript in math -================================= - -In order to make math constructs more readable, font-latex displays -subscript and superscript parts in a smaller font and raised or lowered -respectively. This fontification feature can be controlled with the -variables `font-latex-fontify-script' and `font-latex-script-display'. - - -- User Option: font-latex-fontify-script - If non-nil, fontify subscript and superscript strings. - - Note that this feature is not available on XEmacs, for which it is - disabled per default. In GNU Emacs raising and lowering is not - enabled for versions 21.3 and before due to it working not - properly. - - -- User Option: font-latex-script-display - Display specification for subscript and superscript content. The - car is used for subscript, the cdr is used for superscript. The - feature is implemented using so-called display properties. For - information on what exactly to specify for the values, see *note - Other Display Specifications: (elisp)Other Display Specs. - -Verbatim macros and environments -================================ - -Usually it is not desirable to have content to be typeset verbatim -highlighted according to LaTeX syntax. Therefore this content will be -fontified uniformly with the face `font-latex-verbatim-face'. - - font-latex differentiates three different types of verbatim -constructs for fontification. Macros with special characters like | as -delimiters, macros with braces, and environments. Which macros and -environments are recognized is controlled by the variables -`LaTeX-verbatim-macros-with-delims', -`LaTeX-verbatim-macros-with-braces', and `LaTeX-verbatim-environments' -respectively. - -Multi-line fontification -======================== - -Font locking in LaTeX source code often involves constructs spanning -more than one line of text. For these constructs to be handled -correctly GNU Emacs as well as font-latex provide mechanisms for -multi-line fontification which can be controlled by the variable -`font-latex-do-multi-line'. - - -- User Option: font-latex-do-multi-line - Control multi-line fontification. - - Setting the variable to t will enable font-latex's mechanism, - setting it to nil will disable it. Setting it to `try-font-lock' - (the default) will use font-lock's mechanism if available and - font-latex's method if not. - - Setting this variable will only have effect after resetting buffers - controlled by font-latex or restarting Emacs. - -Faces -===== - -In case you want to change the colors and fonts used by font-latex -please refer to the faces mentioned in the explanations above and use -`M-x customize-face RET RET'. All faces defined by font-latex -are accessible through a customization group by typing `M-x -customize-group RET font-latex-highlighting-faces RET'. - - -File: auctex.info, Node: Folding, Next: Outline, Prev: Font Locking, Up: Display - -6.2 Folding Macros and Environments -=================================== - -A popular complaint about markup languages like TeX and LaTeX is that -there is too much clutter in the source text and that one cannot focus -well on the content. There are macros where you are only interested in -the content they are enclosing, like font specifiers where the content -might already be fontified in a special way by font locking. Or macros -the content of which you only want to see when actually editing it, -like footnotes or citations. Similarly you might find certain -environments or comments distracting when trying to concentrate on the -body of your document. - - With AUCTeX's folding functionality you can collapse those items and -replace them by either a fixed string or the content of one of their -arguments instead. If you want to make the original text visible again -in order to view or edit it, move point sideways onto the placeholder -(also called display string) or left-click with the mouse pointer on it. -(The latter is currently only supported on Emacs.) The macro or -environment will unfold automatically, stay open as long as point is -inside of it and collapse again once you move point out of it. (Note -that folding of environments currently does not work in every AUCTeX -mode.) - - In order to use this feature, you have to activate `TeX-fold-mode' -which will activate the auto-reveal feature and the necessary commands -to hide and show macros and environments. You can activate the mode in -a certain buffer by typing the command `M-x TeX-fold-mode RET' or using -the keyboard shortcut `C-c C-o C-f'. If you want to use it every time -you edit a LaTeX document, add it to a hook: - - (add-hook 'LaTeX-mode-hook (lambda () - (TeX-fold-mode 1))) - - If it should be activated in all AUCTeX modes, use `TeX-mode-hook' -instead of `LaTeX-mode-hook'. - - Once the mode is active there are several commands available to hide -and show macros, environments and comments: - - -- Command: TeX-fold-buffer - (`C-c C-o C-b') Hide all foldable items in the current buffer - according to the setting of `TeX-fold-type-list'. This command can - also be used to refresh the whole buffer and hide any new macros - and environments which were inserted after the last invocation of - the command. - - -- User Option: TeX-fold-type-list - List of symbols determining the item classes to consider for - folding. This can be macros, environments and comments. Per - default only macros and environments are folded. - - -- User Option: TeX-fold-force-fontify - In order for all folded content to get the right faces, the whole - buffer has to be fontified before folding is carried out. - `TeX-fold-buffer' therefore will force fontification of unfontified - regions. As this will prolong the time folding takes, you can - prevent forced fontification by customizing the variable - `TeX-fold-force-fontify'. - - -- User Option: TeX-fold-preserve-comments - By default items found in comments will be folded. If your - comments often contain unfinished code this might lead to - problems. Give this variable a non-nil value and foldable items - in your comments will be left alone. - - -- Command: TeX-fold-region - (`C-c C-o C-r') Hide all configured macros in the marked region. - - -- Command: TeX-fold-paragraph - (`C-c C-o C-p') Hide all configured macros in the paragraph - containing point. - - -- Command: TeX-fold-macro - (`C-c C-o C-m') Hide the macro on which point currently is located. - If the name of the macro is found in `TeX-fold-macro-spec-list', - the respective display string will be shown instead. If it is not - found, the name of the macro in sqare brackets or the default - string for unspecified macros - (`TeX-fold-unspec-macro-display-string') will be shown, depending - on the value of the variable `TeX-fold-unspec-use-name'. - - -- Command: TeX-fold-env - (`C-c C-o C-e') Hide the environment on which point currently is - located. The behavior regarding the display string is analogous to - `TeX-fold-macro' and determined by the variables - `TeX-fold-env-spec-list' and `TeX-fold-unspec-env-display-string' - respectively. - - -- Command: TeX-fold-comment - (`C-c C-o C-c') Hide the comment point is located on. - - -- Command: TeX-fold-clearout-buffer - (`C-c C-o b') Permanently unfold all macros and environments in the - current buffer. - - -- Command: TeX-fold-clearout-region - (`C-c C-o r') Permanently unfold all macros and environments in the - marked region. - - -- Command: TeX-fold-clearout-paragraph - (`C-c C-o p') Permanently unfold all macros and environments in the - paragraph containing point. - - -- Command: TeX-fold-clearout-item - (`C-c C-o i') Permanently show the macro or environment on which - point currently is located. In contrast to temporarily opening the - macro when point is moved sideways onto it, the macro will be - permanently unfolded and will not collapse again once point is - leaving it. - - -- Command: TeX-fold-dwim - (`C-c C-o C-o') Hide or show items according to the current - context. If there is folded content, unfold it. If there is a - marked region, fold all configured content in this region. If - there is no folded content but a macro or environment, fold it. - - The commands above will only take macros or environments into -consideration which are specified in the variable -`TeX-fold-macro-spec-list' or `TeX-fold-env-spec-list' respectively. - - -- User Option: TeX-fold-macro-spec-list - List of display strings or argument numbers and macros to fold. - If you specify a number, the content of the first mandatory - argument of a LaTeX macro will be used as the placeholder. - - The placeholder is made by copying the text from the buffer - together with its properties, i.e. its face as well. If - fontification has not happened when this is done (e.g. because of - lazy font locking) the intended fontification will not show up. - As a workaround you can leave Emacs idle a few seconds and wait - for stealth font locking to finish before you fold the buffer. Or - you just re-fold the buffer with `TeX-fold-buffer' when you notice - a wrong fontification. - - -- User Option: TeX-fold-env-spec-list - List of display strings or argument numbers and environments to - fold. Argument numbers refer to the `\begin' statement. That - means if you have e.g. `\begin{tabularx}{\linewidth}{XXX} ... - \end{tabularx}' and specify 3 as the argument number, the resulting - display string will be "XXX". - - -- User Option: TeX-fold-unspec-macro-display-string - Default display string for macros which are not specified in - `TeX-fold-macro-spec-list'. - - -- User Option: TeX-fold-unspec-env-display-string - Default display string for environments which are not specified in - `TeX-fold-env-spec-list'. - - -- User Option: TeX-fold-unspec-use-name - If non-nil the name of the macro or environment surrounded by - square brackets is used as display string, otherwise the defaults - specified in `TeX-fold-unspec-macro-display-string' or - `TeX-fold-unspec-env-display-string' respectively. - - When you hover with the mouse pointer over folded content, its -original text will be shown in a tooltip or the echo area depending on -Tooltip mode being activate. In order to avoid exorbitantly big -tooltips and to cater for the limited space in the echo area the -content will be cropped after a certain amount of characters defined by -the variable `TeX-fold-help-echo-max-length'. - - -- User Option: TeX-fold-help-echo-max-length - Maximum length of original text displayed in a tooltip or the echo - area for folded content. Set it to zero in order to disable this - feature. - - -File: auctex.info, Node: Outline, Prev: Folding, Up: Display - -6.3 Outlining the Document -========================== - -AUCTeX supports the standard outline minor mode using LaTeX/ConTeXt -sectioning commands as header lines. *Note Outline Mode: -(emacs)Outline Mode. - - You can add your own headings by setting the variable -`TeX-outline-extra'. - - -- Variable: TeX-outline-extra - List of extra TeX outline levels. - - Each element is a list with two entries. The first entry is the - regular expression matching a header, and the second is the level - of the header. A `^' is automatically prepended to the regular - expressions in the list, so they must match text at the beginning - of the line. - - See `LaTeX-section-list' or `ConTeXt-INTERFACE-section-list' for - existing header levels. - - The following example add `\item' and `\bibliography' headers, with -`\bibliography' at the same outline level as `\section', and `\item' -being below `\subparagraph'. - - (setq TeX-outline-extra - '(("[ \t]*\\\\\\(bib\\)?item\\b" 7) - ("\\\\bibliography\\b" 2))) - - You may want to check out the unbundled `out-xtra' package for even -better outline support. It is available from your favorite emacs lisp -archive. - - -File: auctex.info, Node: Running TeX and friends, Next: Multifile, Prev: Display, Up: Top - -7 Starting Processors, Viewers and Other Programs -************************************************* - -The most powerful features of AUCTeX may be those allowing you to run -(La)TeX/ConTeXt and other external commands like BibTeX and `makeindex' -from within Emacs, viewing and printing the results, and moreover -allowing you to _debug_ your documents. - - AUCTeX comes with a special tool bar for TeX and LaTeX which -provides buttons for the most important commands. You can enable or -disable it by customizing the options `plain-TeX-enable-toolbar' and -`LaTeX-enable-toolbar' in the `TeX-tool-bar' customization group. - -* Menu: - -* Commands:: Invoking external commands. -* Viewing:: Invoking external viewers. -* Debugging:: Debugging TeX and LaTeX output. -* Checking:: Checking the document. -* Control:: Controlling the processes. -* Cleaning:: Cleaning intermediate and output files. -* Documentation:: Documentation about macros and packages. - - -File: auctex.info, Node: Commands, Next: Viewing, Up: Running TeX and friends - -7.1 Executing Commands -====================== - -Formatting the document with TeX, LaTeX or ConTeXt, viewing with a -previewer, printing the document, running BibTeX, making an index, or -checking the document with `lacheck' or `chktex' all require running an -external command. - - There are two ways to run an external command, you can either run it -on all of the current documents with `TeX-command-master', or on the -current region with `TeX-command-region'. A special case of running -TeX on a region is `TeX-command-buffer' which differs from -`TeX-command-master' if the current buffer is not its own master file. - - -- Command: TeX-command-master - (`C-c C-c') Query the user for a command, and run it on the master - file associated with the current buffer. The name of the master - file is controlled by the variable `TeX-master'. The available - commands are controlled by the variable `TeX-command-list'. - - *Note Installation::, for a discussion about `TeX-command-list' and -*note Multifile:: for a discussion about `TeX-master'. - - -- Command: TeX-command-region - (`C-c C-r') Query the user for a command, and run it on the "region - file". Some commands (typically those invoking TeX or LaTeX) will - write the current region into the region file, after extracting the - header and trailer from the master file. If mark is inactive - (which can happen with `transient-mark-mode'), use the old region. - The name of the region file is controlled by the variable - `TeX-region'. The name of the master file is controlled by the - variable `TeX-master'. The header is all text up to the line - matching the regular expression `TeX-header-end'. The trailer is - all text from the line matching the regular expression - `TeX-trailer-start'. The available commands are controlled by the - variable `TeX-command-list'. - - -- Command: TeX-pin-region - (`C-c C-t C-r') If you don't have a mode like - `transient-mark-mode' active, where marks get disabled - automatically, the region would need to get properly set before - each call to `TeX-command-region'. If you fix the current region - with `C-c C-t C-r', then it will get used for more commands even - though mark and point may change. An explicitly activated mark, - however, will always define a new region when calling - `TeX-command-region'. - - -- Command: TeX-command-buffer - (`C-c C-b') Query the user for a command, and run it on the "region - file". Some commands (typically those invoking TeX or LaTeX) will - write the current buffer into the region file, after extracting the - header and trailer from the master file. See above for details. - - AUCTeX will allow one process for each document, plus one process -for the region file to be active at the same time. Thus, if you are -editing N different documents, you can have N plus one processes -running at the same time. If the last process you started was on the -region, the commands described in *note Debugging:: and *note Control:: -will work on that process, otherwise they will work on the process -associated with the current document. - - -- User Option: TeX-region - The name of the file for temporarily storing the text when - formatting the current region. - - -- User Option: TeX-header-end - A regular expression matching the end of the header. By default, - this is `\begin{document}' in LaTeX mode and `%**end of header' in - TeX mode. - - -- User Option: TeX-trailer-start - A regular expression matching the start of the trailer. By - default, this is `\end{document}' in LaTeX mode and `\bye' in TeX - mode. - - AUCTeX will try to guess what command you want to invoke, but by -default it will assume that you want to run TeX in TeX mode and LaTeX -in LaTeX mode. You can overwrite this by setting the variable -`TeX-command-default'. - - -- User Option: TeX-command-default - The default command to run in this buffer. Must be an entry in - `TeX-command-list'. - - If you want to overwrite the values of `TeX-header-end', -`TeX-trailer-start', or `TeX-command-default', you can do that for all -files by setting them in either `TeX-mode-hook', `plain-TeX-mode-hook', -or `LaTeX-mode-hook'. To overwrite them for a single file, define them -as file variables (*note File Variables: (emacs)File Variables.). You -do this by putting special formatted text near the end of the file. - - %%% Local Variables: - %%% TeX-header-end: "% End-Of-Header" - %%% TeX-trailer-start: "% Start-Of-Trailer" - %%% TeX-command-default: "SliTeX" - %%% End: - - AUCTeX will try to save any buffers related to the document, and -check if the document needs to be reformatted. If the variable -`TeX-save-query' is non-nil, AUCTeX will query before saving each file. -By default AUCTeX will check emacs buffers associated with files in the -current directory, in one of the `TeX-macro-private' directories, and -in the `TeX-macro-global' directories. You can change this by setting -the variable `TeX-check-path'. - - -- User Option: TeX-check-path - Directory path to search for dependencies. - - If nil, just check the current file. Used when checking if any - files have changed. - - There are some options you can customize affecting which processors -are invoked or the way this is done and which output they produce as a -result. These options control if DVI or PDF output should be produced, -if TeX should be started in interactive or nonstop mode, if Source -Specials should be included in the DVI output for making inverse and -forward search possible or if Omega processors should be used instead -of regular TeX. - - -- Command: TeX-PDF-mode - (`C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a - buffer-local minor mode. You can customize `TeX-PDF-mode' to give - it a different default. The default is used when AUCTeX does not - have additional clue about what a document might want. This - option usually results in calling either PDFTeX or ordinary TeX. - - -- User Option: TeX-DVI-via-PDFTeX - If this is set, DVI will also be produced by calling PDFTeX, - setting `\pdfoutput=0'. This makes it possible to use PDFTeX - features like character protrusion even when producing DVI files. - Contemporary TeX distributions do this anyway, so that you need - not enable the option within AUCTeX. - - -- Command: TeX-interactive-mode - (`C-c C-t C-i') This command toggles the interactive mode of - AUCTeX, a global minor mode. You can customize - `TeX-interactive-mode' to give it a different default. In - interactive mode, TeX will pause with an error prompt when errors - are encountered and wait for the user to type something. - - -- Command: TeX-source-specials-mode - (`C-c C-t C-s') toggles Source Special support. Source Specials - will move the DVI viewer to the location corresponding to point - (forward search), and it will use `emacsclient' or `gnuclient' to - have the previewer move Emacs to a location corresponding to a - control-click in the previewer window. *Note Viewing::. - - You can permanently activate `TeX-source-specials-mode' with - (TeX-source-specials-mode 1) - or by customizing the variable `TeX-source-specials-mode'. There - is a bunch of customization options, use `customize-group' on the - group `TeX-source-specials' to find out more. - - It has to be stressed _very_ strongly however, that Source Specials - can cause differences in page breaks, in spacing, can seriously - interfere with various packages and should thus _never_ be used for - the final version of a document. In particular, fine-tuning the - page breaks should be done with Source Specials switched off. - - -- Command: TeX-Omega-mode - (`C-c C-t C-o') This command toggles the use of the Omega mode of - AUCTeX, a buffer-local minor mode. If it is switched on, `omega' - will be used instead of `tex', and `lambda' instead of `latex'. - - You can customize AUCTeX to show the processor output as it is -produced. - - -- User Option: TeX-show-compilation - If non-nil, the output of TeX compilation is shown in another - window. - - -File: auctex.info, Node: Viewing, Next: Debugging, Prev: Commands, Up: Running TeX and friends - -7.2 Viewing the formatted output -================================ - -7.2.1 Starting viewers and customizing their invocation -------------------------------------------------------- - -AUCTeX allows you to start external programs for previewing your -document. These are normally invoked by pressing `C-c C-c' once the -document is formatted or via the respective entry in the Command menu. - - AUCTeX will try to guess which type of viewer (DVI, PostScript or -PDF) has to be used and what options are to be passed over to it. This -decision is based on the output files present in the working directory -as well as the class and style options used in the document. For -example, if there is a DVI file in your working directory, a DVI viewer -will be invoked. In case of a PDF file it will be a PDF viewer. If -you specified a special paper format like `a5paper' or use the -`landscape' option, this will be passed to the viewer by the -appropriate options. Especially some DVI viewers depend on this kind -of information in order to display your document correctly. In case -you are using `pstricks' or `psfrag' in your document, a DVI viewer -cannot display the contents correctly and a PostScript viewer will be -invoked instead. - - The information about which file types and style options are -associated with which viewers and options for them is stored in the -variables `TeX-output-view-style' and `TeX-view-style'. - - -- Command: TeX-view - The command `TeX-view', bound to `C-c C-v', starts a viewer - without confirmation. The viewer is started either on a region or - the master file, depending on the last command issued. This is - especially useful for jumping to the location corresponding to - point in the DVI viewer when using `TeX-source-specials-mode'. - - -- User Option: TeX-output-view-style - List of output file extensions, style options and view options. - - -- User Option: TeX-view-style - List of style options and view options. This is the predecessor of - `TeX-output-view-style' which does not allow the specification of - output file extensions. It is used as a fallback in case none of - the alternatives specified in `TeX-output-view-style' match. In - case none of the entries in `TeX-view-style' match either, no - suggestion for a viewer will be made. - -7.2.2 Forward and inverse search --------------------------------- - -You can make use of forward and inverse searching if this is supported -by your DVI viewer and you enabled `TeX-source-specials-mode'. *Note -Commands::, on how to do that. AUCTeX will automatically pass the -necessary command line options to the viewer in order to display the -page containing the content you are currently editing (forward search). - - Upon opening the viewer you will be asked if you want to start a -server process (Gnuserv or Emacs server) which is necessary for inverse -search. This happens only if there is no server running already. You -can customize the variable `TeX-source-specials-view-start-server' to -inhibit the question and always or never start the server respectively. - - -- User Option: TeX-source-specials-view-start-server - If `TeX-source-specials-mode' is active and a DVI viewer is - invoked, the default behavior is to ask if a server process should - be started. Set this variable to `t' if the question should be - inhibited and the server should always be started. Set it to `nil' - if the server should never be started. Inverse search will not be - available in the latter case. - - Once the server and the viewer are running you can use a mouse click -in the viewer to jump to the corresponding part of your document in -Emacs (inverse search). Refer to the documentation of your viewer to -find out what you have to do exactly. In xdvi you usually have to use -`C-down-mouse-1'. - - For PDF output, forward search is availabe when using the pdfsync -LaTeX package and xpdf as PDF viewer. With the pdfsync package forward -search does not rely on source specials. Therefore you don't have to -bother about the provisions for source specials explained above. If -document parsing is enabled, the functionality is usable immediately, -e.g. by typing `C-c C-v' (`TeX-view') which will open the viewer or -bring it to front if it is already opened and display the output page -corresponding to the position of point in the source file. - - -File: auctex.info, Node: Debugging, Next: Checking, Prev: Viewing, Up: Running TeX and friends - -7.3 Catching the errors -======================= - -Once you've formatted your document you may `debug' it, i.e. browse -through the errors (La)TeX reported. - - -- Command: TeX-next-error - (`C-c `') Go to the next error reported by TeX. The view will be - split in two, with the cursor placed as close as possible to the - error in the top view. In the bottom view, the error message will - be displayed along with some explanatory text. - - Normally AUCTeX will only report real errors, but you may as well -ask it to report `bad boxes' and warnings as well. - - -- Command: TeX-toggle-debug-bad-boxes - (`C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes - (i.e. overfull and underfull boxes) as well as normal errors. - - -- Command: TeX-toggle-debug-warnings - (`C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as - well as normal errors. - - As default, AUCTeX will display a special help buffer containing the -error reported by TeX along with the documentation. There is however -an `expert' option, which allows you to display the real TeX output. - - -- User Option: TeX-display-help - If t AUCTeX will automatically display a help text whenever an - error is encountered using `TeX-next-error' (`C-c `'). If nil a - terse information about the error is displayed in the echo area. - If `expert' AUCTeX will display the output buffer with the raw TeX - output. - - -File: auctex.info, Node: Checking, Next: Control, Prev: Debugging, Up: Running TeX and friends - -7.4 Checking for problems -========================= - -Running TeX or LaTeX will only find regular errors in the document, not -examples of bad style. Furthermore, description of the errors may -often be confusing. The utility `lacheck' can be used to find style -errors, such as forgetting to escape the space after an abbreviation or -using `...' instead of `\ldots' and many other problems like that. You -start `lacheck' with `C-c C-c Check '. The result will be a list -of errors in the `*compilation*' buffer. You can go through the errors -with `C-x `' (`next-error', *note Compilation: (emacs)Compilation.), -which will move point to the location of the next error. - - Another newer program which can be used to find errors is `chktex'. -It is much more configurable than `lacheck', but doesn't find all the -problems `lacheck' does, at least in its default configuration. You -must install the programs before using them, and for `chktex' you may -also need modify `TeX-command-list' unless you use its `lacheck' -compatibility wrapper. You can get `lacheck' from -`' or -alternatively `chktex' from -`'. - - -File: auctex.info, Node: Control, Next: Cleaning, Prev: Checking, Up: Running TeX and friends - -7.5 Controlling the output -========================== - -A number of commands are available for controlling the output of an -application running under AUCTeX - - -- Command: TeX-kill-job - (`C-c C-k') Kill currently running external application. This - may be either of TeX, LaTeX, previewer, BibTeX, etc. - - -- Command: TeX-recenter-output-buffer - (`C-c C-l') Recenter the output buffer so that the bottom line is - visible. - - -- Command: TeX-home-buffer - (`C-c ^') Go to the `master' file in the document associated with - the current buffer, or if already there, to the file where the - current process was started. - - -File: auctex.info, Node: Cleaning, Next: Documentation, Prev: Control, Up: Running TeX and friends - -7.6 Cleaning intermediate and output files -========================================== - - -- Command: TeX-clean - Remove generated intermediate files. In case a prefix argument is - given, remove output files as well. - - Canonical access to the function is provided by the `Clean' and - `Clean All' entries in `TeX-command-list', invokable with `C-c - C-c' or the Command menu. - - The patterns governing which files to remove can be adapted - separately for each AUCTeX mode by means of the variables - `plain-TeX-clean-intermediate-suffixes', - `plain-TeX-clean-output-suffixes', - `LaTeX-clean-intermediate-suffixes', `LaTeX-clean-output-suffixes', - `docTeX-clean-intermediate-suffixes', - `docTeX-clean-output-suffixes', - `Texinfo-clean-intermediate-suffixes', - `Texinfo-clean-output-suffixes', - `ConTeXt-clean-intermediate-suffixes' and - `ConTeXt-clean-output-suffixes'. - - -- User Option: TeX-clean-confirm - Control if deletion of intermediate and output files has to be - confirmed before it is actually done. If non-nil, ask before - deleting files. - - -File: auctex.info, Node: Documentation, Prev: Cleaning, Up: Running TeX and friends - -7.7 Documentation about macros and packages -=========================================== - - -- Command: TeX-doc - (`C-c ?') Get documentation about macros, packages or TeX & Co. - in general. The function will prompt for the name of a command or - manual, providing a list of available keywords for completion. If - point is on a command or word with available documentation, this - will be suggested as default. - - The command can be invoked by the key binding mentioned above as - well as the `Find Documentation...' entry in the mode menu. - - -File: auctex.info, Node: Multifile, Next: Parsing Files, Prev: Running TeX and friends, Up: Top - -8 Multifile Documents -********************* - -You may wish to spread a document over many files (as you are likely to -do if there are multiple authors, or if you have not yet discovered the -power of the outline commands (*note Outline::)). This can be done by -having a "master" file in which you include the various files with the -TeX macro `\input' or the LaTeX macro `\include'. These files may also -include other files themselves. However, to format the document you -must run the commands on the top level master file. - - When you, for example, ask AUCTeX to run a command on the master -file, it has no way of knowing the name of the master file. By default, -it will assume that the current file is the master file. If you insert -the following in your `.emacs' file AUCTeX will use a more advanced -algorithm. - - (setq-default TeX-master nil) ; Query for master file. - - If AUCTeX finds the line indicating the end of the header in a master -file (`TeX-header-end'), it can figure out for itself that this is a -master file. Otherwise, it will ask for the name of the master file -associated with the buffer. To avoid asking you again, AUCTeX will -automatically insert the name of the master file as a file variable -(*note File Variables: (emacs)File Variables.). You can also insert -the file variable yourself, by putting the following text at the end of -your files. - - %%% Local Variables: - %%% TeX-master: "master" - %%% End: - - You should always set this variable to the name of the top level -document. If you always use the same name for your top level -documents, you can set `TeX-master' in your `.emacs' file. - - (setq-default TeX-master "master") ; All master files called "master". - - -- User Option: TeX-master - The master file associated with the current buffer. If the file - being edited is actually included from another file, then you can - tell AUCTeX the name of the master file by setting this variable. - If there are multiple levels of nesting, specify the top level - file. - - If this variable is `nil', AUCTeX will query you for the name. - - If the variable is `t', then AUCTeX will assume the file is a - master file itself. - - If the variable is `shared', then AUCTeX will query for the name, - but will not change the file. - - -- User Option: TeX-one-master - Regular expression matching ordinary TeX files. - - You should set this variable to match the name of all files, for - which it is a good idea to append a `TeX-master' file variable - entry automatically. When AUCTeX adds the name of the master file - as a file variable, it does not need to ask next time you edit the - file. - - If you dislike AUCTeX automatically modifying your files, you can - set this variable to `""'. By default, AUCTeX will modify - any file with an extension of `.tex'. - - -- Command: TeX-master-file-ask - (`C-c _') Query for the name of a master file and add the - respective File Variables (*note File Variables: (emacs)File - Variables.) to the file for setting this variable permanently. - - AUCTeX will not ask for a master file when it encounters existing - files. This function shall give you the possibility to insert the - variable manually. - - AUCTeX keeps track of macros, environments, labels, and style files -that are used in a given document. For this to work with multifile -documents, AUCTeX has to have a place to put the information about the -files in the document. This is done by having an `auto' subdirectory -placed in the directory where your document is located. Each time you -save a file, AUCTeX will write information about the file into the -`auto' directory. When you load a file, AUCTeX will read the -information in the `auto' directory about the file you loaded _and the -master file specified by `TeX-master'_. Since the master file (perhaps -indirectly) includes all other files in the document, AUCTeX will get -information from all files in the document. This means that you will -get from each file, for example, completion for all labels defined -anywhere in the document. - - AUCTeX will create the `auto' directory automatically if -`TeX-auto-save' is non-nil. Without it, the files in the document will -not know anything about each other, except for the name of the master -file. *Note Automatic Local::. - - -- Command: TeX-save-document - (`C-c C-d') Save all buffers known to belong to the current - document. - - -- User Option: TeX-save-query - If non-nil, then query the user before saving each file with - `TeX-save-document'. - - -File: auctex.info, Node: Parsing Files, Next: Internationalization, Prev: Multifile, Up: Top - -9 Automatic Parsing of TeX Files -******************************** - -AUCTeX depends heavily on being able to extract information from the -buffers by parsing them. Since parsing the buffer can be somewhat slow, -the parsing is initially disabled. You are encouraged to enable them by -adding the following lines to your `.emacs' file. - - (setq TeX-parse-self t) ; Enable parse on load. - (setq TeX-auto-save t) ; Enable parse on save. - - The latter command will make AUCTeX store the parsed information in -an `auto' subdirectory in the directory each time the TeX files are -stored, *note Automatic Local::. If AUCTeX finds the pre-parsed -information when loading a file, it will not need to reparse the buffer. -The information in the `auto' directory is also useful for multifile -documents, *note Multifile::, since it allows each file to access the -parsed information from all the other files in the document. This is -done by first reading the information from the master file, and then -recursively the information from each file stored in the master file. - - The variables can also be done on a per file basis, by changing the -file local variables. - - %%% Local Variables: - %%% TeX-parse-self: t - %%% TeX-auto-save: t - %%% End: - - Even when you have disabled the automatic parsing, you can force the -generation of style information by pressing `C-c C-n'. This is often -the best choice, as you will be able to decide when it is necessary to -reparse the file. - - -- User Option: TeX-parse-self - Parse file after loading it if no style hook is found for it. - - -- User Option: TeX-auto-save - Automatically save style information when saving the buffer. - - -- Command: TeX-normal-mode ARG - (`C-c C-n') Remove all information about this buffer, and apply the - style hooks again. Save buffer first including style information. - With optional argument, also reload the style hooks. - - When AUCTeX saves your buffer, it can optionally convert all tabs in -your buffer into spaces. Tabs confuse AUCTeX's error message parsing -and so should generally be avoided. However, tabs are significant in -some environments, and so by default AUCTeX does not remove them. To -convert tabs to spaces when saving a buffer, insert the following in -your `.emacs' file: - - (setq TeX-auto-untabify t) - - -- User Option: TeX-auto-untabify - Automatically remove all tabs from a file before saving it. - - Instead of disabling the parsing entirely, you can also speed it -significantly up by limiting the information it will search for (and -store) when parsing the buffer. You can do this by setting the default -values for the buffer local variables `TeX-auto-regexp-list' and -`TeX-auto-parse-length' in your `.emacs' file. - - ;; Only parse LaTeX class and package information. - (setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list) - ;; The class and package information is usually near the beginning. - (setq-default TeX-auto-parse-length 2000) - - This example will speed the parsing up significantly, but AUCTeX -will no longer be able to provide completion for labels, macros, -environments, or bibitems specified in the document, nor will it know -what files belong to the document. - - These variables can also be specified on a per file basis, by -changing the file local variables. - - %%% Local Variables: - %%% TeX-auto-regexp-list: TeX-auto-full-regexp-list - %%% TeX-auto-parse-length: 999999 - %%% End: - - -- User Option: TeX-auto-regexp-list - List of regular expressions used for parsing the current file. - - -- User Option: TeX-auto-parse-length - Maximal length of TeX file that will be parsed. - - The pre-specified lists of regexps are defined below. You can use -these before loading AUCTeX by quoting them, as in the example above. - - -- Constant: TeX-auto-empty-regexp-list - Parse nothing - - -- Constant: LaTeX-auto-minimal-regexp-list - Only parse LaTeX class and packages. - - -- Constant: LaTeX-auto-label-regexp-list - Only parse LaTeX labels. - - -- Constant: LaTeX-auto-regexp-list - Parse common LaTeX commands. - - -- Constant: plain-TeX-auto-regexp-list - Parse common plain TeX commands. - - -- Constant: TeX-auto-full-regexp-list - Parse all TeX and LaTeX commands that AUCTeX can use. - - -File: auctex.info, Node: Internationalization, Next: Automatic, Prev: Parsing Files, Up: Top - -10 Language Support -******************* - -TeX and Emacs are usable for European (Latin, Cyrillic, Greek) based -languages. Some LaTeX and EmacsLisp packages are available for easy -typesetting and editing documents in European languages. - - For CJK (Chinese, Japanese, and Korean) languages, Emacs or XEmacs -with MULE (MULtilingual Enhancement to GNU Emacs) support is required. -MULE is part of Emacs by default since Emacs 20. XEmacs has to be -configured with the `--with-mule' option. Special versions of TeX are -needed for CJK languages: CTeX and ChinaTeX for Chinese, ASCII pTeX and -NTT jTeX for Japanese, HLaTeX and kTeX for Korean. The CJK-LaTeX -package is required for supporting multiple CJK scripts within a single -document. - - Note that Unicode is not fully supported in Emacs 21 and XEmacs 21. -CJK characters are not usable. Please use the MULE-UCS EmacsLisp -package or Emacs 22 (not released yet) if you need CJK. - -* Menu: - -* European:: Using AUCTeX with European Languages -* Japanese:: Using AUCTeX with Japanese - - -File: auctex.info, Node: European, Next: Japanese, Up: Internationalization - -10.1 Using AUCTeX with European Languages -========================================= - -10.1.1 Typing and Displaying Non-ASCII Characters -------------------------------------------------- - -First you will need a way to write non-ASCII characters. You can either -use macros, or teach TeX about the ISO character sets. I prefer the -latter, it has the advantage that the usual standard emacs word -movement and case change commands will work. - - With LaTeX2e, just add `\usepackage[latin1]{inputenc}'. Other -languages than Western European ones will probably have other encoding -needs. - - To be able to display non-ASCII characters you will need an -appropriate font and a version of GNU Emacs capable of displaying 8-bit -characters (e.g. Emacs 21). The manner in which this is supported -differs between Emacsen, so you need to take a look at your respective -documentation. - - A compromise is to use an European character set when editing the -file, and convert to TeX macros when reading and writing the files. - -`iso-cvt.el' - Much like `iso-tex.el' but is bundled with Emacs 19.23 and later. - -`x-compose.el' - Similar package bundled with new versions of XEmacs. - -`X-Symbol' - a much more complete package for both Emacs and XEmacs that can - also handle a lot of mathematical characters and input methods. - -10.1.2 Style Files for Different Languages ------------------------------------------- - -AUCTeX supports style files for several languages. Each style file may -modify AUCTeX to better support the language, and will run a language -specific hook that will allow you to for example change ispell -dictionary, or run code to change the keyboard remapping. The -following will for example choose a Danish dictionary for documents -including `\usepackage[danish]{babel}'. This requires parsing to be -enabled, *note Parsing Files::. - - (add-hook 'TeX-language-dk-hook - (lambda () (ispell-change-dictionary "danish"))) - - The following style files are recognized: - -`czech' - Runs style hook `TeX-language-cz-hook'. Pressing <"> will insert - `\uv{' and `}' depending on context. - -`danish' - Runs style hook `TeX-language-dk-hook'. Pressing <"> will insert - `"`' and `"'' depending on context. Typing <-> twice will insert - `"=', i.e. a hyphen string allowing hyphenation in the composing - words. - -`dutch' - Runs style hook `TeX-language-nl-hook'. - -`german' -`ngerman' - Runs style hook `TeX-language-de-hook'. Gives `"' word syntax, - makes the <"> key insert a literal `"'. Pressing the key twice - will give you opening or closing German quotes (`"`' or `"''). - Typing <-> twice will insert `"=', three times `--'. - -`frenchb' -`francais' - Runs style hook `TeX-language-fr-hook'. Pressing <"> will insert - `\\og' and `\\fg' depending on context. Note that the language - name for customizing `TeX-quote-language-alist' is `french'. - -`icelandic' - Runs style hook `TeX-language-is-hook'. Gives `"' word syntax, - makes the <"> key insert a literal `"'. Typing <"> twice will - insert insert `"`' or `"'' depending on context. Typing <-> twice - will insert `"=', three times `--'. - -`italian' - Runs style hook `TeX-language-it-hook'. Pressing <"> will insert - `"<' and `">' depending on context. - -`polish' - Runs style hook `TeX-language-pl-hook'. Gives `"' word syntax and - makes the <"> key insert a literal `"'. Pressing <"> twice will - insert `"`' or `"'' depending on context. - -`polski' - Runs style hook `TeX-language-pl-hook'. Makes the <"> key insert - a literal `"'. Pressing <"> twice will insert `,,' or `''' - depending on context. - -`slovak' - Runs style hook `TeX-language-sk-hook'. Pressing <"> will insert - `\uv{' and `}' depending on context. - -`swedish' - Runs style hook `TeX-language-sv-hook'. Pressing <"> will insert - `'''. Typing <-> twice will insert `"=', three times `--'. - - Replacement of language-specific hyphen strings like `"=' with -dashes does not require to type <-> three times in a row. You can put -point after the hypen string anytime and trigger the replacement by -typing <->. - - In case you are not satisfied with the suggested behavior of quote -and hyphen insertion you can change it by customizing the variables -`TeX-quote-language-alist' and `LaTeX-babel-hyphen-language-alist' -respectively. - - -- User Option: TeX-quote-language-alist - Used for overriding the default language-specific quote insertion - behavior. This is an alist where each element is a list - consisting of four items. The first item is the name of the - language in concern as a string. See the list of supported - languages above. The second item is the opening quotation mark. - The third item is the closing quotation mark. Opening and closing - quotation marks can be specified directly as strings or as - functions returning a string. The fourth item is a boolean - controlling quote insertion. It should be non-nil if if the - special quotes should only be used after inserting a literal `"' - character first, i.e. on second key press. - - -- User Option: LaTeX-babel-hyphen-language-alist - Used for overriding the behavior of hyphen insertion for specific - languages. Every element in this alist is a list of three items. - The first item should specify the affected language as a string. - The second item denotes the hyphen string to be used as a string. - The third item, a boolean, controls the behavior of hyphen - insertion and should be non-nil if the special hyphen should be - inserted after inserting a literal `-' character, i.e. on second - key press. - - The defaults of hyphen insertion are defined by the variables -`LaTeX-babel-hyphen' and `LaTeX-babel-hyphen-after-hyphen' respectively. - - -- User Option: LaTeX-babel-hyphen - String to be used when typing <->. This usually is a hyphen - alternative or hyphenation aid provided by `babel' and the related - language style files, like `"=', `"~' or `"-'. - - Set it to an empty string or nil in order to disable - language-specific hyphen insertion. - - -- User Option: LaTeX-babel-hyphen-after-hyphen - Control insertion of hyphen strings. If non-nil insert normal - hyphen on first key press and swap it with the language-specific - hyphen string specified in the variable `LaTeX-babel-hyphen' on - second key press. If nil do it the other way round. - - -File: auctex.info, Node: Japanese, Prev: European, Up: Internationalization - -10.2 Using AUCTeX with Japanese TeX -=================================== - -To write Japanese text with AUCTeX, you need to have versions of TeX -and Emacs that support Japanese. There exist at least two variants of -TeX for Japanese text (NTT jTeX and ASCII pTeX). AUCTeX can be used -with MULE (MULtilingual Enhancement to GNU Emacs) supported Emacsen. - - To use the Japanese TeX variants, simply activate -`japanese-plain-tex-mode' or `japanese-latex-mode' and everything -should work. If not, send mail to Masayuki Ataka -`', who kindly donated the code for -supporting Japanese in AUCTeX. None of the primary AUCTeX maintainers -understand Japanese, so they cannot help you. - - If you usually use AUCTeX in Japanese, setting the following -variables is useful. - - -- User Option: TeX-default-mode - Mode to enter for a new file when it cannott be determined whether - the file is plain TeX or LaTeX or what. - - If you want to enter Japanese LaTeX mode whenever this may happen, - set the variable like this: - (setq TeX-default-mode 'japanese-latex-mode) - - -- User Option: japanese-TeX-command-default - The default command for `TeX-command' in Japanese TeX mode. - - The default value is `"pTeX"'. - - -- User Option: japanese-LaTeX-command-default - The default command for `TeX-command' in Japanese LaTeX mode. - - The default value is `"LaTeX"'. - - -- User Option: japanese-LaTeX-default-style - The default style/class when creating a new Japanese LaTeX - document. - - The default value is `"jarticle"'. - - See `tex-jp.el' for more information. - - -File: auctex.info, Node: Automatic, Next: Style Files, Prev: Internationalization, Up: Top - -11 Automatic Customization -************************** - -Since AUCTeX is so highly customizable, it makes sense that it is able -to customize itself. The automatic customization consists of scanning -TeX files and extracting symbols, environments, and things like that. - - The automatic customization is done on three different levels. The -global level is the level shared by all users at your site, and consists -of scanning the standard TeX style files, and any extra styles added -locally for all users on the site. The private level deals with those -style files you have written for your own use, and use in different -documents. You may have a `~/lib/TeX/' directory where you store -useful style files for your own use. The local level is for a specific -directory, and deals with writing customization for the files for your -normal TeX documents. - - If compared with the environment variable `TEXINPUTS', the global -level corresponds to the directories built into TeX. The private level -corresponds to the directories you add yourself, except for `.', which -is the local level. - -* Menu: - -* Automatic Global:: Automatic Customization for the Site -* Automatic Private:: Automatic Customization for a User -* Automatic Local:: Automatic Customization for a Directory - - By default AUCTeX will search for customization files in all the -global, private, and local style directories, but you can also set the -path directly. This is useful if you for example want to add another -person's style hooks to your path. Please note that all matching files -found in `TeX-style-path' are loaded, and all hooks defined in the -files will be executed. - - -- User Option: TeX-style-path - List of directories to search for AUCTeX style files. Each must - end with a slash. - - By default, when AUCTeX searches a directory for files, it will -recursively search through subdirectories. - - -- User Option: TeX-file-recurse - Whether to search TeX directories recursively: nil means do not - recurse, a positive integer means go that far deep in the directory - hierarchy, t means recurse indefinitely. - - By default, AUCTeX will ignore files name `.', `..', `SCCS', `RCS', -and `CVS'. - - -- User Option: TeX-ignore-file - Regular expression matching file names to ignore. - - These files or directories will not be considered when searching - for TeX files in a directory. - - -File: auctex.info, Node: Automatic Global, Next: Automatic Private, Up: Automatic - -11.1 Automatic Customization for the Site -========================================= - -Assuming that the automatic customization at the global level was done -when AUCTeX was installed, your choice is now: will you use it? If you -use it, you will benefit by having access to all the symbols and -environments available for completion purposes. The drawback is slower -load time when you edit a new file and perhaps too many confusing -symbols when you try to do a completion. - - You can disable the automatic generated global style hooks by setting -the variable `TeX-auto-global' to nil. - - -- User Option: TeX-macro-global - Directories containing the site's TeX style files. - - -- User Option: TeX-style-global - Directory containing hand generated TeX information. Must end - with a slash. - - These correspond to TeX macros shared by all users of a site. - - -- User Option: TeX-auto-global - Directory containing automatically generated information. - - For storing automatic extracted information about the TeX macros - shared by all users of a site. - - -File: auctex.info, Node: Automatic Private, Next: Automatic Local, Prev: Automatic Global, Up: Automatic - -11.2 Automatic Customization for a User -======================================= - -You should specify where you store your private TeX macros, so AUCTeX -can extract their information. The extracted information will go to -the directories listed in `TeX-auto-private' - - Use `M-x TeX-auto-generate' to extract the information. - - -- User Option: TeX-macro-private - Directories where you store your personal TeX macros. Each must - end with a slash. - - This defaults to the directories listed in the `TEXINPUTS' and - `BIBINPUTS' environment variables. - - -- User Option: TeX-auto-private - List of directories containing automatically generated information. - Must end with a slash. - - These correspond to the personal TeX macros. - - -- Command: TeX-auto-generate TEX AUTO - (`M-x TeX-auto-generate') Generate style hook for TEX and store it - in AUTO. If TEX is a directory, generate style hooks for all - files in the directory. - - -- User Option: TeX-style-private - List of directories containing hand generated information. Must - end with a slash. - - These correspond to the personal TeX macros. - - -File: auctex.info, Node: Automatic Local, Prev: Automatic Private, Up: Automatic - -11.3 Automatic Customization for a Directory -============================================ - -AUCTeX can update the style information about a file each time you save -it, and it will do this if the directory `TeX-auto-local' exist. -`TeX-auto-local' is by default set to `"auto/"', so simply creating an -`auto' directory will enable automatic saving of style information. - - The advantage of doing this is that macros, labels, etc. defined in -any file in a multifile document will be known in all the files in the -document. The disadvantage is that saving will be slower. To disable, -set `TeX-auto-local' to nil. - - -- User Option: TeX-style-local - Directory containing hand generated TeX information. Must end - with a slash. - - These correspond to TeX macros found in the current directory. - - -- User Option: TeX-auto-local - Directory containing automatically generated TeX information. - Must end with a slash. - - These correspond to TeX macros found in the current directory. - - -File: auctex.info, Node: Style Files, Next: Copying this Manual, Prev: Automatic, Up: Top - -12 Writing Your own Style Support -********************************* - -*Note Automatic::, for a discussion about automatically generated -global, private, and local style files. The hand generated style files -are equivalent, except that they by default are found in `style' -directories instead of `auto' directories. - -* Menu: - -* Simple Style:: A Simple Style File -* Adding Macros:: Adding Support for Macros -* Adding Environments:: Adding Support for Environments -* Adding Other:: Adding Other Information -* Hacking the Parser:: Automatic Extraction of New Things - - If you write some useful support for a public TeX style file, please -send it to us. - - -File: auctex.info, Node: Simple Style, Next: Adding Macros, Up: Style Files - -12.1 A Simple Style File -======================== - -Here is a simple example of a style file. - - ;;; book.el - Special code for book style. - - (TeX-add-style-hook - "book" - (lambda () (setq LaTeX-largest-level - (LaTeX-section-level ("chapter"))))) - - This file specifies that the largest kind of section in a LaTeX -document using the book document style is chapter. The interesting -thing to notice is that the style file defines an (anonymous) function, -and adds it to the list of loaded style hooks by calling -`TeX-add-style-hook'. - - The first time the user indirectly tries to access some style -specific information, such as the largest sectioning command available, -the style hooks for all files directly or indirectly read by the -current document is executed. The actual files will only be evaluated -once, but the hooks will be called for each buffer using the style file. - - -- Function: TeX-add-style-hook STYLE HOOK - Add HOOK to the list of functions to run when we use the TeX file - STYLE. - - -File: auctex.info, Node: Adding Macros, Next: Adding Environments, Prev: Simple Style, Up: Style Files - -12.2 Adding Support for Macros -============================== - -The most common thing to define in a style hook is new symbols (TeX -macros). Most likely along with a description of the arguments to the -function, since the symbol itself can be defined automatically. - - Here are a few examples from `latex.el'. - - (TeX-add-style-hook - "latex" - (lambda () - (TeX-add-symbols - '("arabic" TeX-arg-counter) - '("label" TeX-arg-define-label) - '("ref" TeX-arg-label) - '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t) - '("newtheorem" TeX-arg-define-environment - [ TeX-arg-environment "Numbered like" ] - t [ TeX-arg-counter "Within counter" ])))) - - -- Function: TeX-add-symbols SYMBOL ... - Add each SYMBOL to the list of known symbols. - - Each argument to `TeX-add-symbols' is a list describing one symbol. -The head of the list is the name of the symbol, the remaining elements -describe each argument. - - If there are no additional elements, the symbol will be inserted with -point inside braces. Otherwise, each argument of this function should -match an argument of the TeX macro. What is done depends on the -argument type. - - If a macro is defined multiple times, AUCTeX will chose the one with -the longest definition (i.e. the one with the most arguments). - - Thus, to overwrite - '("tref" 1) ; one argument - you can specify - '("tref" TeX-arg-label ignore) ; two arguments - - `ignore' is a function that does not do anything, so when you insert -a `tref' you will be prompted for a label and no more. - -`string' - Use the string as a prompt to prompt for the argument. - -`number' - Insert that many braces, leave point inside the first. - -`nil' - Insert empty braces. - -`t' - Insert empty braces, leave point between the braces. - -`other symbols' - Call the symbol as a function. You can define your own hook, or - use one of the predefined argument hooks. - -`list' - If the car is a string, insert it as a prompt and the next element - as initial input. Otherwise, call the car of the list with the - remaining elements as arguments. - -`vector' - Optional argument. If it has more than one element, parse it as a - list, otherwise parse the only element as above. Use square - brackets instead of curly braces, and is not inserted on empty user - input. - - A lot of argument hooks have already been defined. The first -argument to all hooks is a flag indicating if it is an optional -argument. It is up to the hook to determine what to do with the -remaining arguments, if any. Typically the next argument is used to -overwrite the default prompt. - -`TeX-arg-conditional' - Implements if EXPR THEN ELSE. If EXPR evaluates to true, parse - THEN as an argument list, else parse ELSE as an argument list. - -`TeX-arg-literal' - Insert its arguments into the buffer. Used for specifying extra - syntax for a macro. - -`TeX-arg-free' - Parse its arguments but use no braces when they are inserted. - -`TeX-arg-eval' - Evaluate arguments and insert the result in the buffer. - -`TeX-arg-label' - Prompt for a label completing with known labels. - -`TeX-arg-macro' - Prompt for a TeX macro with completion. - -`TeX-arg-environment' - Prompt for a LaTeX environment with completion. - -`TeX-arg-cite' - Prompt for a BibTeX citation. - -`TeX-arg-counter' - Prompt for a LaTeX counter. - -`TeX-arg-savebox' - Prompt for a LaTeX savebox. - -`TeX-arg-file' - Prompt for a filename in the current directory, and use it without - the extension. - -`TeX-arg-input-file' - Prompt for the name of an input file in TeX's search path, and use - it without the extension. Run the style hooks for the file. - -`TeX-arg-define-label' - Prompt for a label completing with known labels. Add label to - list of defined labels. - -`TeX-arg-define-macro' - Prompt for a TeX macro with completion. Add macro to list of - defined macros. - -`TeX-arg-define-environment' - Prompt for a LaTeX environment with completion. Add environment to - list of defined environments. - -`TeX-arg-define-cite' - Prompt for a BibTeX citation. - -`TeX-arg-define-counter' - Prompt for a LaTeX counter. - -`TeX-arg-define-savebox' - Prompt for a LaTeX savebox. - -`TeX-arg-corner' - Prompt for a LaTeX side or corner position with completion. - -`TeX-arg-lr' - Prompt for a LaTeX side with completion. - -`TeX-arg-tb' - Prompt for a LaTeX side with completion. - -`TeX-arg-pagestyle' - Prompt for a LaTeX pagestyle with completion. - -`TeX-arg-verb' - Prompt for delimiter and text. - -`TeX-arg-pair' - Insert a pair of numbers, use arguments for prompt. The numbers are - surrounded by parentheses and separated with a comma. - -`TeX-arg-size' - Insert width and height as a pair. No arguments. - -`TeX-arg-coordinate' - Insert x and y coordinates as a pair. No arguments. - - If you add new hooks, you can assume that point is placed directly -after the previous argument, or after the macro name if this is the -first argument. Please leave point located after the argument you are -inserting. If you want point to be located somewhere else after all -hooks have been processed, set the value of `exit-mark'. It will point -nowhere, until the argument hook sets it. - - -File: auctex.info, Node: Adding Environments, Next: Adding Other, Prev: Adding Macros, Up: Style Files - -12.3 Adding Support for Environments -==================================== - -Adding support for environments is very much like adding support for -TeX macros, except that each environment normally only takes one -argument, an environment hook. The example is again a short version of -`latex.el'. - - (TeX-add-style-hook - "latex" - (lambda () - (LaTeX-add-environments - '("document" LaTeX-env-document) - '("enumerate" LaTeX-env-item) - '("itemize" LaTeX-env-item) - '("list" LaTeX-env-list)))) - - The only hook that is generally useful is `LaTeX-env-item', which is -used for environments that contain items. It is completely up to the -environment hook to insert the environment, but the function -`LaTeX-insert-environment' may be of some help. The hook will be -called with the name of the environment as its first argument, and extra -arguments can be provided by adding them to a list after the hook. - - For simple environments with arguments, for example defined with -`\newenvironment', you can make AUCTeX prompt for the arguments by -giving the prompt strings in the call to `LaTeX-add-environments'. (An -optional argument can be indicated by putting the prompt string into a -vector.) For example, if you have defined a `loop' environment with -the three arguments FROM, TO, and STEP, you can add support for them in -a style file. - - %% loop.sty - - \newenvironment{loop}[3]{...}{...} - - ;; loop.el - - (TeX-add-style-hook - "loop" - (lambda () - (LaTeX-add-environments - '("loop" "From" "To" "Step")))) - - If an environment is defined multiple times, AUCTeX will chose the -one with the longest definition. Thus, if you have an enumerate style -file, and want it to replace the standard LaTeX enumerate hook above, -you could define an `enumerate.el' file as follows, and place it in the -appropriate style directory. - - (TeX-add-style-hook - "latex" - (lambda () - (LaTeX-add-environments - '("enumerate" LaTeX-env-enumerate foo)))) - - (defun LaTeX-env-enumerate (environment &optional ignore) ...) - - The symbol `foo' will be passed to `LaTeX-env-enumerate' as the -second argument, but since we only added it to overwrite the definition -in `latex.el' it is just ignored. - - -- Function: LaTeX-add-environments ENV ... - Add each ENV to list of loaded environments. - - -- Function: LaTeX-insert-environment ENV [ EXTRA ] - Insert environment of type ENV, with optional argument EXTRA. - - -File: auctex.info, Node: Adding Other, Next: Hacking the Parser, Prev: Adding Environments, Up: Style Files - -12.4 Adding Other Information -============================= - -You can also specify bibliographical databases and labels in the style -file. This is probably of little use, since this information will -usually be automatically generated from the TeX file anyway. - - -- Function: LaTeX-add-bibliographies BIBLIOGRAPHY ... - Add each BIBLIOGRAPHY to list of loaded bibliographies. - - -- Function: LaTeX-add-labels LABEL ... - Add each LABEL to the list of known labels. - - -File: auctex.info, Node: Hacking the Parser, Prev: Adding Other, Up: Style Files - -12.5 Automatic Extraction of New Things -======================================= - -The automatic TeX information extractor works by searching for regular -expressions in the TeX files, and storing the matched information. You -can add support for new constructs to the parser, something that is -needed when you add new commands to define symbols. - - For example, in the file `macro.tex' I define the following macro. - - \newcommand{\newmacro}[5]{% - \def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}% - \def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}% - } - - AUCTeX will automatically figure out that `newmacro' is a macro that -takes five arguments. However, it is not smart enough to automatically -see that each time we use the macro, two new macros are defined. We -can specify this information in a style hook file. - - ;;; macro.el --- Special code for my own macro file. - - ;;; Code: - - (defvar TeX-newmacro-regexp - '("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}" - (1 2) TeX-auto-multi) - "Matches \newmacro definitions.") - - (defvar TeX-auto-multi nil - "Temporary for parsing \\newmacro definitions.") - - (defun TeX-macro-cleanup () - "Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'." - (mapcar (lambda (list) - (mapcar (lambda (symbol) - (setq TeX-auto-symbol - (cons symbol TeX-auto-symbol))) - list)) - TeX-auto-multi)) - - (defun TeX-macro-prepare () - "Clear `Tex-auto-multi' before use." - (setq TeX-auto-multi nil)) - - (add-hook 'TeX-auto-prepare-hook 'TeX-macro-prepare) - (add-hook 'TeX-auto-cleanup-hook 'TeX-macro-cleanup) - - (TeX-add-style-hook - "macro" - (lambda () - (TeX-auto-add-regexp TeX-newmacro-regexp) - (TeX-add-symbols '("newmacro" - TeX-arg-macro - (TeX-arg-macro "Capitalized macro: \\") - t - "BibTeX entry: " - nil)))) - - ;;; macro.el ends here - - When this file is first loaded, it adds a new entry to -`TeX-newmacro-regexp', and defines a function to be called before the -parsing starts, and one to be called after the parsing is done. It -also declares a variable to contain the data collected during parsing. -Finally, it adds a style hook which describes the `newmacro' macro, as -we have seen it before. - - So the general strategy is: Add a new entry to `TeX-newmacro-regexp'. -Declare a variable to contain intermediate data during parsing. Add -hook to be called before and after parsing. In this case, the hook -before parsing just initializes the variable, and the hook after parsing -collects the data from the variable, and adds them to the list of -symbols found. - - -- Variable: TeX-auto-regexp-list - List of regular expressions matching TeX macro definitions. - - The list has the following format ((REGEXP MATCH TABLE) ...), that - is, each entry is a list with three elements. - - REGEXP. Regular expression matching the macro we want to parse. - - MATCH. A number or list of numbers, each representing one - parenthesized subexpression matched by REGEXP. - - TABLE. The symbol table to store the data. This can be a - function, in which case the function is called with the argument - MATCH. Use `TeX-match-buffer' to get match data. If it is not a - function, it is presumed to be the name of a variable containing a - list of match data. The matched data (a string if MATCH is a - number, a list of strings if MATCH is a list of numbers) is put in - front of the table. - - -- Variable: TeX-auto-prepare-hook nil - List of functions to be called before parsing a TeX file. - - -- Variable: TeX-auto-cleanup-hook nil - List of functions to be called after parsing a TeX file. - - -File: auctex.info, Node: Copying this Manual, Next: Changes, Prev: Style Files, Up: Top - -Appendix A Copying this Manual -****************************** - -The copyright notice for this manual is: - - This manual is for AUCTeX (version 11.85 from 2008-02-10), a -sophisticated TeX environment for Emacs. - - Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, -2007, 2008 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.2 or any later version published by the Free Software - Foundation; with no Invariant Sections, no Front-Cover Texts and - no Back-Cover Texts. A copy of the license is included in the - section entitled "GNU Free Documentation License." - -The full license text can be read here: - -* Menu: - -* GNU Free Documentation License:: License for copying this manual. - - -File: auctex.info, Node: GNU Free Documentation License, Up: Copying this Manual - -A.1 GNU Free Documentation License -================================== - - Version 1.2, November 2002 - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included in an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warranty Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - -ADDENDUM: How to use this License for your documents -==================================================== - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover - Texts. A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. - - -File: auctex.info, Node: Changes, Next: Development, Prev: Copying this Manual, Up: Top - -Appendix B Changes and New Features -*********************************** - -News in 11.85 -============= - - * Font locking has been improved significantly. It is now less - prone to color bleeding which could lead to high resource usage. - In addition it now includes information about LaTeX macro syntax - and can indicate syntactically incorrect macros in LaTeX mode. - - * The license was updated to GPLv3. - - * Support for the nomencl, flashcards and comment LaTeX packages as - well as the Icelandic language option of babel were added. - - * Support for folding of math macros was added. - - * Lots of minor bugs in features and documentation fixed. - -News in 11.84 -============= - - * There have been problems with the `-without-texmf-dir' option to - `configure' when the value of `-with-kpathsea-sep' was set or - determined for an installation system with a default different - from that of the runtime system. `with-kpathsea-sep' has been - removed; the setting is now usually determined at runtime. - - Due to this and other problems, preview-latex in the released - XEmacs package failed under Windows or with anything except recent - 21.5 XEmacsen. - - * AUCTeX and preview-latex have been changed in order to accommodate - file names containing spaces. preview-latex now tolerates bad - PostScript code polluting the stack (like some Omega fonts). - - * `preview.sty' had in some cases failed to emit PostScript header - specials. - - * Support for folding of comments was added. - - * The `polish' language option of the babel LaTeX package as well as - the polski LaTeX package are now supported. Most notably this - means that AUCTeX will help to insert quotation marks as defined - by polish.sty (`"`..."'') and polski.sty (`,,...'''). - - * The TeX tool bar is now available and enabled by default in plain - TeX mode. *Note Running TeX and friends::. - - * Bug fix in the display of math subscripts and superscripts. - - * Bug fix `TeX-doc' for Emacs 21. - - * There has been quite a number of other bug fixes to various - features and documentation across the board. - - -News in 11.83 -============= - - * The new function `TeX-doc' provides easy access to documentation - about commands and packages or information related to TeX and - friends in general. *Note Documentation::. - - * You can now get rid of generated intermediate and output files by - means of the new `Clean' and `Clean All' entries in - `TeX-command-list' accessible with `C-c C-c' or the Command menu. - *Note Cleaning::. - - * Support for forward search with PDF files was added. That means - you can jump to a place in the output file corresponding to the - position in the source file. *Note Viewing::. - - Adding support for this feature required the default value of the - variable `TeX-output-view-style' to be changed. Please make sure - you either remove any customizations overriding the new default or - incorporate the changes into your customizations if you want to - use this feature. - - * TeX error messages of the `-file-line-error' kind are now - understood in AUCTeX and preview-latex (parsers are still - separate). - - * Bug fix in XyMTeX support. - - * The LaTeX tool bar is now enabled by default. *Note Running TeX - and friends::. - - -News in 11.82 -============= - - * Support for the MinionPro LaTeX package was added. - - * Warnings and underfull/overfull boxes are now being indicated in - the echo area after a LaTeX run, if the respective debugging - options are activated with `TeX-toggle-debug-warnings' (`C-c C-t - C-w') or `TeX-toggle-debug-bad-boxes' (`C-c C-t C-b'). In this - case `TeX-next-error' will find these warnings in addition to - normal errors. - - The key binding `C-c C-w' for `TeX-toggle-debug-bad-boxes' (which - was renamed from `TeX-toggle-debug-boxes') now is deprecated. - - * AUCTeX now can automatically insert a pair of braces after typing - <_> or <^> in math constructs if the new variable - `TeX-electric-sub-and-superscript' is set to a non-nil value. - - * Some language-specific support for French was added. There now is - completion support for the commands provided by the `frenchb' (and - `francais') options of the babel LaTeX package and easier input of - French quotation marks (`\\og ...\\fg') which can now be inserted - by typing <">. - - * Completion support for options of some LaTeX packages was added. - - * Already in version 11.81 the way to activate AUCTeX changed - substantially. This should now be done with `(load "auctex.el" nil - t t)' instead of the former `(require 'tex-site)'. Related to this - change `tex-mik.el' does not load `tex-site.el' anymore. That - means if you used only `(require 'tex-mik)' in order to activate - AUCTeX, you have to add `(load "auctex.el" nil t t)' before the - latter statement. *Note Loading the package::. - - * Handling of verbatim constructs was consolidated across AUCTeX. - This resulted in the font-latex-specific variables - `font-latex-verb-like-commands', `font-latex-verbatim-macros', and - `font-latex-verbatim-environments' being removed and the more - general variables `LaTeX-verbatim-macros-with-delims', - `LaTeX-verbatim-macros-with-braces', and - `LaTeX-verbatim-environments' being added. - - * The output of a BibTeX run is now checked for warnings and errors, - which are reported in the echo area. - - * The aliases for `font-latex-title-fontify' were removed. Use - `font-latex-fontify-sectioning' instead. - - * The problem that Japanese macros where broken across lines was - fixed. - - * Various bug fixes. - -News in 11.81 -============= - - * `LaTeX-mark-section' now marks subsections of a given section as - well. The former behavior is available via the prefix argument. - - * preview-latex which was previously available separately became a - subsystem of AUCTeX. There is no documented provision for building - or installing preview-latex separately. It is still possible to - use and install AUCTeX without preview-latex, however. - - * The installation procedures have been overhauled and now also - install startup files as part of the process (those had to be - copied manually previously). You are advised to remove previous - installations of AUCTeX and preview-latex before starting the - installation procedure. A standard installation from an - unmodified tarball no longer requires Makeinfo or Perl. - - Also note that the way AUCTeX is supposed to be activated changed. - Instead of `(require 'tex-site)' you should now use `(load - "auctex.el" nil t t)'. While the former method may still work, - the new method has the advantage that you can deactivate a - preactivated AUCTeX with the statement `(unload-feature - 'tex-site)' before any of its modes have been used. This may be - important especially for site-wide installations. - - * Support for the babel LaTeX package was added. - - * Folding a buffer now ensures that the whole buffer is fontified - before the actual folding is carried out. If this results in - unbearably long execution times, you can fall back to the old - behavior of relying on stealth font locking to do this job in the - background by customizing the variable `TeX-fold-force-fontify'. - - * Folded content now reveals part of its original text in a tooltip - or the echo area when hovering with the mouse pointer over it. - - * The language-specific insertion of quotation marks was - generalized. The variables `LaTeX-german-open-quote', - `LaTeX-german-close-quote', `LaTeX-german-quote-after-quote', - `LaTeX-italian-open-quote', `LaTeX-italian-close-quote', and - `LaTeX-italian-quote-after-quote' are now obsolete. If you are not - satisfied with the default settings, you should customize - `TeX-quote-language-alist' instead. - - * Similar to language-specific quote insertion, AUCTeX now helps you - with hyphens in different languages as well. *Note European::, - for details. - - * Fill problems in Japanese text introduced in AUCTeX 11.55 were - fixed. AUCTeX tries not to break lines between 1-byte and 2-byte - chars. These features will work in Chinese text, too. - - * The scaling factor of the fontification of sectioning commands can - now be customized using the variable - `font-latex-fontify-sectioning'. This variable was previously - called `font-latex-title-fontify'; In this release we provide an - alias but this will disappear in one of the the next releases. - The faces for the sectioning commands are now called - `font-latex-sectioning-N-face' (N=0...5) instead of - `font-latex-title-N-face' (N=1...4). Analogously the names of the - variables holding the related keyword lists were changed from - `font-latex-title-N-keywords' to - `font-latex-sectioning-N-keywords'. *Note Font Locking::, for - details. Make sure to adjust your customizations. - - * Titles in beamer slides marked by the "\frametitle" command are - know displayed with the new face `font-latex-slide-title-face'. - You can add macros to be highlighted with this face to - `font-latex-match-slide-title-keywords'. - - * Of course a lot of bugs have been fixed. - -News in 11.55 -============= - - * A bug was fixed which lead to the insertion of trailing whitespace - during filling. In particular extra spaces were added to sentence - endings at the end of lines. You can make this whitespace visible - by setting the variable `show-trailing-whitespace' to `t'. If you - want to delete all trailing whitespace in a buffer, type `M-x - delete-trailing-whitespace RET'. - - * A bug was fixed which lead to a `*Compile-Log*' buffer popping up - when the first LaTeX file was loaded in an Emacs session. - - * On some systems the presence of an outdated Emacspeak package lead - to the error message `File mode specification error: (error - "Variable binding depth exceeds max-specpdl-size")'. Precautions - were added which prevent this error from happening. But - nevertheless, it is advised to upgrade or uninstall the outdated - Emacspeak package. - - * The value of `TeX-macro-global' is not determined during - configuration anymore but at load time of AUCTeX. Consequently the - associated configuration option `--with-tex-input-dirs' was - removed. - - * Support for the LaTeX Japanese classes `jsarticle' and `jsbook' - was added. - -News in 11.54 -============= - - * The parser (used e.g. for `TeX-auto-generate-global') was extended - to recognize keywords common in LaTeX packages and classes, like - "\DeclareRobustCommand" or "\RequirePackage". Additionally a bug - was fixed which led to duplicate entries in AUCTeX style files. - - * Folding can now be done for paragraphs and regions besides single - constructs and the whole buffer. With the new `TeX-fold-dwim' - command content can both be hidden and shown with a single key - binding. In course of these changes new key bindings for - unfolding commands where introduced. The old bindings are still - present but will be phased out in future releases. - - * Info files of the manual now have a .info extension. - - * There is an experimental tool bar support now. It is not - activated by default. If you want to use it, add - (add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) - to your init file. - - * The manual now contains a new chapter "Quick Start". It explains - the main features and how to use them, and should be enough for a - new user to start using AUCTeX. - - * A new section "Font Locking" was added to the manual which explains - syntax highlighting in AUCTeX and its customization. Together with - the sections related to folding and outlining, the section is part - of the new chapter "Display". - - * Keywords for syntax highlighting of LaTeX constructs to be typeset - in bold, italic or typewriter fonts may now be customized. - Besides the built-in classes, new keyword classes may be added by - customizing the variable `font-latex-user-keyword-classes'. The - customization options can be found in the customization group - `font-latex-keywords'. - - * Verbatim content is now displayed with the `fixed-pitch' face. (GNU - Emacs only) - - * Syntax highlighting should not spill out of verbatim content - anymore. (GNU Emacs only) - - * Verbatim commands like `\verb|...|' will not be broken anymore - during filling. - - * You can customize the completion for graphic files with - `LaTeX-includegraphics-read-file'. - - * Support for the LaTeX packages `url', `listings', `jurabib' and - `csquotes' was added with regard to command completion and syntax - highlighting. - - * Performance of fontification and filling was improved. - - * Insertion of nodes in Texinfo mode now supports completion of - existing node names. - - * Setting the variable `LaTeX-float' to `nil' now means that you - will not be prompted for the float position of figures and tables. - You can get the old behaviour of `nil' by setting the variable to - `""', i.e. an empty string. See also *note Floats::. - - * The XEmacs-specific bug concerning `overlays-at' was fixed. - - * Lots of bug fixes. - -News in 11.53 -============= - - * The LaTeX math menu can include Unicode characters if your Emacs - built supports it. See the variable `LaTeX-math-menu-unicode', - *note Mathematics::. - - * Bug fixes for XEmacs. - - * Completion for graphic files in the TeX search path has been added. - - * `start' is used for the viewer for MiKTeX and fpTeX. - - * The variable `TeX-fold-preserve-comments' can now be customized to - deactivate folding in comments. - -News in 11.52 -============= - - * Installation and menus under XEmacs work again (maybe for the first - time). - - * Fontification of subscripts and superscripts is now disabled when - the fontification engine is not able to support it properly. - - * Bug fixes in the build process. - -News in 11.51 -============= - - * PDFTeX and Source Special support did not work with ConTeXt, this - has been fixed. Similar for Source Special support under Windows. - - * Omega support has been added. - - * Bug fixes in the build process. - - * `TeX-fold' now supports folding of environments in Texinfo mode. - -News in 11.50 -============= - - * The use of source specials when processing or viewing the document - can now be controlled with the new `TeX-source-specials' minor mode - which can be toggled via an entry in the Command menu or the key - binding `C-c C-t C-s'. If you have customized the variable - `TeX-command-list', you have to re-initialize it for this to work. - This means to open a customization buffer for the variable by - typing `M-x customize-variable RET TeX-command-list RET', selecting - "Erase Customization" and do your customization again with the new - default. - - * The content of the command menu now depends on the mode (plain TeX, - LaTeX, ConTeXt etc.). Any former customization of the variable - `TeX-command-list' has to be erased. Otherwise the command menu - and the customization will not work correctly. - - * Support for hiding and auto-revealing macros, e.g. footnotes or - citations, and environments in a buffer was added, *note Folding::. - - * You can now control if indentation is done upon typing by - customizing the variable `TeX-newline-function', *note Indenting::. - - * Limited support for `doc.sty' and `ltxdoc.cls' (`dtx' files) was - added. The new docTeX mode provides functionality for editing - documentation parts. This includes formatting (indenting and - filling), adding and completion of macros and environments while - staying in comments as well as syntax highlighting. (Please note - that the mode is not finished yet. For example syntax - highlighting does not work yet in XEmacs.) - - * For macro completion in docTeX mode the AUCTeX style files - `doc.el', `ltxdoc.el' and `ltx-base.el' were included. The latter - provides general support for low-level LaTeX macros and may be - used with LaTeX class and style files as well. It is currently - not loaded automatically for those files. - - * Support for ConTeXt with a separate ConTeXt mode is now included. - Macro definitions for completion are available in Dutch and - English. - - * The filling and indentation code was overhauled and is now able to - format commented parts of the source syntactically correct. Newly - available functionality and customization options are explained in - the manual. - - * Filling and indentation in XEmacs with preview-latex and activated - previews lead to the insertion of whitespace before multi-line - previews. AUCTeX now contains facilities to prevent this problem. - - * If `TeX-master' is set to `t', AUCTeX will now query for a master - file only when a new file is opened. Existing files will be left - alone. The new function `TeX-master-file-ask' (bound to `C-c _' - is provided for adding the variable manually. - - * Sectioning commands are now shown in a larger font on display - devices which support such fontification. The variable - `font-latex-title-fontify' can be customized to restore the old - appearance, i.e. the usage of a different color instead of a - change in size. - - * Support for `alphanum.sty', `beamer.cls', `booktabs.sty', - `captcont.sty', `emp.sty', `paralist.sty', `subfigure.sty' and - `units.sty'/`nicefrac.sty' was added. Credits go to the authors - mentioned in the respective AUCTeX style files. - - * Inserting graphics with `C-c RET \includegraphics RET' was - improved. See the variable `LaTeX-includegraphics-options-alist'. - - * If `LaTeX-default-position' is `nil', don't prompt for position - arguments in Tabular-like environments, see *note Tabular-like::. - - * Completion for available packages when using `C-c RET \usepackage - RET' was improved on systems using the kpathsea library. - - * The commenting functionality was fixed. The separate functions for - commenting and uncommenting were unified in one function for - paragraphs and regions respectively which do both. - - * Syntax highlighting can be customized to fontify quotes delimited - by either >>German<< or <> quotation marks by changing the - variable `font-latex-quotes'. - - * Certain TeX/LaTeX keywords for functions, references, variables - and warnings will now be fontified specially. You may add your own - keywords by customizing the variables - `font-latex-match-function-keywords', - `font-latex-match-reference-keywords', - `font-latex-match-variable-keywords' and - `font-latex-match-warning-keywords'. - - * If you include the style files `german' or `ngerman' in a document - (directly or via the `babel' package), you should now customize - `LaTeX-german-open-quote', `LaTeX-german-close-quote' and - `LaTeX-german-quote-after-quote' instead of `TeX-open-quote', - `TeX-close-quote' and `TeX-quote-after-quote' if you want to - influence the type of quote insertion. - - * Upon viewing an output file, the right viewer and command line - options for it are now determined automatically by looking at the - extension of the output file and certain options used in the - source file. The behavior can be adapted or extended respectively - by customizing the variable `TeX-output-view-style'. - - * You can control whether `TeX-insert-macro' (`C-c RET') ask for all - optional arguments by customizing the variable - `TeX-insert-macro-default-style', *note Completion::. - - * `TeX-run-discard' is now able to completely detach a process that - it started. - - * The build process was enhanced and is now based on `autoconf' - making installing AUCTeX a mostly automatic process. See *note - Installation:: and *note Installation under MS Windows:: for - details. - -News in 11.14 -============= - - * Many more LaTeX and LaTeX2e commands are supported. Done by - Masayuki Ataka - -News in 11.12 -============= - - * Support for the KOMA-Script classes. Contributed by Mark Trettin - . - -News in 11.11 -============= - - * Support for `prosper.sty', see `http://prosper.sourceforge.net/'. - Contributed by Phillip Lord . - -News in 11.10 -============= - - * `comment-region' now inserts %% by default. Suggested by "Davide - G. M. Salvetti" . - -News in 11.06 -============= - - * You can now switch between using the `font-latex' (all emacsen), - the `tex-font' (Emacs 21 only) or no special package for font - locking. Customize `TeX-install-font-lock' for this. - -News in 11.04 -============= - - * Now use -t landscape by default when landscape option appears. - Suggested by Erik Frisk . - -News in 11.03 -============= - - * Use `tex-fptex.el' for fpTeX support. Contributed by Fabrice - Popineau . - -News in 11.02 -============= - - * New user option `LaTeX-top-caption-list' specifies environments - where the caption should go at top. Contributed by - ataka@milk.freemail.ne.jp (Masayuki Ataka). - - * Allow explicit dimensions in `graphicx.sty'. Contributed by - ataka@milk.freemail.ne.jp (Masayuki Ataka). - - * Limited support for `verbatim.sty'. Contributed by - ataka@milk.freemail.ne.jp (Masayuki Ataka). - - * Better support for asmmath items. Patch by - ataka@milk.freemail.ne.jp (Masayuki Ataka). - - * More accurate error parsing. Added by David Kastrup - . - -News in 11.01 -============= - - * Bug fixes. - -Older versions -============== - -See the file `history.texi' for older changes. - - -File: auctex.info, Node: Development, Next: FAQ, Prev: Changes, Up: Top - -Appendix C Future Development -***************************** - -The following sections describe future development of AUCTeX. Besides -mid-term goals, bug reports and requests we cannot fix or honor right -away are being gathered here. If you have some time for Emacs Lisp -hacking, you are encouraged to try to provide a solution to one of the -following problems. If you don't know Lisp, you may help us to improve -the documentation. It might be a good idea to discuss proposed changes -on the mailing list of AUCTeX first. - -* Menu: - -* Mid-term Goals:: -* Wishlist:: -* Bugs:: - - -File: auctex.info, Node: Mid-term Goals, Next: Wishlist, Up: Development - -C.1 Mid-term Goals -================== - - * Integration of preview-latex into AUCTeX - - As of AUCTeX 11.81 preview-latex is a part of AUCTeX in the sense - that the installation routines were merged and preview-latex is - being packaged with AUCTeX. - - Further integration will happen at the backend. This involves - folding of error parsing and task management of both packages - which will ease development efforts and avoid redundant work. - - * More flexible option and command handling - - The current state of command handling with `TeX-command-list' is - not very flexible because there is no distinction between - executables and command line options to be passed to them. - - Customization of `TeX-command-list' by the user will interfere with - updates of AUCTeX. - - * Error help catalogs - - Currently, the help for errors is more or less hardwired into - `tex.el'. For supporting error help in other languages, it would - be sensible to instead arrange error messages in language-specific - files, make a common info file from all such catalogs in a given - language and look the error texts up in an appropriate index. The - user would then specify a preference list of languages, and the - errors would be looked up in the catalogs in sequence until they - were identified. - - * Combining `docTeX' with RefTeX - - Macro cross references should also be usable for document - navigation using RefTeX. - - - -File: auctex.info, Node: Wishlist, Next: Bugs, Prev: Mid-term Goals, Up: Development - -C.2 Wishlist -============ - - * Documentation lookup for macros - - A parser could gather information about which macros are defined in - which LaTeX packages and store the information in a hashtable which - can be used in a backend for `TeX-doc' in order to open the - matching documentation for a given macro. The information could - also be used to insert an appropriate `\usepackage' statement if - the user tries to insert a macro for which the respective package - has not been requested yet. - - * Spell checking of macros - - A special ispell dictionary for macros could be nice to have. - - * Quick error overviews - - An error overview window (extract from the log file with just the - error lines, clickable like a "grep" buffer) and/or fringe - indicators for errors in the main text would be nice. - - * A math entry grid - - A separate frame with a table of math character graphics to click - on in order to insert the respective sequence into the buffer (cf. - the "grid" of x-symbol). - - * Crossreferencing support - - It would be nice if you could index process your favorite - collection of `.dtx' files (such as the LaTeX source), just call a - command on arbitrary control sequence, and get either the DVI - viewer opened right at the definition of that macro (using Source - Specials), or the source code of the `.dtx' file. - - * Better plain TeX support - - For starters, `LaTeX-math-mode' is not very LaTeX-specific in the - first place, and similar holds for indentation and formatting. - - * Poor man's Source Specials In particular in PDF mode (and where - Source Specials cause problems), alternatives would be desirable. - One could implement inverse search by something like Heiko - Oberdiek's `vpe.sty', and forward search by using the `.aux' file - info to correlate labels in the text (possibly in cooperation with - RefTeX) with previewer pages. - - In AUCTeX 11.83, support for forward search with PDF files was - added. Currently this only works if you use the pdfsync LaTeX - package and xpdf as your PDF viewer. *Note Viewing::. - - * Page count when compiling should (optionally) go to modeline of the - window where the compilation command was invoked, instead of the - output window. Suggested by Karsten Tinnefeld - . - - * Command to insert a macrodefinition in the preamble, without moving - point from the current location. Suggested by "Jeffrey C. Ely" - . - - * A database of all commands defined in all stylefiles. When a - command or environment gets entered that is provided in one of the - styles, insert the appropriate `\usepackage' in the preamble. - - * A way to add and overwrite math mode entries in style files, and to - decide where they should be. Suggested by Remo Badii - . - - * Create template for (first) line of tabular environment. - - * I think prompting for the master is the intended behaviour. It - corresponds to a `shared' value for TeX-master. - - There should probably be a `none' value which wouldn't query for - the master, but instead disable all features that relies on - TeX-master. - - This default value for TeX-master could then be controled with - mapping based on the extension. - - * Multiple argument completion for `\bibliography'. In general, I - ought to make `,' special for these kind of completions. - - * Suggest `makindex' when appropriate. - - * Use index files (when available) to speed up `C-c C-m include - '. - - * Option not to calculate very slow completions like for `C-c C-m - include '. - - * Font menu should be created from `TeX-font-list'. - - * Installation procedure written purely in emacs lisp. - - * Included PostScript files should also be counted as part of the - document. - - * The parser should catch warnings about undefined crossreferences. - Suggested by Richard Hirsch `i3080501@ws.rz.tu-bs.de'. - - * A nice hierarchical by-topic organization of all officially - documented LaTeX macros, available from the menu bar. - - * `TeX-command-default' should be set from the master file, if not - set locally. Suggested by Peter Whaite `'. - - * Make AUCTeX work with `crypt++'. Suggested by Chris Moore - `'. - - * Make AUCTeX work with `longlines'. This would also apply to - preview-latex, though it might make sense to unify error processing - before attempting this. - - * The `Spell' command should apply to all files in a document. Maybe - it could try to restrict to files that have been modified since - last spell check? Suggested by Ravinder Bhumbla - `'. - - * Make <.> check for abbreviations and sentences ending with capital - letters. - - * Use Emacs 19 minibuffer history to choose between previewers, and - other stuff. Suggested by John Interrante - `'. - - * Make features. - - A new command `TeX-update' (`C-c C-u') could be used to create an - up-to-date dvi file by repeatedly running BibTeX, MakeIndex and - (La)TeX, until an error occurs or we are done. - - An alternative is to have an `Update' command that ensures the - `dvi' file is up to date. This could be called before printing and - previewing. - - * Documentation of variables that can be set in a style hook. - - We need a list of what can safely be done in an ordinary style - hook. You can not set a variable that AUCTeX depends on, unless - AUCTeX knows that it has to run the style hooks first. - - Here is the start of such a list. - `LaTeX-add-environments' - - `TeX-add-symbols' - - `LaTeX-add-labels' - - `LaTeX-add-bibliographies' - - `LaTeX-largest-level' - - * Completion for counters and sboxes. - - * Outline should be (better) supported in TeX mode. - - At least, support headers, trailers, as well as TeX-outline-extra. - - * `TeX-header-start' and `TeX-trailer-end'. - - We might want these, just for fun (and outlines) - - * Plain TeX and LaTeX specific header and trailer expressions. - - We should have a way to globally specify the default value of the - header and trailer regexps. - - * Get closer to original `TeX-mode' keybindings. - - A third initialization file (`tex-mode.el') containing an emulator - of the standard `TeX-mode' would help convince some people to - change to AUCTeX. - - * Make `TeX-next-error' parse ahead and store the results in a list, - using markers to remember buffer positions in order to be more - robust with regard to line numbers and changed files. This is what - `next-error' does. (Or did, until Emacs 19). - - * Finish the Texinfo mode. For one thing, many Texinfo mode - commands do not accept braces around their arguments. - - * Hook up the letter environment with `bbdb.el'. - - - -File: auctex.info, Node: Bugs, Prev: Wishlist, Up: Development - -C.3 Bugs -======== - - * The parsed files and style hooks for `example.dtx', `example.sty', - `example.drv' and `example.bib' all clash. Bad. - - * `C-c `' should always stay in the current window, also when it - finds a new file. - - * Do not overwrite emacs warnings about existing auto-save files when - loading a new file. - - * Maybe the regexp for matching a TeX symbol during parsing should be - `"\\\\\\([a-zA-Z]+\\|.\\)"' -- - `' Peter Thiemann. - - * AUCTeX should not parse verbatim environments. - - * Make ``' check for math context in `LaTeX-math-mode'. and simply - self insert if not in a math context. - - * Make `TeX-insert-dollar' more robust. Currently it can be fooled - by `\mbox''es and escaped double dollar for example. - - * Correct indentation for tabular, tabbing, table, math, and array - environments. - - * No syntactic font locking of verbatim macros and environments. - (XEmacs only) - - * Font locking inside of verbatim macros and environments is not - inhibited. This may result in syntax highlighting of unbalanced - dollar signs and the like spilling out of the verbatim content. - (XEmacs only) - - * Folding of LaTeX constructs spanning more than one line may result - in overfull lines. (XEmacs only) - - -File: auctex.info, Node: FAQ, Next: Key Index, Prev: Development, Up: Top - -Appendix D Frequently Asked Questions -************************************* - - 1. Something is not working correctly. What should I do? - - Well, you might have guessed it, the first place to look is in the - available documentation packaged with AUCTeX. This could be the - release notes (in the `RELEASE' file) or the news section of the - manual in case you are experiencing problems after an upgrade, the - `INSTALL' file in case you are having problems with the - installation, the section about bugs in the manual in case you - encountered a bug or the relevant sections in the manual for other - related problems. - - If this did not help, you can send a bug report to the AUCTeX bug - reporting list by using the command `M-x TeX-submit-bug-report - RET'. But before you do this, you can try to get more information - about the problem at hand which might also help you locate the - cause of the error yourself. - - First, you can try to generate a so-called backtrace which shows - functions involved in a program error. In order to do this, start - Emacs with the command line `emacs --debug-init' and/or put the - line - - (setq debug-on-error t) - - as the first line into your init file. XEmacs users might want to - add `(setq stack-trace-on-error t)' as well. After Emacs has - started, you can load a file which triggers the error and a new - window should pop up showing the backtrace. If you get such a - backtrace, please include it in the bug report. - - Second, you can try to figure out if something in your personal or - site configuration triggers the error by starting Emacs without - such customizations. You can do this by invoking Emacs with the - command line `emacs -q -no-site-file'. Once Emacs is running, - copy the line - - (load "auctex.el" nil t t) - - into the `*scratch*' buffer and type `M-x eval-buffer RET'. This - makes sure that AUCTeX will be used for the file types it - supports. After you have done so, you can load the file - triggering the error. If everything is working now, you know that - you have to search either in the site configuration file or your - personal init file for statements related to the problem. - - 2. What versions of Emacs and XEmacs are supported? - - AUCTeX was tested with Emacs 21 and XEmacs 21.4.15. Older - versions may work but are unsupported. Older versions of XEmacs - might possibly made to work by updating the `xemacs-base' package - through the XEmacs package system. If you are looking for a - recommendation, it would appear that the smoothest working - platform on all operating systems at the current point of time - would be Emacs 22.1. At the time of this writing, however, it has - not been released and is still under development. The quality of - the development version is quite solid, so we recommend giving it - a try. With a developer version, of course, you have to be - prepared to update in case you managed to get your snapshot at a - bad time. The second best choice would be the latest released - Emacs 21.4. However, Unicode support is less good, there is no - version for the popular GTK toolkit, and the native versions for - Windows and MacOS don't offer toolbar and preview-latex support. - - Our success with XEmacs has been less than convincing. Under the - Windows operating system, nominally the only option for a released, - stable Emacs variant supporting toolbars and preview-latex would be - XEmacs 21.4. However, code for core functionality like formatting - and syntax highlighting tends to be different and often older than - even Emacs 21.4, and Unicode support as delivered is problematic - at best, missing on Windows. Both AUCTeX and XEmacs developers - don't hear much from active users of the combination. Partly for - that reason, problems tend to go unnoticed for long amounts of - time and are often found, if at all, after releases. No - experiences or recommendations can be given for beta or developer - versions of XEmacs. - - 3. What should I do when `./configure' does not find programs like - latex? - - This is problem often encountered on Windows. Make sure that the - `PATH' environment variable includes the directories containing the - relevant programs, as described in *note Installation under MS - Windows: (auctex)Installation under MS Windows. - - 4. Why doesn't the completion, style file, or multi-file stuff work? - - It must be enabled first, insert this in your init file: - - (setq-default TeX-master nil) - (setq TeX-parse-self t) - (setq TeX-auto-save t) - - Read also the chapters about parsing and multifile documents in the - manual. - - 5. Why doesn't `TeX-save-document' work? - - `TeX-check-path' has to contain "./" somewhere. - - 6. Why is the information in `foo.tex' forgotten when I save - `foo.bib'? - - For various reasons, AUCTeX ignores the extension when it stores - information about a file, so you should use unique base names for - your files. E.g. rename `foo.bib' to `foob.bib'. - - 7. Why doesn't AUCTeX signal when processing a document is done? - - If the message in the minibuffer stays "Type `C-c C-l' to display - results of compilation.", you probably have a misconfiguration in - your init file (`.emacs', `init.el' or similar). To track this - down either search in the `*Messages*' buffer for an error message - or put `(setq debug-on-error t)' as the first line into your init - file, restart Emacs and open a LaTeX file. Emacs will complain - loudly by opening a debugging buffer as soon as an error occurs. - The information in the debugging buffer can help you find the - cause of the error in your init file. - - 8. What does AUC stand for? - - AUCTeX came into being at Aalborg University in Denmark. Back then - the Danish name of the university was Aalborg Universitetscenter; - AUC for short. - - - -File: auctex.info, Node: Key Index, Next: Function Index, Prev: FAQ, Up: Top - -Key Index -********* - -[index] -* Menu: - -* ": Quotes. (line 15) -* $: Quotes. (line 62) -* : Indenting. (line 71) -* : Indenting. (line 68) -* C-c %: Commenting. (line 23) -* C-c ;: Commenting. (line 15) -* C-c : Itemize-like. (line 10) -* C-c ?: Documentation. (line 7) -* C-c ]: Environments. (line 56) -* C-c ^: Control. (line 18) -* C-c _: Multifile. (line 70) -* C-c `: Debugging. (line 10) -* C-c C-b: Commands. (line 51) -* C-c C-c: Commands. (line 18) -* C-c C-d: Multifile. (line 98) -* C-c C-e: Environments. (line 20) -* C-c C-f: Font Specifiers. (line 44) -* C-c C-f C-b <1>: Font Specifiers. (line 16) -* C-c C-f C-b: Editing. (line 73) -* C-c C-f C-c <1>: Font Specifiers. (line 37) -* C-c C-f C-c: Editing. (line 94) -* C-c C-f C-e <1>: Font Specifiers. (line 22) -* C-c C-f C-e: Editing. (line 79) -* C-c C-f C-f <1>: Font Specifiers. (line 31) -* C-c C-f C-f: Editing. (line 88) -* C-c C-f C-i <1>: Font Specifiers. (line 19) -* C-c C-f C-i: Editing. (line 76) -* C-c C-f C-r <1>: Font Specifiers. (line 28) -* C-c C-f C-r: Editing. (line 85) -* C-c C-f C-s <1>: Font Specifiers. (line 25) -* C-c C-f C-s: Editing. (line 82) -* C-c C-f C-t <1>: Font Specifiers. (line 34) -* C-c C-f C-t: Editing. (line 91) -* C-c C-k: Control. (line 10) -* C-c C-l: Control. (line 14) -* C-c C-m: Completion. (line 29) -* C-c C-n: Parsing Files. (line 44) -* C-c C-o b: Folding. (line 96) -* C-c C-o C-b: Folding. (line 44) -* C-c C-o C-c: Folding. (line 93) -* C-c C-o C-e: Folding. (line 86) -* C-c C-o C-f: Folding. (line 32) -* C-c C-o C-m: Folding. (line 77) -* C-c C-o C-o: Folding. (line 115) -* C-c C-o C-p: Folding. (line 73) -* C-c C-o C-r: Folding. (line 70) -* C-c C-o i: Folding. (line 108) -* C-c C-o p: Folding. (line 104) -* C-c C-o r: Folding. (line 100) -* C-c C-q C-e: Filling. (line 95) -* C-c C-q C-p: Filling. (line 89) -* C-c C-q C-r: Filling. (line 104) -* C-c C-q C-s: Filling. (line 100) -* C-c C-r: Commands. (line 27) -* C-c C-s: Sectioning. (line 23) -* C-c C-t C-b: Debugging. (line 19) -* C-c C-t C-i: Commands. (line 137) -* C-c C-t C-o: Commands. (line 163) -* C-c C-t C-p: Commands. (line 123) -* C-c C-t C-r: Commands. (line 41) -* C-c C-t C-s: Commands. (line 144) -* C-c C-t C-w: Debugging. (line 23) -* C-c C-v: Viewing. (line 32) -* C-c {: Quotes. (line 86) -* C-c ~: Mathematics. (line 12) -* C-j: Indenting. (line 80) -* M-: Completion. (line 19) -* M-q: Filling. (line 92) - - -File: auctex.info, Node: Function Index, Next: Variable Index, Prev: Key Index, Up: Top - -Function Index -************** - -[index] -* Menu: - -* LaTeX-add-bibliographies: Adding Other. (line 11) -* LaTeX-add-environments: Adding Environments. (line 66) -* LaTeX-add-labels: Adding Other. (line 14) -* LaTeX-close-environment: Environments. (line 56) -* LaTeX-env-item: Adding Environments. (line 20) -* LaTeX-environment: Environments. (line 20) -* LaTeX-fill-environment: Filling. (line 84) -* LaTeX-fill-paragraph: Filling. (line 89) -* LaTeX-fill-region: Filling. (line 104) -* LaTeX-fill-section: Filling. (line 100) -* LaTeX-indent-line: Indenting. (line 68) -* LaTeX-insert-environment: Adding Environments. (line 69) -* LaTeX-insert-item: Itemize-like. (line 10) -* LaTeX-math-mode: Mathematics. (line 12) -* LaTeX-section: Sectioning. (line 23) -* LaTeX-section-heading: Sectioning. (line 85) -* LaTeX-section-label: Sectioning. (line 101) -* LaTeX-section-section: Sectioning. (line 95) -* LaTeX-section-title: Sectioning. (line 89) -* LaTeX-section-toc: Sectioning. (line 92) -* TeX-add-style-hook: Simple Style. (line 28) -* TeX-add-symbols: Adding Macros. (line 25) -* TeX-arg-cite: Adding Macros. (line 103) -* TeX-arg-conditional: Adding Macros. (line 80) -* TeX-arg-coordinate: Adding Macros. (line 163) -* TeX-arg-corner: Adding Macros. (line 141) -* TeX-arg-counter: Adding Macros. (line 106) -* TeX-arg-define-cite: Adding Macros. (line 132) -* TeX-arg-define-counter: Adding Macros. (line 135) -* TeX-arg-define-environment: Adding Macros. (line 128) -* TeX-arg-define-label: Adding Macros. (line 120) -* TeX-arg-define-macro: Adding Macros. (line 124) -* TeX-arg-define-savebox: Adding Macros. (line 138) -* TeX-arg-environment: Adding Macros. (line 100) -* TeX-arg-eval: Adding Macros. (line 91) -* TeX-arg-file: Adding Macros. (line 112) -* TeX-arg-free: Adding Macros. (line 88) -* TeX-arg-input-file: Adding Macros. (line 116) -* TeX-arg-label: Adding Macros. (line 94) -* TeX-arg-literal: Adding Macros. (line 84) -* TeX-arg-lr: Adding Macros. (line 144) -* TeX-arg-macro: Adding Macros. (line 97) -* TeX-arg-pagestyle: Adding Macros. (line 150) -* TeX-arg-pair: Adding Macros. (line 156) -* TeX-arg-savebox: Adding Macros. (line 109) -* TeX-arg-size: Adding Macros. (line 160) -* TeX-arg-tb: Adding Macros. (line 147) -* TeX-arg-verb: Adding Macros. (line 153) -* TeX-auto-generate: Automatic Private. (line 26) -* TeX-clean: Cleaning. (line 7) -* TeX-command-buffer: Commands. (line 51) -* TeX-command-master: Commands. (line 18) -* TeX-command-region: Commands. (line 27) -* TeX-comment-or-uncomment-paragraph: Commenting. (line 23) -* TeX-comment-or-uncomment-region: Commenting. (line 15) -* TeX-complete-symbol: Completion. (line 19) -* TeX-doc: Documentation. (line 7) -* TeX-electric-macro: Completion. (line 66) -* TeX-fold-buffer: Folding. (line 44) -* TeX-fold-clearout-buffer: Folding. (line 96) -* TeX-fold-clearout-item: Folding. (line 108) -* TeX-fold-clearout-paragraph: Folding. (line 104) -* TeX-fold-clearout-region: Folding. (line 100) -* TeX-fold-comment: Folding. (line 93) -* TeX-fold-dwim: Folding. (line 115) -* TeX-fold-env: Folding. (line 86) -* TeX-fold-macro: Folding. (line 77) -* TeX-fold-mode: Folding. (line 32) -* TeX-fold-paragraph: Folding. (line 73) -* TeX-fold-region: Folding. (line 70) -* TeX-font: Font Specifiers. (line 44) -* TeX-header-end: Multifile. (line 29) -* TeX-home-buffer: Control. (line 18) -* TeX-insert-braces: Quotes. (line 86) -* TeX-insert-dollar: Quotes. (line 62) -* TeX-insert-macro: Completion. (line 29) -* TeX-insert-quote: Quotes. (line 15) -* TeX-interactive-mode: Commands. (line 137) -* TeX-kill-job: Control. (line 10) -* TeX-master-file-ask: Multifile. (line 70) -* TeX-next-error: Debugging. (line 10) -* TeX-normal-mode: Parsing Files. (line 44) -* TeX-Omega-mode: Commands. (line 163) -* TeX-PDF-mode: Commands. (line 123) -* TeX-pin-region: Commands. (line 41) -* TeX-recenter-output-buffer: Control. (line 14) -* TeX-save-document: Multifile. (line 98) -* TeX-source-specials-mode: Commands. (line 144) -* TeX-toggle-debug-bad-boxes: Debugging. (line 19) -* TeX-toggle-debug-warnings: Debugging. (line 23) -* TeX-view: Viewing. (line 32) - - -File: auctex.info, Node: Variable Index, Next: Concept Index, Prev: Function Index, Up: Top - -Variable Index -************** - -[index] -* Menu: - -* ConTeXt-clean-intermediate-suffixes: Cleaning. (line 7) -* ConTeXt-clean-output-suffixes: Cleaning. (line 7) -* docTeX-clean-intermediate-suffixes: Cleaning. (line 7) -* docTeX-clean-output-suffixes: Cleaning. (line 7) -* font-latex-deactivated-keyword-classes: Font Locking. (line 180) -* font-latex-do-multi-line: Font Locking. (line 308) -* font-latex-fontify-script: Font Locking. (line 269) -* font-latex-fontify-sectioning: Font Locking. (line 108) -* font-latex-match-bold-command-keywords: Font Locking. (line 149) -* font-latex-match-bold-declaration-keywords: Font Locking. (line 149) -* font-latex-match-function-keywords: Font Locking. (line 72) -* font-latex-match-italic-command-keywords: Font Locking. (line 149) -* font-latex-match-italic-declaration-keywords: Font Locking. (line 149) -* font-latex-match-math-command-keywords: Font Locking. (line 149) -* font-latex-match-reference-keywords: Font Locking. (line 72) -* font-latex-match-sectioning-0-keywords: Font Locking. (line 119) -* font-latex-match-sectioning-1-keywords: Font Locking. (line 119) -* font-latex-match-sectioning-2-keywords: Font Locking. (line 119) -* font-latex-match-sectioning-3-keywords: Font Locking. (line 119) -* font-latex-match-sectioning-4-keywords: Font Locking. (line 119) -* font-latex-match-sectioning-5-keywords: Font Locking. (line 119) -* font-latex-match-slide-title-keywords: Font Locking. (line 126) -* font-latex-match-textual-keywords: Font Locking. (line 72) -* font-latex-match-type-command-keywords: Font Locking. (line 149) -* font-latex-match-type-declaration-keywords: Font Locking. (line 149) -* font-latex-match-variable-keywords: Font Locking. (line 72) -* font-latex-match-warning-keywords: Font Locking. (line 72) -* font-latex-quotes: Font Locking. (line 244) -* font-latex-script-display: Font Locking. (line 277) -* font-latex-sectioning-0-face: Font Locking. (line 108) -* font-latex-sectioning-1-face: Font Locking. (line 108) -* font-latex-sectioning-2-face: Font Locking. (line 108) -* font-latex-sectioning-3-face: Font Locking. (line 108) -* font-latex-sectioning-4-face: Font Locking. (line 108) -* font-latex-sectioning-5-face: Font Locking. (line 108) -* font-latex-slide-title-face: Font Locking. (line 126) -* font-latex-user-keyword-classes: Font Locking. (line 210) -* japanese-LaTeX-command-default: Japanese. (line 6) -* japanese-LaTeX-default-style: Japanese. (line 6) -* japanese-TeX-command-default: Japanese. (line 6) -* LaTeX-amsmath-label: Equations. (line 16) -* LaTeX-auto-label-regexp-list: Parsing Files. (line 100) -* LaTeX-auto-minimal-regexp-list: Parsing Files. (line 97) -* LaTeX-auto-regexp-list: Parsing Files. (line 103) -* LaTeX-babel-hyphen: European. (line 144) -* LaTeX-babel-hyphen-after-hyphen: European. (line 152) -* LaTeX-babel-hyphen-language-alist: European. (line 131) -* LaTeX-clean-intermediate-suffixes: Cleaning. (line 7) -* LaTeX-clean-output-suffixes: Cleaning. (line 7) -* LaTeX-csquotes-close-quote: Quotes. (line 44) -* LaTeX-csquotes-open-quote: Quotes. (line 44) -* LaTeX-csquotes-quote-after-quote: Quotes. (line 44) -* LaTeX-default-environment: Environments. (line 35) -* LaTeX-default-format: Tabular-like. (line 11) -* LaTeX-default-position: Tabular-like. (line 14) -* LaTeX-enable-toolbar: Running TeX and friends. - (line 11) -* LaTeX-eqnarray-label: Equations. (line 13) -* LaTeX-equation-label: Equations. (line 10) -* LaTeX-figure-label: Floats. (line 25) -* LaTeX-fill-break-at-separators: Filling. (line 107) -* LaTeX-fill-break-before-code-comments: Filling. (line 117) -* LaTeX-float: Floats. (line 14) -* LaTeX-indent-environment-check: Indenting. (line 50) -* LaTeX-indent-environment-list: Indenting. (line 36) -* LaTeX-indent-level: Indenting. (line 18) -* LaTeX-item-indent: Indenting. (line 18) -* LaTeX-math-abbrev-prefix: Mathematics. (line 27) -* LaTeX-math-list: Mathematics. (line 37) -* LaTeX-math-menu-unicode: Mathematics. (line 55) -* LaTeX-paragraph-commands: Filling. (line 58) -* LaTeX-section-hook: Sectioning. (line 50) -* LaTeX-section-label: Sectioning. (line 53) -* LaTeX-syntactic-comments: Indenting. (line 62) -* LaTeX-table-label: Floats. (line 25) -* LaTeX-top-caption-list: Floats. (line 20) -* LaTeX-verbatim-environments: Font Locking. (line 290) -* LaTeX-verbatim-macros-with-braces: Font Locking. (line 290) -* LaTeX-verbatim-macros-with-delims: Font Locking. (line 290) -* plain-TeX-auto-regexp-list: Parsing Files. (line 106) -* plain-TeX-clean-intermediate-suffixes: Cleaning. (line 7) -* plain-TeX-clean-output-suffixes: Cleaning. (line 7) -* plain-TeX-enable-toolbar: Running TeX and friends. - (line 11) -* TeX-auto-cleanup-hook: Hacking the Parser. (line 101) -* TeX-auto-empty-regexp-list: Parsing Files. (line 94) -* TeX-auto-full-regexp-list: Parsing Files. (line 109) -* TeX-auto-global: Automatic Global. (line 26) -* TeX-auto-local: Automatic Local. (line 23) -* TeX-auto-parse-length: Parsing Files. (line 88) -* TeX-auto-prepare-hook: Hacking the Parser. (line 98) -* TeX-auto-private: Automatic Private. (line 20) -* TeX-auto-regexp-list <1>: Hacking the Parser. (line 79) -* TeX-auto-regexp-list: Parsing Files. (line 85) -* TeX-auto-save: Parsing Files. (line 41) -* TeX-auto-untabify: Parsing Files. (line 58) -* TeX-brace-indent-level: Indenting. (line 102) -* TeX-check-path: Commands. (line 109) -* TeX-clean-confirm: Cleaning. (line 27) -* TeX-close-quote: Quotes. (line 26) -* TeX-command-default: Commands. (line 84) -* TeX-command-list: Commands. (line 21) -* TeX-default-macro: Completion. (line 51) -* TeX-default-mode: Japanese. (line 6) -* TeX-display-help: Debugging. (line 31) -* TeX-DVI-via-PDFTeX: Commands. (line 130) -* TeX-electric-escape: Completion. (line 58) -* TeX-electric-sub-and-superscript: Mathematics. (line 69) -* TeX-file-recurse: Automatic. (line 46) -* TeX-fold-env-spec-list: Folding. (line 139) -* TeX-fold-force-fontify: Folding. (line 56) -* TeX-fold-help-echo-max-length: Folding. (line 167) -* TeX-fold-macro-spec-list: Folding. (line 125) -* TeX-fold-preserve-comments: Folding. (line 64) -* TeX-fold-type-list: Folding. (line 51) -* TeX-fold-unspec-env-display-string: Folding. (line 150) -* TeX-fold-unspec-macro-display-string: Folding. (line 146) -* TeX-fold-unspec-use-name: Folding. (line 154) -* TeX-font-list: Font Specifiers. (line 50) -* TeX-header-end: Commands. (line 38) -* TeX-ignore-file: Automatic. (line 54) -* TeX-insert-braces: Completion. (line 76) -* TeX-insert-macro-default-style: Completion. (line 37) -* TeX-install-font-lock: Font Locking. (line 14) -* TeX-interactive-mode: Commands. (line 137) -* TeX-language-cz-hook: European. (line 53) -* TeX-language-de-hook: European. (line 53) -* TeX-language-dk-hook: European. (line 53) -* TeX-language-it-hook: European. (line 53) -* TeX-language-nl-hook: European. (line 53) -* TeX-language-pl-hook: European. (line 53) -* TeX-language-sk-hook: European. (line 53) -* TeX-language-sv-hook: European. (line 53) -* TeX-macro-global <1>: Automatic Global. (line 17) -* TeX-macro-global: Customizing. (line 20) -* TeX-macro-private: Automatic Private. (line 13) -* TeX-master <1>: Multifile. (line 42) -* TeX-master: Commands. (line 21) -* TeX-math-close-double-dollar: Quotes. (line 72) -* TeX-newline-function: Indenting. (line 28) -* TeX-Omega-mode: Commands. (line 163) -* TeX-one-master: Multifile. (line 57) -* TeX-open-quote: Quotes. (line 22) -* TeX-outline-extra: Outline. (line 14) -* TeX-output-view-style: Viewing. (line 39) -* TeX-parse-self: Parsing Files. (line 38) -* TeX-PDF-mode: Commands. (line 123) -* TeX-quote-after-quote: Quotes. (line 30) -* TeX-quote-language-alist: European. (line 118) -* TeX-region: Commands. (line 38) -* TeX-save-query: Multifile. (line 102) -* TeX-show-compilation: Commands. (line 171) -* TeX-source-specials-mode: Commands. (line 144) -* TeX-source-specials-view-start-server: Viewing. (line 65) -* TeX-style-global: Automatic Global. (line 20) -* TeX-style-local: Automatic Local. (line 17) -* TeX-style-path: Automatic. (line 39) -* TeX-style-private: Automatic Private. (line 31) -* TeX-trailer-start: Commands. (line 38) -* TeX-view-style: Viewing. (line 42) -* Texinfo-clean-intermediate-suffixes: Cleaning. (line 7) -* Texinfo-clean-output-suffixes: Cleaning. (line 7) - - -File: auctex.info, Node: Concept Index, Prev: Variable Index, Up: Top - -Concept Index -************* - -[index] -* Menu: - -* .emacs: Loading the package. (line 6) -* \begin: Environments. (line 6) -* \chapter <1>: Sectioning. (line 6) -* \chapter: Editing. (line 26) -* \cite, completion of: Completion. (line 82) -* \emph <1>: Font Specifiers. (line 22) -* \emph: Editing. (line 79) -* \end: Environments. (line 6) -* \include: Multifile. (line 6) -* \input: Multifile. (line 6) -* \item: Itemize-like. (line 6) -* \label <1>: Sectioning. (line 6) -* \label: Editing. (line 26) -* \label, completion: Completion. (line 82) -* \ref, completion: Completion. (line 82) -* \section <1>: Sectioning. (line 6) -* \section: Editing. (line 26) -* \subsection <1>: Sectioning. (line 6) -* \subsection: Editing. (line 26) -* \textbf <1>: Font Specifiers. (line 16) -* \textbf: Editing. (line 73) -* \textit <1>: Font Specifiers. (line 19) -* \textit: Editing. (line 76) -* \textrm <1>: Font Specifiers. (line 28) -* \textrm: Editing. (line 85) -* \textsc <1>: Font Specifiers. (line 37) -* \textsc: Editing. (line 94) -* \textsf <1>: Font Specifiers. (line 31) -* \textsf: Editing. (line 88) -* \textsl <1>: Font Specifiers. (line 25) -* \textsl: Editing. (line 82) -* \texttt <1>: Font Specifiers. (line 34) -* \texttt: Editing. (line 91) -* Abbreviations: Mathematics. (line 6) -* Adding a style hook: Simple Style. (line 6) -* Adding bibliographies: Adding Other. (line 6) -* Adding environments: Adding Environments. (line 6) -* Adding labels: Adding Other. (line 6) -* Adding macros: Adding Macros. (line 6) -* Adding other information: Adding Other. (line 6) -* Adding to PATH in Windows: Installation under MS Windows. - (line 51) -* Advanced features: Advanced Features. (line 6) -* amsmath: Equations. (line 6) -* ANSI: European. (line 6) -* Arguments to TeX macros: Completion. (line 6) -* ASCII pTeX <1>: Japanese. (line 6) -* ASCII pTeX: Internationalization. - (line 6) -* auctex.el <1>: Changes. (line 120) -* auctex.el: Loading the package. (line 14) -* auto directories.: Automatic. (line 6) -* Auto-Reveal: Folding. (line 6) -* Automatic: Automatic. (line 6) -* Automatic Customization: Automatic. (line 6) -* Automatic Parsing: Parsing Files. (line 6) -* Automatic updating style hooks: Automatic Local. (line 6) -* Bad boxes: Debugging. (line 6) -* Bibliographies, adding: Adding Other. (line 6) -* Bibliography: Commands. (line 6) -* bibliography, completion: Completion. (line 82) -* BibTeX: Commands. (line 6) -* BibTeX, completion: Completion. (line 82) -* book.el: Simple Style. (line 6) -* Braces: Quotes. (line 6) -* Brackets: Quotes. (line 6) -* Changing font: Font Specifiers. (line 6) -* Changing the parser: Hacking the Parser. (line 6) -* Chapters <1>: Sectioning. (line 6) -* Chapters: Editing. (line 26) -* Character set: Internationalization. - (line 6) -* Checking: Checking. (line 6) -* ChinaTeX: Internationalization. - (line 6) -* chktex: Checking. (line 6) -* citations, completion of: Completion. (line 82) -* cite, completion of: Completion. (line 82) -* CJK language: Internationalization. - (line 6) -* CJK-LaTeX: Internationalization. - (line 6) -* Cleaning: Cleaning. (line 6) -* Commands: Commands. (line 6) -* Completion: Completion. (line 6) -* Controlling the output: Control. (line 6) -* Copying: Copying. (line 6) -* Copyright: Copying. (line 6) -* CTeX: Internationalization. - (line 6) -* Current file: Control. (line 6) -* Customization: Customizing. (line 6) -* Customization, personal: Customizing. (line 6) -* Customization, site: Customizing. (line 6) -* Czech: European. (line 53) -* Danish: European. (line 53) -* Debugging: Debugging. (line 6) -* Default command: Commands. (line 6) -* Defining bibliographies in style hooks: Adding Other. (line 6) -* Defining environments in style hooks: Adding Environments. (line 6) -* Defining labels in style hooks: Adding Other. (line 6) -* Defining macros in style hooks: Adding Macros. (line 6) -* Defining other information in style hooks: Adding Other. (line 6) -* Deleting fonts <1>: Font Specifiers. (line 40) -* Deleting fonts: Editing. (line 97) -* Denmark: European. (line 53) -* Descriptions: Itemize-like. (line 6) -* Display math mode: Quotes. (line 6) -* Distribution: Copying. (line 6) -* Documentation: Documentation. (line 6) -* Documents: Multifile. (line 6) -* Documents with multiple files: Multifile. (line 6) -* Dollars: Quotes. (line 6) -* Double quotes: Quotes. (line 6) -* Dutch: European. (line 53) -* Enumerates: Itemize-like. (line 6) -* Environments: Environments. (line 6) -* Environments, adding: Adding Environments. (line 6) -* Eqnarray: Equations. (line 6) -* Equation: Equations. (line 6) -* Equations: Equations. (line 6) -* Errors: Debugging. (line 6) -* Europe: European. (line 6) -* European Characters: European. (line 6) -* Example of a style file.: Simple Style. (line 6) -* Expansion: Completion. (line 6) -* External Commands: Commands. (line 6) -* Extracting TeX symbols: Automatic. (line 6) -* Faces: Font Locking. (line 321) -* FDL, GNU Free Documentation License: GNU Free Documentation License. - (line 6) -* Figure environment: Floats. (line 6) -* Figures: Floats. (line 6) -* File Variables: Commands. (line 92) -* Filling: Filling. (line 6) -* Finding errors: Checking. (line 6) -* Finding the current file: Control. (line 6) -* Finding the master file: Control. (line 6) -* Floats: Floats. (line 6) -* Folding <1>: Outline. (line 6) -* Folding: Folding. (line 6) -* Font Locking: Font Locking. (line 6) -* Font macros: Font Specifiers. (line 6) -* font-latex: Font Locking. (line 6) -* Fonts: Font Specifiers. (line 6) -* Formatting <1>: Commands. (line 6) -* Formatting <2>: Filling. (line 6) -* Formatting: Indenting. (line 6) -* Forward search: Viewing. (line 52) -* Free: Copying. (line 6) -* Free software: Copying. (line 6) -* General Public License: Copying. (line 6) -* Generating symbols: Automatic. (line 6) -* Germany: European. (line 53) -* Global directories: Automatic Global. (line 6) -* Global macro directory: Automatic Global. (line 6) -* Global style hook directory: Automatic Global. (line 6) -* Global TeX macro directory: Automatic Global. (line 6) -* GPL: Copying. (line 6) -* Header: Commands. (line 6) -* Headers: Outline. (line 6) -* Hide Macros: Folding. (line 6) -* HLaTeX: Internationalization. - (line 6) -* Holland: European. (line 53) -* Including: Multifile. (line 6) -* Indentation: Indenting. (line 6) -* Indenting: Indenting. (line 6) -* Indexing: Commands. (line 6) -* Initialization: Customizing. (line 6) -* Inputing: Multifile. (line 6) -* Installation: Build/install. (line 6) -* Internationalization: Internationalization. - (line 6) -* Inverse search: Viewing. (line 52) -* ISO 8859 Latin 1: European. (line 6) -* ISO 8859 Latin 2: European. (line 6) -* iso-cvt.el: European. (line 28) -* ispell: European. (line 40) -* Italy: European. (line 53) -* Itemize: Itemize-like. (line 6) -* Items: Itemize-like. (line 6) -* Japan: Japanese. (line 6) -* Japanese: Japanese. (line 6) -* jLaTeX: Japanese. (line 6) -* jTeX <1>: Japanese. (line 6) -* jTeX: Internationalization. - (line 6) -* Killing a process: Control. (line 6) -* kTeX: Internationalization. - (line 6) -* Label prefix <1>: Floats. (line 25) -* Label prefix: Sectioning. (line 129) -* Labels <1>: Floats. (line 25) -* Labels: Sectioning. (line 129) -* Labels, adding: Adding Other. (line 6) -* labels, completion of: Completion. (line 82) -* lacheck: Checking. (line 6) -* Language Support: Internationalization. - (line 6) -* LaTeX: Commands. (line 6) -* Latin 1: European. (line 6) -* Latin 2: European. (line 6) -* License: Copying. (line 6) -* Literature: Commands. (line 6) -* Local style directory: Automatic Local. (line 6) -* Local style hooks: Automatic Local. (line 6) -* Local Variables: Commands. (line 92) -* Macro arguments: Completion. (line 6) -* Macro completion: Completion. (line 6) -* Macro expansion: Completion. (line 6) -* macro.el: Hacking the Parser. (line 6) -* macro.tex: Hacking the Parser. (line 6) -* Macros, adding: Adding Macros. (line 6) -* Make: Build/install. (line 6) -* makeindex: Commands. (line 6) -* Making a bibliography: Commands. (line 6) -* Making an index: Commands. (line 6) -* Many Files: Multifile. (line 6) -* Master file <1>: Multifile. (line 6) -* Master file: Control. (line 6) -* Matching dollar signs: Quotes. (line 6) -* Math mode delimiters: Quotes. (line 6) -* Mathematics: Mathematics. (line 6) -* MULE <1>: Japanese. (line 6) -* MULE: Internationalization. - (line 6) -* MULE-UCS: Internationalization. - (line 6) -* Multifile Documents: Multifile. (line 6) -* Multiple Files: Multifile. (line 6) -* National letters: Internationalization. - (line 6) -* Next error: Debugging. (line 6) -* Nippon: Japanese. (line 6) -* NTT jTeX <1>: Japanese. (line 6) -* NTT jTeX: Internationalization. - (line 6) -* Omega: Commands. (line 163) -* Other information, adding: Adding Other. (line 6) -* Outlining <1>: Outline. (line 6) -* Outlining: Folding. (line 6) -* Output: Control. (line 6) -* Overfull boxes: Debugging. (line 6) -* Overview: Outline. (line 6) -* Parsing errors: Debugging. (line 6) -* Parsing LaTeX errors: Debugging. (line 6) -* Parsing new macros: Hacking the Parser. (line 6) -* Parsing TeX <1>: Automatic. (line 6) -* Parsing TeX: Parsing Files. (line 6) -* Parsing TeX output: Debugging. (line 6) -* PATH in Windows: Installation under MS Windows. - (line 51) -* PDF mode: Commands. (line 123) -* Personal customization: Customizing. (line 6) -* Personal information: Automatic Private. (line 6) -* Personal macro directory: Automatic Private. (line 6) -* Personal TeX macro directory: Automatic Private. (line 6) -* pLaTeX: Japanese. (line 6) -* Poland: European. (line 53) -* Prefix for labels <1>: Floats. (line 25) -* Prefix for labels: Sectioning. (line 129) -* preview-install-styles: Configure. (line 102) -* Previewing: Viewing. (line 6) -* Printing: Commands. (line 6) -* Private directories: Automatic Private. (line 6) -* Private macro directory: Automatic Private. (line 6) -* Private style hook directory: Automatic Private. (line 6) -* Private TeX macro directory: Automatic Private. (line 6) -* Problems: Checking. (line 6) -* Processes: Control. (line 6) -* pTeX <1>: Japanese. (line 6) -* pTeX: Internationalization. - (line 6) -* Quotes: Quotes. (line 6) -* Quotes, fontification of: Font Locking. (line 234) -* Redisplay output: Control. (line 6) -* Refilling: Filling. (line 6) -* Reformatting <1>: Filling. (line 6) -* Reformatting: Indenting. (line 6) -* Region: Commands. (line 6) -* Region file: Commands. (line 6) -* Reindenting: Indenting. (line 6) -* Reveal: Folding. (line 6) -* Right: Copying. (line 6) -* Running BibTeX: Commands. (line 6) -* Running chktex: Checking. (line 6) -* Running commands: Commands. (line 6) -* Running lacheck: Checking. (line 6) -* Running LaTeX: Commands. (line 6) -* Running makeindex: Commands. (line 6) -* Running TeX: Commands. (line 6) -* Sample style file: Simple Style. (line 6) -* Sectioning <1>: Sectioning. (line 6) -* Sectioning: Editing. (line 26) -* Sectioning commands, fontification of: Font Locking. (line 103) -* Sections <1>: Outline. (line 6) -* Sections <2>: Sectioning. (line 6) -* Sections: Editing. (line 26) -* Setting the default command: Commands. (line 6) -* Setting the header: Commands. (line 6) -* Setting the trailer: Commands. (line 6) -* Site customization: Customizing. (line 6) -* Site information: Automatic Global. (line 6) -* Site initialization: Customizing. (line 6) -* Site macro directory: Automatic Global. (line 6) -* Site TeX macro directory: Automatic Global. (line 6) -* Slovakia: European. (line 53) -* Source specials: Viewing. (line 52) -* Specifying a font: Font Specifiers. (line 6) -* Starting a previewer: Viewing. (line 6) -* Stopping a process: Control. (line 6) -* style: Style Files. (line 6) -* Style: Checking. (line 6) -* Style file: Simple Style. (line 6) -* Style files: Style Files. (line 6) -* Style hook: Simple Style. (line 6) -* Style hooks: Style Files. (line 6) -* Subscript, fontification of: Font Locking. (line 263) -* Superscript, fontification of: Font Locking. (line 263) -* Sweden: European. (line 53) -* Symbols: Mathematics. (line 6) -* Syntax Highlighting: Font Locking. (line 6) -* Tabify: Parsing Files. (line 6) -* Table environment: Floats. (line 6) -* Tables: Floats. (line 6) -* Tabs: Parsing Files. (line 6) -* TeX: Commands. (line 6) -* TeX parsing: Automatic. (line 6) -* tex-fptex.el: Installation under MS Windows. - (line 286) -* tex-jp.el: Japanese. (line 6) -* tex-mik.el: Installation under MS Windows. - (line 286) -* tex-site.el <1>: Changes. (line 120) -* tex-site.el <2>: Customizing. (line 6) -* tex-site.el: Loading the package. (line 14) -* tool bar, toolbar: Running TeX and friends. - (line 11) -* Trailer: Commands. (line 6) -* Underfull boxes: Debugging. (line 6) -* UNICODE: Internationalization. - (line 6) -* Untabify: Parsing Files. (line 6) -* Updating style hooks: Automatic Local. (line 6) -* Variables: Commands. (line 92) -* Verbatim, fontification of: Font Locking. (line 286) -* Viewing: Viewing. (line 6) -* Warranty: Copying. (line 6) -* Writing to a printer: Commands. (line 6) -* x-compose.el: European. (line 31) -* X-Symbol: European. (line 34) - - +Indirect: +auctex.info-1: 961 +auctex.info-2: 291546  Tag Table: -Node: Top841 -Node: Copying6348 -Node: Introduction8304 -Node: Installation12145 -Node: Prerequisites13103 -Node: Configure16492 -Node: Build/install21910 -Node: Loading the package22397 -Node: Advice for package providers24008 -Node: Advice for non-privileged users27952 -Node: Installation under MS Windows31905 -Node: Customizing46603 -Node: Quick Start48182 -Ref: Quick Start-Footnote-149995 -Node: Editing50142 -Node: Processing54888 -Node: Frequently Used Commands58740 -Node: Quotes59513 -Node: Font Specifiers63271 -Node: Sectioning64964 -Node: Environments69295 -Node: Equations71632 -Node: Floats72223 -Node: Itemize-like73762 -Node: Tabular-like74278 -Node: Customizing environments74881 -Node: Advanced Features75121 -Node: Mathematics75888 -Node: Completion78804 -Node: Commenting82810 -Node: Indenting84148 -Node: Filling89911 -Node: Display95413 -Node: Font Locking96749 -Node: Folding110734 -Node: Outline118714 -Node: Running TeX and friends119968 -Node: Commands121136 -Node: Viewing129437 -Node: Debugging133915 -Node: Checking135442 -Node: Control136759 -Node: Cleaning137501 -Node: Documentation138727 -Node: Multifile139383 -Node: Parsing Files144088 -Node: Internationalization148479 -Node: European149648 -Node: Japanese156200 -Node: Automatic157895 -Node: Automatic Global160407 -Node: Automatic Private161566 -Node: Automatic Local162818 -Node: Style Files163904 -Node: Simple Style164713 -Node: Adding Macros165828 -Node: Adding Environments171265 -Node: Adding Other173875 -Node: Hacking the Parser174460 -Node: Copying this Manual178331 -Node: GNU Free Documentation License179269 -Node: Changes201667 -Node: Development223820 -Node: Mid-term Goals224473 -Node: Wishlist226031 -Node: Bugs233096 -Node: FAQ234487 -Node: Key Index240660 -Node: Function Index245751 -Node: Variable Index252542 -Node: Concept Index264506 +(Indirect) +Node: Top961 +Node: Copying6965 +Node: Introduction8921 +Node: Summary9191 +Node: Installation11935 +Node: Prerequisites12901 +Node: Configure15930 +Node: Build/install21352 +Node: Loading the package21843 +Node: Advice for package providers23650 +Node: Advice for non-privileged users27598 +Node: Installation under MS Windows31555 +Node: Customizing46789 +Node: Quick Start48372 +Ref: Quick Start-Footnote-150165 +Node: Editing Facilities50312 +Node: Processing Facilities55108 +Node: Editing59002 +Node: Quotes60237 +Node: Font Specifiers63978 +Node: Sectioning65804 +Node: Environments70118 +Node: Equations72484 +Node: Floats73075 +Node: Itemize-like74614 +Node: Tabular-like75156 +Node: Customizing Environments75785 +Node: Mathematics76025 +Node: Completion78952 +Node: Commenting83017 +Node: Indenting84345 +Node: Filling90138 +Node: Display95459 +Node: Font Locking96772 +Node: Fontification of macros98847 +Node: Fontification of quotes108294 +Node: Fontification of math109789 +Node: Verbatim content111509 +Node: Faces112283 +Node: Known problems112772 +Node: Folding113700 +Node: Outline124133 +Node: Processing125387 +Node: Commands126550 +Node: Starting a Command127106 +Node: Selecting a Command130849 +Node: Processor Options133731 +Node: Viewing139415 +Node: Starting Viewers139789 +Node: I/O Correlation145957 +Node: Debugging148330 +Node: Checking149844 +Node: Control151148 +Node: Cleaning151877 +Node: Documentation153090 +Node: Customization153870 +Node: Modes and Hooks154363 +Node: Multifile155571 +Node: Parsing Files160282 +Node: Internationalization164687 +Node: European165868 +Node: Japanese172689 +Node: Automatic174386 +Node: Automatic Global176910 +Node: Automatic Private178071 +Node: Automatic Local179384 +Node: Style Files180471 +Node: Simple Style181264 +Node: Adding Macros182355 +Node: Adding Environments187859 +Node: Adding Other192128 +Node: Hacking the Parser192715 +Node: Appendices196588 +Node: Copying this Manual196839 +Node: GNU Free Documentation License197762 +Node: Changes222900 +Node: Development246154 +Node: Mid-term Goals246800 +Node: Wishlist248362 +Node: Bugs255300 +Node: FAQ256695 +Node: Indices262843 +Node: Key Index263006 +Node: Function Index268016 +Node: Variable Index275687 +Node: Concept Index291546  End Tag Table diff --git a/aquamacs/src/site-lisp/edit-modes/info/auctex.info-1 b/aquamacs/src/site-lisp/edit-modes/info/auctex.info-1 new file mode 100644 index 000000000000..478d5bdcb498 --- /dev/null +++ b/aquamacs/src/site-lisp/edit-modes/info/auctex.info-1 @@ -0,0 +1,6658 @@ +This is auctex.info, produced by makeinfo version 4.13 from auctex.texi. + +This manual is for AUCTeX (version 11.86 from 2010-02-21), a +sophisticated TeX environment for Emacs. + + Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, +2007, 2008, 2009, 2010 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License." + +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +END-INFO-DIR-ENTRY +INFO-DIR-SECTION TeX +START-INFO-DIR-ENTRY +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +END-INFO-DIR-ENTRY + + +File: auctex.info, Node: Top, Next: Copying, Up: (dir) + +AUCTeX +****** + +This manual may be copied under the conditions spelled out in *note +Copying this Manual::. + + AUCTeX is an integrated environment for editing LaTeX, ConTeXt, +docTeX, Texinfo, and TeX files. + + Although AUCTeX contains a large number of features, there are no +reasons to despair. You can continue to write TeX and LaTeX documents +the way you are used to, and only start using the multiple features in +small steps. AUCTeX is not monolithic, each feature described in this +manual is useful by itself, but together they provide an environment +where you will make very few LaTeX errors, and makes it easy to find +the errors that may slip through anyway. + + It is a good idea to make a printout of AUCTeX's reference card +`tex-ref.tex' or one of its typeset versions. + + If you want to make AUCTeX aware of style files and multi-file +documents right away, insert the following in your `.emacs' file. + + (setq TeX-auto-save t) + (setq TeX-parse-self t) + (setq-default TeX-master nil) + + Another thing you should enable is RefTeX, a comprehensive solution +for managing cross references, bibliographies, indices, document +navigation and a few other things. (*note Installation: +(reftex)Installation.) + + For detailed information about the preview-latex subsystem of +AUCTeX, see *note Introduction: (preview-latex)Top. + + There is a mailing list for general discussion about AUCTeX: write a +mail with "subscribe" in the subject to to +join it. Send contributions to . + + Bug reports should go to , suggestions for new +features, and pleas for help should go to either +(the AUCTeX developers), or to if they might have +general interest. Please use the command `M-x TeX-submit-bug-report +RET' to report bugs if possible. You can subscribe to a low-volume +announcement list by sending "subscribe" in the subject of a mail to +. + +* Menu: + +* Copying:: Copying +* Introduction:: Introduction to AUCTeX +* Editing:: Editing the Document Source +* Display:: Controlling Screen Display +* Processing:: Starting Processors, Viewers and Other Programs +* Customization:: Customization and Extension +* Appendices:: Copying, Changes, Development, FAQ +* Indices:: Indices + + --- The Detailed Node Listing --- + +Introduction + +* Summary:: Overview of AUCTeX +* Installation:: Installing AUCTeX +* Quick Start:: Quick Start + +Editing the Document Source + +* Quotes:: Inserting double quotes +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking + +Inserting Environment Templates + +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments + +Controlling Screen Display + +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document + +Font Locking + +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex + +Starting Processors, Viewers and Other Programs + +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging TeX and LaTeX output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. + +Viewing the Formatted Output + +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search + +Customization and Extension + +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of TeX Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support + +Language Support + +* European:: Using AUCTeX with European Languages +* Japanese:: Using AUCTeX with Japanese + +Automatic Customization + +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory + +Writing Your Own Style Support + +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding Other Information +* Hacking the Parser:: Automatic Extraction of New Things + +Copying, Changes, Development, FAQ + +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: + +Copying this Manual + +* GNU Free Documentation License:: License for copying this manual. + +Indices + +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: + + +File: auctex.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top + +Copying +******* + +AUCTeX primarily consists of Lisp files for Emacs (and XEmacs), but +there are also installation scripts and files and TeX support files. +All of those are "free"; this means that everyone is free to use them +and free to redistribute them on a free basis. The files of AUCTeX are +not in the public domain; they are copyrighted and there are +restrictions on their distribution, but these restrictions are designed +to permit everything that a good cooperating citizen would want to do. +What is not allowed is to try to prevent others from further sharing +any version of these programs that they might get from you. + + Specifically, we want to make sure that you have the right to give +away copies of the files that constitute AUCTeX, that you receive source +code or else can get it if you want it, that you can change these files +or use pieces of them in new free programs, and that you know you can do +these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of parts of AUCTeX, you must give the recipients all the rights +that you have. You must make sure that they, too, receive or can get +the source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone +finds out that there is no warranty for AUCTeX. If any parts are +modified by someone else and passed on, we want their recipients to +know that what they have is not what we distributed, so that any +problems introduced by others will not reflect on our reputation. + + The precise conditions of the licenses for the files currently being +distributed as part of AUCTeX are found in the General Public Licenses +that accompany them. This manual specifically is covered by the GNU +Free Documentation License (*note Copying this Manual::). + + +File: auctex.info, Node: Introduction, Next: Editing, Prev: Copying, Up: Top + +1 Introduction +************** + +* Menu: + +* Summary:: Overview of AUCTeX +* Installation:: Installing AUCTeX +* Quick Start:: Quick Start + + +File: auctex.info, Node: Summary, Next: Installation, Up: Introduction + +1.1 Overview of AUCTeX +====================== + + AUCTeX is a comprehensive customizable integrated environment for +writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using +Emacs or XEmacs. + + It supports you in the insertion of macros, environments, and +sectioning commands by providing completion alternatives and prompting +for parameters. It automatically indents your text as you type it and +lets you format a whole file at once. The outlining and folding +facilities provide you with a focused and clean view of your text. + + AUCTeX lets you process your source files by running TeX and related +tools (such as output filters, post processors for generating indices +and bibliographies, and viewers) from inside Emacs. AUCTeX lets you +browse through the errors TeX reported, while it moves the cursor +directly to the reported error, and displays some documentation for +that particular error. This will even work when the document is spread +over several files. + + One component of AUCTeX that LaTeX users will find attractive is +preview-latex, a combination of folding and in-source previewing that +provides true "What You See Is What You Get" experience in your +sourcebuffer, while letting you retain full control. + + More detailed information about the features and usage of AUCTeX can +be found in the remainder of this manual. + + AUCTeX is written entirely in Emacs Lisp, and hence you can easily +add new features for your own needs. It is a GNU project and +distributed under the `GNU General Public License Version 3'. + + The most recent version is always available at +`http://ftp.gnu.org/pub/gnu/auctex/'. + + WWW users may want to check out the AUCTeX page at +`http://www.gnu.org/software/auctex/'. + + For comprehensive information about how to install AUCTeX *Note +Installation::, or *note Installation under MS Windows::, respectively. + + If you are considering upgrading AUCTeX, the recent changes are +described in *note Changes::. + + If you want to discuss AUCTeX with other users or its developers, +there are several mailing lists you can use. + + Send a mail with the subject "subscribe" to +in order to join the general discussion list for AUCTeX. Articles +should be sent to . In a similar way, you can +subscribe to the list for just getting important +announcements about AUCTeX. The list is for bug +reports which you should usually file with the `M-x +TeX-submit-bug-report ' command. If you want to address the +developers of AUCTeX themselves with technical issues, they can be +found on the discussion list . + + +File: auctex.info, Node: Installation, Next: Quick Start, Prev: Summary, Up: Introduction + +1.2 Installing AUCTeX +===================== + + Installing AUCTeX should be simple: merely `./configure', `make', +and `make install' for a standard site-wide installation (most other +installations can be done by specifying a `--prefix=...' option). + + On many systems, this will already activate the package, making its +modes the default instead of the built-in modes of Emacs. If this is +not the case, consult *note Loading the package::. Please read through +this document fully before installing anything. The installation +procedure has changed as compared to earlier versions. Users of +MS Windows are asked to consult *Note Installation under MS Windows::. + +* Menu: + +* Prerequisites:: +* Configure:: +* Build/install:: +* Loading the package:: +* Advice for package providers:: +* Advice for non-privileged users:: +* Installation under MS Windows:: +* Customizing:: + + +File: auctex.info, Node: Prerequisites, Next: Configure, Up: Installation + +1.2.1 Prerequisites +------------------- + + * A recent version of Emacs, alternatively XEmacs + + Emacs 20 is no longer supported, and neither is XEmacs with a + version of `xemacs-base' older than 1.84 (released in sumo from + 02/02/2004). Using preview-latex requires a version of Emacs + compiled with image support. While the X11 version of Emacs 21 + will likely work, Emacs 22 and later is the preferred platform. + + Windows + Precompiled versions are available from + `ftp://ftp.gnu.org/gnu/emacs/windows/'. + + Mac OS X + For an overview of precompiled versions of Emacs for Mac OS X + see for example + `http://www.emacswiki.org/cgi-bin/wiki/EmacsForMacOS'. + + GNU/Linux + Most GNU/Linux distributions nowadays provide a variant of + Emacs 22 or later via their package repositories. + + Self-compiled + Compiling Emacs yourself requires a C compiler and a number + of tools and development libraries. Details are beyond the + scope of this manual. Instructions for checking out the + source code can be found at + `https://savannah.gnu.org/bzr/?group=emacs'. + + If you really need to use Emacs 21 on platforms where this implies + missing image support, you should disable the installation of + preview-latex (see below). + + While XEmacs (version 21.4.15, 21.4.17 or later) is supported, + doing this in a satisfactory manner has proven to be difficult. + This is mostly due to technical shortcomings and differing API's + which are hard to come by. If AUCTeX is your main application for + XEmacs, you are likely to get better results and support by + switching to Emacs. Of course, you can improve support for your + favorite editor by giving feedback in case you encounter bugs. + + * A working TeX installation + + Well, AUCTeX would be pointless without that. Processing + documentation requires TeX, LaTeX and Texinfo during installation. + preview-latex requires Dvips for its operation in DVI mode. The + default configuration of AUCTeX is tailored for teTeX or + TeXlive-based distributions, but can be adapted easily. + + * A recent Ghostscript + + This is needed for operation of preview-latex in both DVI and PDF + mode. Most versions of Ghostscript nowadays in use should work + fine (version 7.0 and newer). If you encounter problems, check + *note Problems with Ghostscript: (preview-latex)Problems with + Ghostscript. + + * The `texinfo' package + + Strictly speaking, you can get away without it if you are building + from the distribution tarball, have not modified any files and + don't need a printed version of the manual: the pregenerated info + file is included in the tarball. At least version 4.0 is required. + + + For some known issues with various software, see *note Known +problems: (preview-latex)Known problems. + + +File: auctex.info, Node: Configure, Next: Build/install, Prev: Prerequisites, Up: Installation + +1.2.2 Configure +--------------- + +The first step is to configure the source code, telling it where +various files will be. To do so, run + + ./configure OPTIONS + + (Note: if you have fetched AUCTeX from CVS rather than a regular +release, you will have to first follow the instructions in +`README.CVS'). + + On many machines, you will not need to specify any options, but if +`configure' cannot determine something on its own, you'll need to help +it out with one of these options: + +`--prefix=`/usr/local'' + All automatic placements for package components will be chosen from + sensible existing hierarchies below this: directories like `man', + `share' and `bin' are supposed to be directly below PREFIX. + + Only if no workable placement can be found there, in some cases an + alternative search will be made in a prefix deduced from a suitable + binary. + + `/usr/local' is the default PREFIX, intended to be suitable for a + site-wide installation. If you are packaging this as an operating + system component for distribution, the setting `/usr' will + probably be the right choice. If you are planning to install the + package as a single non-priviledged user, you will typically set + PREFIX to your home directory. + +`--with-emacs[=/PATH/TO/EMACS]' + If you are using a pretest which isn't in your `$PATH', or + `configure' is not finding the right Emacs executable, you can + specify it with this option. + +`--with-xemacs[=/PATH/TO/XEMACS]' + Configure for generation under XEmacs (Emacs is the default). + Again, the name of the right XEmacs executable can be specified, + complete with path if necessary. + +`--with-packagedir=/DIR' + This XEmacs-only option configures the directory for XEmacs + packages. A typical user-local setting would be + `~/.xemacs/xemacs-packages'. If this directory exists and is + below PREFIX, it should be detected automatically. This will + install and activate the package. + +`--without-packagedir' + This XEmacs-only option switches the detection of a package + directory and corresponding installation off. Consequently, the + Emacs installation scheme will be used. This might be appropriate + if you are using a different package system/installer than the + XEmacs one and want to avoid conflicts. + + The Emacs installation scheme has the following options: + +`--with-lispdir=/DIR' + This Emacs-only option specifies the location of the `site-lisp' + directory within `load-path' under which the files will get + installed (the bulk will get installed in a subdirectory). + `./configure' should figure this out by itself. + +`--with-auctexstartfile=`auctex.el'' +`--with-previewstartfile=`preview-latex.el'' + This is the name of the respective startup files. If LISPDIR + contains a subdirectory `site-start.d', the start files are placed + there, and `site-start.el' should load them automatically. Please + be aware that you must not move the start files after installation + since other files are found _relative_ to them. + +`--with-packagelispdir=`auctex'' + This is the directory where the bulk of the package gets located. + The startfile adds this into LOAD-PATH. + +`--with-auto-dir=/DIR' + You can use this option to specify the directory containing + automatically generated information. It is not necessary for most + TeX installs, but may be used if you don't like the directory that + configure is suggesting. + +`--help' + This is not an option specific to AUCTeX. A number of standard + options to `configure' exist, and we do not have the room to + describe them here; a short description of each is available, using + `--help'. If you use `--help=recursive', then also + preview-latex-specific options will get listed. + +`--disable-preview' + This disables configuration and installation of preview-latex. + This option is not actually recommended. If your Emacs does not + support images, you should really upgrade to a newer version. + Distributors should, if possible, refrain from distributing AUCTeX + and preview-latex separately in order to avoid confusion and + upgrade hassles if users install partial packages on their own. + +`--with-texmf-dir=/DIR + --without-texmf-dir' + This option is used for specifying a TDS-compliant directory + hierarchy. Using `--with-texmf-dir=/DIR' you can specify where + the TeX TDS directory hierarchy resides, and the TeX files will + get installed in `/DIR/tex/latex/preview/'. + + If you use the `--without-texmf-dir' option, the TeX-related files + will be kept in the Emacs Lisp tree, and at runtime the + `TEXINPUTS' environment variable will be made to point there. You + can install those files into your own TeX tree at some later time + with `M-x preview-install-styles RET'. + +`--with-tex-dir=/DIR' + If you want to specify an exact directory for the preview TeX + files, use `--with-tex-dir=/DIR'. In this case, the files will be + placed in `/DIR', and you'll also need the following option: + +`--with-doc-dir=/DIR' + This option may be used to specify where the TeX documentation + goes. It is to be used when you are using `--with-tex-dir=/DIR', + but is normally not necessary otherwise. + + +File: auctex.info, Node: Build/install, Next: Loading the package, Prev: Configure, Up: Installation + +1.2.3 Build/install +------------------- + +Once `configure' has been run, simply enter + + make + +at the prompt to byte-compile the lisp files, extract the TeX files and +build the documentation files. To install the files into the locations +chosen earlier, type + + make install + + You may need special privileges to install, e.g., if you are +installing into system directories. + + +File: auctex.info, Node: Loading the package, Next: Advice for package providers, Prev: Build/install, Up: Installation + +1.2.4 Loading the package +------------------------- + +You can detect the successful activation of AUCTeX and preview-latex in +the menus after loading a LaTeX file like `preview/circ.tex': AUCTeX +then gives you a `Command' menu, and preview-latex gives you a +`Preview' menu. + + For XEmacs, if the installation occured into a valid package +directory (which is the default), then this should work out of the box. + + With Emacs (or if you explicitly disabled use of the package system), +the startup files `auctex.el' and `preview-latex.el' may already be in +a directory of the `site-start.d/' variety if your Emacs installation +provides it. In that case they should be automatically loaded on +startup and nothing else needs to be done. If not, they should at +least have been placed somewhere in your `load-path'. You can then +load them by placing the lines + + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) + + into your init file. + + If you explicitly used `--with-lispdir', you may need to add the +specified directory into Emacs' `load-path' variable by adding +something like + + (add-to-list 'load-path "~/elisp") + + before the above lines into your Emacs startup file. + + For site-wide activation in GNU Emacs, see *Note Advice for package +providers::. + + Once activated, the modes provided by AUCTeX are used per default for +all supported file types. If you want to change the modes for which it +is operative instead of the default, use + M-x customize-variable TeX-modes + + If you want to remove a preinstalled AUCTeX completely before any of +its modes have been used, + (unload-feature 'tex-site) + should accomplish that. + + +File: auctex.info, Node: Advice for package providers, Next: Advice for non-privileged users, Prev: Loading the package, Up: Installation + +1.2.5 Providing AUCTeX as a package +----------------------------------- + +As a package provider, you should make sure that your users will be +served best according to their intentions, and keep in mind that a +system might be used by more than one user, with different preferences. + + There are people that prefer the built-in Emacs modes for editing +TeX files, in particular plain TeX users. There are various ways to +tell AUCTeX even after auto-activation that it should not get used, and +they are described in *note Introduction to AUCTeX: Introduction. + + So if you have users that don't want to use the preinstalled AUCTeX, +they can easily get rid of it. Activating AUCTeX by default is +therefore a good choice. + + If the installation procedure did not achieve this already by placing +`auctex.el' and `preview-latex.el' into a possibly existing +`site-start.d' directory, you can do this by placing + + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) + +in the system-wide `site-start.el'. + + If your package is intended as an XEmacs package or to accompany a +precompiled version of Emacs, you might not know which TeX system will +be available when preview-latex gets used. In this case you should +build using the `--without-texmf-dir' option described previously. +This can also be convenient for systems that are intended to support +more than a single TeX distribution. Since more often than not TeX +packages for operating system distributions are either much more +outdated or much less complete than separately provided systems like +TeX Live, this method may be generally preferable when providing +packages. + + The following package structure would be adequate for a typical fully +supported Unix-like installation: + +`preview-tetex' + Style files and documentation for `preview.sty', placed into a TeX + tree where it is accessible from the teTeX executables usually + delivered with a system. If there are other commonly used TeX + system packages, it might be appropriate to provide separate + packages for those. + +`auctex-emacs-tetex' + This package will require the installation of `preview-tetex' and + will record in `TeX-macro-global' where to find the TeX tree. It + is also a good idea to run + emacs -batch -f TeX-auto-generate-global + when either AUCTeX or teTeX get installed or upgraded. If your + users might want to work with a different TeX distribution + (nowadays pretty common), instead consider the following: + +`auctex-emacs' + This package will be compiled with `--without-texmf-dir' and will + consequently contain the `preview' style files in its private + directory. It will probably not be possible to initialize + `TeX-macro-global' to a sensible value, so running + `TeX-auto-generate-global' does not appear useful. This package + would neither conflict with nor provide `preview-tetex'. + +`auctex-xemacs-tetex' +`auctex-xemacs' + Those are the obvious XEmacs equivalents. For XEmacs, there is the + additional problem that the XEmacs sumo package tree already + possibly provides its own version of AUCTeX, and the user might + even have used the XEmacs package manager to updating this + package, or even installing a private AUCTeX version. So you + should make sure that such a package will not conflict with + existing XEmacs packages and will be at an appropriate place in + the load order (after site-wide and user-specific locations, but + before a distribution-specific sumo package tree). Using the + `--without-packagedir' option might be one idea to avoid + conflicts. Another might be to refrain from providing an XEmacs + package and just rely on the user or system administrator to + instead use the XEmacs package system. + + +File: auctex.info, Node: Advice for non-privileged users, Next: Installation under MS Windows, Prev: Advice for package providers, Up: Installation + +1.2.6 Installation for non-privileged users +------------------------------------------- + +Often people without system administration privileges want to install +software for their private use. In that case you need to pass more +options to the `configure' script. For XEmacs users, this is fairly +easy, because the XEmacs package system has been designed to make this +sort of thing practical: but GNU Emacs users (and XEmacs users for whom +the package system is for some reason misbehaving) may need to do a +little more work. + + The main expedient is using the `--prefix' option to the `configure' +script, and let it point to the personal home directory. In that way, +resulting binaries will be installed under the `bin' subdirectory of +your home directory, manual pages under `man' and so on. It is +reasonably easy to maintain a bunch of personal software, since the +prefix argument is supported by most `configure' scripts. + + You'll have to add something like +`/home/myself/share/emacs/site-lisp' to your `load-path' variable, if +it isn't there already. + + XEmacs users can achieve the same end by pointing `configure' at an +appropriate package directory (normally +`--with-packagedir=~/.xemacs/xemacs-packages' will serve). The package +directory stands a good chance at being detected automatically as long +as it is in a subtree of the specified PREFIX. + + Now here is another thing to ponder: perhaps you want to make it easy +for other users to share parts of your personal Emacs configuration. In +general, you can do this by writing `~myself/' anywhere where you +specify paths to something installed in your personal subdirectories, +not merely `~/', since the latter, when used by other users, will point +to non-existent files. + + For yourself, it will do to manipulate environment variables in your +`.profile' resp. `.login' files. But if people will be copying just +Elisp files, their copies will not work. While it would in general be +preferable if the added components where available from a shell level, +too (like when you call the standalone info reader, or try using +`preview.sty' for functionality besides of Emacs previews), it will be +a big help already if things work from inside of Emacs. + + Here is how to do the various parts: + +Making the Elisp available +.......................... + +In GNU Emacs, it should be sufficient if people just do + + (load "~myself/share/emacs/site-lisp/auctex.el" nil t t) + (load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t) + + where the path points to your personal installation. The rest of the +package should be found relative from there without further ado. + + In XEmacs, you should ask the other users to add symbolic links in +the subdirectories `lisp', `info' and `etc' of their +`~/.xemacs/xemacs-packages/' directory. (Alas, there is presently no +easy programmatic way to do this, except to have a script do the +symlinking for them.) + +Making the Info files available +............................... + +For making the info files accessible from within Elisp, something like +the following might be convenient to add into your or other people's +startup files: + + (eval-after-load 'info + '(add-to-list 'Info-directory-list "~myself/info")) + + In XEmacs, as long as XEmacs can see the package, there should be no +need to do anything at all; the info files should be immediately +visible. However, you might want to set `INFOPATH' anyway, for the +sake of standalone readers outside of XEmacs. (The info files in XEmacs +are normally in `~/.xemacs/xemacs-packages/info'.) + +Making the LaTeX style available +................................ + +If you want others to be able to share your installation, you should +configure it using `--without-texmf-dir', in which case things should +work as well for them as for you. + + +File: auctex.info, Node: Installation under MS Windows, Next: Customizing, Prev: Advice for non-privileged users, Up: Installation + +1.2.7 Installation under MS Windows +----------------------------------- + +In a Nutshell +............. + +The following are brief installation instructions for the impatient. In +case you don't understand some of this, run into trouble of some sort, +or need more elaborate information, refer to the detailed instructions +further below. + + 1. Install the prerequisites, i.e. Emacs or XEmacs, MSYS or Cygwin, a + TeX system, and Ghostscript. + + 2. Open the MSYS shell or a Cygwin shell and change to the directory + containing the unzipped file contents. + + 3. Configure AUCTeX: + + For Emacs: Many people like to install AUCTeX into the pseudo file + system hierarchy set up by the Emacs installation. Assuming Emacs + is installed in `C:/Program Files/Emacs' and the directory for + local additions of your TeX system, e.g. MiKTeX, is + `C:/localtexmf', you can do this by typing the following statement + at the shell prompt: + + ./configure --prefix='C:/Program Files/Emacs' \ + --infodir='C:/Program Files/Emacs/info' \ + --with-texmf-dir='C:/localtexmf' + + For XEmacs: You can install AUCTeX as an XEmacs package. Assuming + XEmacs is installed in `C:/Program Files/XEmacs' and the directory + for local additions of your TeX system, e.g. MiKTeX, is + `C:/localtexmf', you can do this by typing the following command at + the shell prompt: + + ./configure --with-xemacs='C:/Program Files/XEmacs/bin/xemacs' \ + --with-texmf-dir='C:/localtexmf' + + The commands above are examples for common usage. More on + configuration options can be found in the detailed installation + instructions below. + + If the configuration script failed to find all required programs, + make sure that these programs are in your system path and add + directories containing the programs to the `PATH' environment + variable if necessary. Here is how to do that in W2000/XP: + + 1. On the desktop, right click "My Computer" and select + properties. + + 2. Click on "Advanced" in the "System Properties" window. + + 3. Select "Environment Variables". + + 4. Select "path" in "System Variables" and click "edit". Move + to the front in the line (this might require scrolling) and + add the missing path including drive letter, ended with a + semicolon. + + 4. If there were no further error messages, type + + make + + In case there were, please refer to the detailed description below. + + 5. Finish the installation by typing + + make install + +Detailed Installation Instructions +.................................. + +Installation of AUCTeX under Windows is in itself not more complicated +than on other platforms. However, meeting the prerequisites might +require more work than on some other platforms, and feel less natural. + + If you are experiencing any problems, even if you think they are of +your own making, be sure to report them to so +that we can explain things better in future. + + Windows is a problematic platform for installation scripts. The main +problem is that the installation procedure requires consistent file +names in order to find its way in the directory hierarchy, and Windows +path names are a mess. + + The installation procedure tries finding stuff in system search paths +and in Emacs paths. For that to succeed, you have to use the same +syntax and spelling and case of paths everywhere: in your system search +paths, in Emacs' `load-path' variable, as argument to the scripts. If +your path names contain spaces or other `shell-unfriendly' characters, +most notably backslashes for directory separators, place the whole path +in `"double quote marks"' whenever you specify it on a command line. + + Avoid `helpful' magic file names like `/cygdrive/c' and +`C:\PROGRA~1\' like the plague. It is quite unlikely that the scripts +will be able to identify the actual file names involved. Use the full +paths, making use of normal Windows drive letters like ` 'C:/Program +Files/Emacs' ' where required, and using the same combination of upper- +and lowercase letters as in the actual files. File names containing +shell-special characters like spaces or backslashes (if you prefer that +syntax) need to get properly quoted to the shell: the above example +used single quotes for that. + + Ok, now here are the steps to perform: + + 1. You need to unpack the AUCTeX distribution (which you seemingly + have done since you are reading this). It must be unpacked in a + separate installation directory outside of your Emacs file + hierarchy: the installation will later copy all necessary files to + their final destination, and you can ultimately remove the + directory where you unpacked the files. + + Line endings are a problem under Windows. The distribution + contains only text files, and theoretically most of the involved + tools should get along with that. However, the files are + processed by various utilities, and it is conceivable that not all + of them will use the same line ending conventions. If you + encounter problems, it might help if you try unpacking (or + checking out) the files in binary mode, if your tools allow that. + + If you don't have a suitable unpacking tool, skip to the next + step: this should provide you with a working `unzip' command. + + 2. The installation of AUCTeX will require the MSYS tool set from + `http://www.mingw.org/' or the Cygwin tool set from + `http://cygwin.com/'. The latter is slower and larger (the + download size of the base system is about 15 MB) but comes with a + package manager that allows for updating the tool set and + installing additional packages like, for example, the spell + checker aspell. + + If Cygwin specific paths like `/cygdrive/c' crop up in the course + of the installation, using a non-Cygwin Emacs could conceivably + cause trouble. Using Cygwin either for everything or nothing + might save headaches, _if_ things don't work out. + + 3. Install a current version of XEmacs from `http://www.xemacs.org/' + or Emacs from `ftp://ftp.gnu.org/gnu/emacs/windows/'. Emacs is + the recommended choice because it is currently the primary + platform for AUCTeX development. + + 4. You need a working TeX installation. One popular installation + under Windows is MiKTeX (http://www.miktex.org). Another much more + extensive system is TeX Live (http://www.tug.org/texlive) which is + rather close to its Unix cousins. + + 5. A working copy of Ghostscript (http://www.cs.wisc.edu/~ghost/) is + required for preview-latex operation. Examining the output from + gswin32c -h + on a Windows command line should tell you whether your Ghostscript + supports the `png16m' device needed for PNG support. MiKTeX + apparently comes with its own Ghostscript called `mgs.exe'. + + 6. Perl (http://www.perl.org) is needed for rebuilding the + documentation if you are working with a copy from CVS or have + touched documentation source files in the preview-latex part. If + the line endings of the file `preview/latex/preview.dtx' don't + correspond with what Perl calls `\n' when reading text files, + you'll run into trouble. + + 7. Now the fun stuff starts. If you have not yet done so, unpack the + AUCTeX distribution into a separate directory after rereading the + instructions for unpacking above. + + 8. Ready for takeoff. Start some shell (typically `bash') capable of + running `configure', change into the installation directory and + call `./configure' with appropriate options. + + Typical options you'll want to specify will be + `--prefix=DRIVE:/PATH/TO/EMACS-HIERARCHY' + which tells `configure' where to perform the installation. It + may also make `configure' find Emacs or XEmacs automatically; + if this doesn't happen, try one of `--with-emacs' or + `--with-xemacs' as described below. All automatic detection + of files and directories restricts itself to directories + below the PREFIX or in the same hierarchy as the program + accessing the files. Usually, directories like `man', + `share' and `bin' will be situated right under PREFIX. + + This option also affects the defaults for placing the Texinfo + documentation files (see also `--infodir' below) and + automatically generated style hooks. + + If you have a central directory hierarchy (not untypical with + Cygwin) for such stuff, you might want to specify its root + here. You stand a good chance that this will be the only + option you need to supply, as long as your TeX-related + executables are in your system path, which they better be for + AUCTeX's operation, anyway. + + `--with-emacs' + if you are installing for a version of Emacs. You can use + `--with-emacs=DRIVE:/PATH/TO/EMACS' to specify the name of the + installed Emacs executable, complete with its path if + necessary (if Emacs is not within a directory specified in + your `PATH' environment setting). + + `--with-xemacs' + if you are installing for a version of XEmacs. Again, you + can use `--with-xemacs=DRIVE:/PATH/TO/XEMACS' to specify the + name of the installed XEmacs executable complete with its + path if necessary. It may also be necessary to specify this + option if a copy of Emacs is found in your `PATH' environment + setting, but you still would like to install a copy of AUCTeX + for XEmacs. + + `--with-packagedir=DRIVE:/DIR' + is an XEmacs-only option giving the location of the package + directory. This will install and activate the package. + Emacs uses a different installation scheme: + + `--with-lispdir=DRIVE:/PATH/TO/SITE-LISP' + This Emacs-only option tells a place in `load-path' below + which the files are situated. The startup files `auctex.el' + and `preview-latex.el' will get installed here unless a + subdirectory `site-start.d' exists which will then be used + instead. The other files from AUCTeX will be installed in a + subdirectory called `auctex'. + + If you think that you need a different setup, please refer to + the full installation instructions in *note Configure::. + + `--infodir=DRIVE:/PATH/TO/INFO/DIRECTORY' + If you are installing into an Emacs directory, info files + have to be put into the `info' folder below that directory. + The configuration script will usually try to install into the + folder `share/info', so you have to override this by + specifying something like `--infodir='C:/Program Files/info'' + for the configure call. + + `--with-auto-dir=DRIVE:/DIR' + Directory containing automatically generated information. + You should not normally need to set this, as `--prefix' + should take care of this. + + `--disable-preview' + Use this option if your Emacs version is unable to support + image display. This will be the case if you are using a + native variant of Emacs 21. + + `--with-texmf-dir=DRIVE:/DIR' + This will specify the directory where your TeX installation + sits. If your TeX installation does not conform to the TDS + (TeX directory standard), you may need to specify more + options to get everything in place. + + For more information about any of the above and additional + options, see *note Configure::. + + Calling `./configure --help=recursive' will tell about other + options, but those are almost never required. + + Some executables might not be found in your path. That is not a + good idea, but you can get around by specifying environment + variables to `configure': + GS="DRIVE:/PATH/TO/GSWIN32C.EXE" ./configure ... + should work for this purpose. `gswin32c.exe' is the usual name for + the required _command line_ executable under Windows; in contrast, + `gswin32.exe' is likely to fail. + + As an alternative to specifying variables for the `configure' call + you can add directories containing the required executables to the + `PATH' variable of your Windows system. This is especially a good + idea if Emacs has trouble finding the respective programs later + during normal operation. + + 9. Run `make' in the installation directory. + + 10. Run `make install' in the installation directory. + + 11. With XEmacs, AUCTeX and preview-latex should now be active by + default. With Emacs, activation depends on a working + `site-start.d' directory or similar setup, since then the startup + files `auctex.el' and `preview-latex.el' will have been placed + there. If this has not been done, you should be able to load the + startup files manually with + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) + in either a site-wide `site-start.el' or your personal startup file + (usually accessible as `~/.emacs' from within Emacs and + `~/.xemacs/init.el' from within XEmacs). + + The default configuration of AUCTeX is probably not the best fit + for Windows systems. You might want to add + (require 'tex-mik) + or + (require 'tex-fptex) + in order to get more appropriate values for MiKTeX and fpTeX, + respectively after loading `auctex.el' and `preview-latex.el'. + + You can always use + + M-x customize-group RET AUCTeX RET + + in order to customize more stuff, or use the `Customize' menu. + + 12. Load `preview/circ.tex' into Emacs or XEmacs and see if you get the + `Command' menu. Try using it to LaTeX the file. + + 13. Check whether the `Preview' menu is available in this file. Use it + to generate previews for the document. + + If this barfs and tells you that image type `png' is not supported, + you can either add PNG support to your Emacs installation or + choose another image format to be used by preview-latex. + + Adding support for an image format usually involves the + installation of a library, e.g. from `http://gnuwin32.sf.net/'. + If you got your Emacs from `gnu.org' you might want to check its + README file (ftp://ftp.gnu.org/gnu/emacs/windows/README) for + details. + + A different image format can be chosen by setting the variable + `preview-image-type'. While it is recommended to keep the + `dvipng' or `png' setting, you can temporarily select a different + format like `pnm' to check if the lack of PNG support is the only + problem with your Emacs installation. + + Try adding the line + + (setq preview-image-type 'pnm) + + to your init file for a quick test. You should remove the line + after the test again, because PNM files take away *vast* amounts + of disk space, and thus also of load/save time. + + Well, that about is all. Have fun! + + +File: auctex.info, Node: Customizing, Prev: Installation under MS Windows, Up: Installation + +1.2.8 Customizing +----------------- + +Most of the site-specific customization should already have happened +during configuration of AUCTeX. Any further customization can be done +with customization buffers directly in Emacs. Just type `M-x +customize-group RET AUCTeX RET' to open the customization group for +AUCTeX or use the menu entries provided in the mode menus. Editing the +file `tex-site.el' as suggested in former versions of AUCTeX should not +be done anymore because the installation routine will overwrite those +changes. + + You might check some variables with a special significance. They are +accessible directly by typing `M-x customize-variable RET +RET'. + + -- User Option: TeX-macro-global + Directories containing the site's TeX style files. + + Normally, AUCTeX will only allow you to complete macros and +environments which are built-in, specified in AUCTeX style files or +defined by yourself. If you issue the `M-x TeX-auto-generate-global' +command after loading AUCTeX, you will be able to complete on all +macros available in the standard style files used by your document. To +do this, you must set this variable to a list of directories where the +standard style files are located. The directories will be searched +recursively, so there is no reason to list subdirectories explicitly. +Automatic configuration will already have set the variable for you if +it could use the program `kpsewhich'. In this case you normally don't +have to alter anything. + + +File: auctex.info, Node: Quick Start, Prev: Installation, Up: Introduction + +1.3 Quick Start +=============== + +AUCTeX is a powerful program offering many features and configuration +options. If you are new to AUCTeX this might be deterrent. +Fortunately you do not have to learn everything at once. This Quick +Start Guide will give you the knowledge of the most important commands +and enable you to prepare your first LaTeX document with AUCTeX after +only a few minutes of reading. + + In this introduction, we assume that AUCTeX is already installed on +your system. If this is not the case, you should read the file +`INSTALL' in the base directory of the unpacked distribution tarball. +These installation instructions are available in this manual as well, +*note Installation::. We also assume that you are familiar with the +way keystrokes are written in Emacs manuals. If not, have a look at +the Emacs Tutorial in the Help menu. + + If AUCTeX is installed, you might still need to activate it, by +inserting + + (load "auctex.el" nil t t) + + in your user init file.(1) In order to get support for many of the +LaTeX packages you will use in your documents, you should enable +document parsing as well, which can be achieved by putting + + (setq TeX-auto-save t) + (setq TeX-parse-self t) + + into your init file. Finally, if you often use `\include' or +`\input', you should make AUCTeX aware of the multi-file document +structure. You can do this by inserting + + (setq-default TeX-master nil) + + into your init file. Each time you open a new file, AUCTeX will then +ask you for a master file. + +* Menu: + +* Editing Facilities:: Functions for editing TeX files +* Processing Facilities:: Creating and viewing output, debugging + + ---------- Footnotes ---------- + + (1) This usually is a file in your home directory called `.emacs' if +you are utilizing GNU Emacs or `.xemacs/init.el' if you are using +XEmacs. + + +File: auctex.info, Node: Editing Facilities, Next: Processing Facilities, Up: Quick Start + +1.3.1 Functions for editing TeX files +------------------------------------- + +1.3.1.1 Making your TeX code more readable +.......................................... + +AUCTeX can do syntax highlighting of your source code, that means +commands will get special colors or fonts. You can enable it locally by +typing `M-x font-lock-mode RET'. If you want to have font locking +activated generally, enable `global-font-lock-mode', e.g. with `M-x +customize-variable RET global-font-lock-mode RET'. + + AUCTeX will indent new lines to indicate their syntactical +relationship to the surrounding text. For example, the text of a +`\footnote' or text inside of an environment will be indented relative +to the text around it. If the indenting has gotten wrong after adding +or deleting some characters, use to reindent the line, `M-q' for +the whole paragraph, or `M-x LaTeX-fill-buffer RET' for the whole +buffer. + +1.3.1.2 Entering sectioning commands +.................................... + +Insertion of sectioning macros, that is `\chapter', `\section', +`\subsection', etc. and accompanying `\label' commands may be eased by +using `C-c C-s'. You will be asked for the section level. As nearly +everywhere in AUCTeX, you can use the or key to get a list +of available level names, and to auto-complete what you started typing. +Next, you will be asked for the printed title of the section, and last +you will be asked for a label to be associated with the section. + +1.3.1.3 Inserting environments +.............................. + +Similarly, you can insert environments, that is `\begin{}'-`\end{}' +pairs: Type `C-c C-e', and select an environment type. Again, you can +use or to get a list, and to complete what you type. +Actually, the list will not only provide standard LaTeX environments, +but also take your `\documentclass' and `\usepackage' commands into +account if you have parsing enabled by setting `TeX-parse-self' to `t'. +If you use a couple of environments frequently, you can use the up and +down arrow keys (or `M-p' and `M-n') in the minibuffer to get back to +the previously inserted commands. + + Some environments need additional arguments. Often, AUCTeX knows +about this and asks you to enter a value. + +1.3.1.4 Inserting macros +........................ + +`C-c C-m', or simply `C-c RET' will give you a prompt that asks you for +a LaTeX macro. You can use for completion, or the up/down arrow +keys (or `M-p' and `M-n') to browse the command history. In many +cases, AUCTeX knows which arguments a macro needs and will ask you for +that. It even can differentiate between mandatory and optional +arguments--for details, see *note Completion::. + + An additional help for inserting macros is provided by the +possibility to complete macros right in the buffer. With point at the +end of a partially written macro, you can complete it by typing `M-TAB'. + +1.3.1.5 Changing the font +......................... + +AUCTeX provides convenient keyboard shortcuts for inserting macros +which specify the font to be used for typesetting certain parts of the +text. They start with `C-c C-f', and the last `C-' combination tells +AUCTeX which font you want: + +`C-c C-f C-b' + Insert bold face `\textbf{-!-}' text. + +`C-c C-f C-i' + Insert italics `\textit{-!-}' text. + +`C-c C-f C-e' + Insert emphasized `\emph{-!-}' text. + +`C-c C-f C-s' + Insert slanted `\textsl{-!-}' text. + +`C-c C-f C-r' + Insert roman \textrm{-!-} text. + +`C-c C-f C-f' + Insert sans serif `\textsf{-!-}' text. + +`C-c C-f C-t' + Insert typewriter `\texttt{-!-}' text. + +`C-c C-f C-c' + Insert SMALL CAPS `\textsc{-!-}' text. + +`C-c C-f C-d' + Delete the innermost font specification containing point. + + + If you want to change font attributes of existing text, mark it as a +region, and then invoke the commands. If no region is selected, the +command will be inserted with empty braces, and you can start typing the +changed text. + + Most of those commands will also work in math mode, but then macros +like `\mathbf' will be inserted. + +1.3.1.6 Other useful features +............................. + +AUCTeX also tries to help you when inserting the right "quote" signs +for your language, dollar signs to typeset math, or pairs of braces. +It offers shortcuts for commenting out text (`C-c ;' for the current +region or `C-c %' for the paragraph you are in). The same keystrokes +will remove the % signs, if the region or paragraph is commented out +yet. With `TeX-fold-mode', you can hide certain parts (like footnotes, +references etc.) that you do not edit currently. Support for Emacs' +outline mode is provided as well. And there's more, but this is beyond +the scope of this Quick Start Guide. + + +File: auctex.info, Node: Processing Facilities, Prev: Editing Facilities, Up: Quick Start + +1.3.2 Creating and viewing output, debugging +-------------------------------------------- + +1.3.2.1 One Command for LaTeX, helpers, viewers, and printing +............................................................. + +If you have typed some text and want to run LaTeX (or TeX, or other +programs--see below) on it, type `C-c C-c'. If applicable, you will be +asked whether you want to save changes, and which program you want to +invoke. In many cases, the choice that AUCTeX suggests will be just +what you want: first `latex', then a viewer. If a `latex' run produces +or changes input files for `makeindex', the next suggestion will be to +run that program, and AUCTeX knows that you need to run `latex' again +afterwards--the same holds for BibTeX. + + When no processor invocation is necessary anymore, AUCTeX will +suggest to run a viewer, or you can chose to create a PostScript file +using `dvips', or to directly print it. + + At this place, a warning needs to be given: First, although AUCTeX is +really good in detecting the standard situations when an additional +`latex' run is necessary, it cannot detect it always. Second, the +creation of PostScript files or direct printing currently only works +when your output file is a DVI file, not a PDF file. + + Ah, you didn't know you can do both? That brings us to the next +topic. + +1.3.2.2 Choosing an output format +................................. + +From a LaTeX file, you can produce DVI output, or a PDF file directly +via `pdflatex'. You can switch on source specials for easier +navigation in the output file, or tell `latex' to stop after an error +(usually `\noninteractive' is used, to allow you to detect all errors +in a single run). + + These options are controlled by toggles, the keystrokes should be +easy to memorize: + +`C-c C-t C-p' + This command toggles between DVI and PDF output + +`C-c C-t C-i' + toggles interactive mode + +`C-c C-t C-s' + toggles source specials support + +`C-c C-t C-o' + toggles usage of Omega/lambda. + + +1.3.2.3 Debugging LaTeX +....................... + +When AUCTeX runs a program, it creates an output buffer in which it +displays the output of the command. If there is a syntactical error in +your file, `latex' will not complete successfully. AUCTeX will tell you +that, and you can get to the place where the first error occured by +pressing `C-c `' (the last character is a backtick). The view will be +split in two windows, the output will be displayed in the lower buffer, +and both buffers will be centered around the place where the error +ocurred. You can then try to fix it in the document buffer, and use +the same keystrokes to get to the next error. This procedure may be +repeated until all errors have been dealt with. By pressing `C-c C-w' +(`TeX-toggle-debug-boxes') you can toggle whether AUCTeX should notify +you of overfull and underfull boxes in addition to regular errors. + + If a command got stuck in a seemingly infinite loop, or you want to +stop execution for other reasons, you can use `C-c C-k' (for "kill"). +Similar to `C-l', which centers the buffer you are in around your +current position, `C-c C-l' centers the output buffer so that the last +lines added at the bottom become visible. + +1.3.2.4 Running LaTeX on parts of your document +............................................... + +If you want to check how some part of your text looks like, and do not +want to wait until the whole document has been typeset, then mark it as +a region and use `C-c C-r'. It behaves just like `C-c C-c', but it +only uses the document preamble and the region you marked. + + If you are using `\include' or `\input' to structure your document, +try `C-c C-b' while you are editing one of the included files. It will +run `latex' only on the current buffer, using the preamble from the +master file. + + +File: auctex.info, Node: Editing, Next: Display, Prev: Introduction, Up: Top + +2 Editing the Document Source +***************************** + +The most commonly used commands/macros of AUCTeX are those which simply +insert templates for often used TeX, LaTeX, or ConTeXt constructs, like +font changes, handling of environments, etc. These features are very +simple, and easy to learn, and help you avoid mistakes like mismatched +braces, or `\begin{}'-`\end{}' pairs. + + Apart from that this chapter contains a description of some features +for entering more specialized sorts of text, for formatting the source +by indenting and filling and for navigating through the document. + +* Menu: + +* Quotes:: Inserting double quotes +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking + + +File: auctex.info, Node: Quotes, Next: Font Specifiers, Up: Editing + +2.1 Insertion of Quotes, Dollars, and Braces +============================================ + +Quotation Marks +--------------- + +In TeX, literal double quotes `"like this"' are seldom used, instead +two single quotes are used ```like this'''. To help you insert these +efficiently, AUCTeX allows you to continue to press `"' to insert two +single quotes. To get a literal double quote, press `"' twice. + + -- Command: TeX-insert-quote COUNT + (`"') Insert the appropriate quote marks for TeX. + + Inserts the value of `TeX-open-quote' (normally ```') or + `TeX-close-quote' (normally `''') depending on the context. With + prefix argument, always inserts `"' characters. + + -- User Option: TeX-open-quote + String inserted by typing `"' to open a quotation. (*Note + European::, for language-specific quotation mark insertion.) + + -- User Option: TeX-close-quote + String inserted by typing `"' to close a quotation. (*Note + European::, for language-specific quotation mark insertion.) + + -- User Option: TeX-quote-after-quote + Determines the behavior of `"'. If it is non-nil, typing `"' will + insert a literal double quote. The respective values of + `TeX-open-quote' and `TeX-close-quote' will be inserted after + typing `"' once again. + + The `babel' package provides special support for the requirements of +typesetting quotation marks in many different languages. If you use +this package, either directly or by loading a language-specific style +file, you should also use the special commands for quote insertion +instead of the standard quotes shown above. AUCTeX is able to +recognize several of these languages and will change quote insertion +accordingly. *Note European::, for details about this feature and how +to control it. + + In case you are using the `csquotes' package, you should customize +`LaTeX-csquotes-open-quote', `LaTeX-csquotes-close-quote' and +`LaTeX-csquotes-quote-after-quote'. The quotation characters will only +be used if both variables--`LaTeX-csquotes-open-quote' and +`LaTeX-csquotes-close-quote'--are non-empty strings. But then the +`csquotes'-related values will take precedence over the +language-specific ones. + +Dollar Signs +------------ + +In AUCTeX, dollar signs should match like they do in TeX. This has +been partially implemented, we assume dollar signs always match within +a paragraph. The first `$' you insert in a paragraph will do nothing +special. The second `$' will match the first. This will be indicated +by moving the cursor temporarily over the first dollar sign. + + -- Command: TeX-insert-dollar ARG + (`$') Insert dollar sign. + + Show matching dollar sign if this dollar sign end the TeX math + mode. Ensure double dollar signs match up correctly by inserting + extra dollar signs when needed if `TeX-math-close-double-dollar' + is non-nil. + + With optional ARG, insert that many dollar signs. + + -- User Option: TeX-math-close-double-dollar + Control the insertion of double dollar signs for delimiting display + math. (Note that you should not use double dollar signs in LaTeX + because this practice can lead to wrong spacing in typeset + documents.) If the variable is non-nil and you enter a dollar + sign that matches a double dollar sign `$$' AUCTeX will + automatically insert two dollar signs. + +Braces +------ + +To avoid unbalanced braces, it is useful to insert them pairwise. You +can do this by typing `C-c {'. + + -- Command: TeX-insert-braces + (`C-c {') Make a pair of braces and position the cursor to type + inside of them. If there is an active region, put braces around + it and leave point after the closing brace. + + +File: auctex.info, Node: Font Specifiers, Next: Sectioning, Prev: Quotes, Up: Editing + +2.2 Inserting Font Specifiers +============================= + +Perhaps the most used keyboard commands of AUCTeX are the short-cuts +available for easy insertion of font changing macros. + + If you give an argument (that is, type `C-u') to the font command, +the innermost font will be replaced, i.e. the font in the TeX group +around point will be changed. The following table shows the available +commands, with `-!-' indicating the position where the text will be +inserted. + +`C-c C-f C-b' + Insert bold face `\textbf{-!-}' text. + +`C-c C-f C-i' + Insert italics `\textit{-!-}' text. + +`C-c C-f C-e' + Insert emphasized `\emph{-!-}' text. + +`C-c C-f C-s' + Insert slanted `\textsl{-!-}' text. + +`C-c C-f C-r' + Insert roman \textrm{-!-} text. + +`C-c C-f C-f' + Insert sans serif `\textsf{-!-}' text. + +`C-c C-f C-t' + Insert typewriter `\texttt{-!-}' text. + +`C-c C-f C-c' + Insert SMALL CAPS `\textsc{-!-}' text. + +`C-c C-f C-d' + Delete the innermost font specification containing point. + + + -- Command: TeX-font replace what + (`C-c C-f') Insert template for font change command. + + If REPLACE is not nil, replace current font. WHAT determines the + font to use, as specified by `TeX-font-list'. + + -- User Option: TeX-font-list + List of fonts used by `TeX-font'. + + Each entry is a list with three elements. The first element is the + key to activate the font. The second element is the string to + insert before point, and the third element is the string to insert + after point. An optional fourth element means always replace if + not nil. + + -- User Option: LaTeX-font-list + List of fonts used by `TeX-font' in LaTeX mode. It has the same + structure as `TeX-font-list'. + + +File: auctex.info, Node: Sectioning, Next: Environments, Prev: Font Specifiers, Up: Editing + +2.3 Inserting chapters, sections, etc. +====================================== + +Insertion of sectioning macros, that is `\chapter', `\section', +`\subsection', etc. and accompanying `\label''s may be eased by using +`C-c C-s'. This command is highly customizable, the following +describes the default behavior. + + When invoking you will be asked for a section macro to insert. An +appropriate default is automatically selected by AUCTeX, that is +either: at the top of the document; the top level sectioning for that +document style, and any other place: The same as the last occurring +sectioning command. + + Next, you will be asked for the actual name of that section, and +last you will be asked for a label to be associated with that section. +The label will be prefixed by the value specified in +`LaTeX-section-hook'. + + -- Command: LaTeX-section ARG + (`C-c C-s') Insert a sectioning command. + + Determine the type of section to be inserted, by the argument ARG. + + * If ARG is nil or missing, use the current level. + + * If ARG is a list (selected by C-u), go downward one level. + + * If ARG is negative, go up that many levels. + + * If ARG is positive or zero, use absolute level: + + 0 : part + + + 1 : chapter + + + 2 : section + + + 3 : subsection + + + 4 : subsubsection + + + 5 : paragraph + + + 6 : subparagraph + + The following variables can be set to customize the function. + + `LaTeX-section-hook' + Hooks to be run when inserting a section. + + `LaTeX-section-label' + Prefix to all section references. + + + The precise behavior of `LaTeX-section' is defined by the contents +of `LaTeX-section-hook'. + + -- User Option: LaTeX-section-hook + List of hooks to run when a new section is inserted. + + The following variables are set before the hooks are run + + LEVEL + Numeric section level, default set by prefix arg to + `LaTeX-section'. + + NAME + Name of the sectioning command, derived from LEVEL. + + TITLE + The title of the section, default to an empty string. + + TOC + Entry for the table of contents list, default nil. + + DONE-MARK + Position of point afterwards, default nil meaning after the + inserted text. + + A number of hooks are already defined. Most likely, you will be + able to get the desired functionality by choosing from these hooks. + + `LaTeX-section-heading' + Query the user about the name of the sectioning command. + Modifies LEVEL and NAME. + + `LaTeX-section-title' + Query the user about the title of the section. Modifies TITLE. + + `LaTeX-section-toc' + Query the user for the toc entry. Modifies TOC. + + `LaTeX-section-section' + Insert LaTeX section command according to NAME, TITLE, and + TOC. If TOC is nil, no toc entry is inserted. If TOC or + TITLE are empty strings, DONE-MARK will be placed at the + point they should be inserted. + + `LaTeX-section-label' + Insert a label after the section command. Controlled by the + variable `LaTeX-section-label'. + + To get a full featured `LaTeX-section' command, insert + + (setq LaTeX-section-hook + '(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-toc + LaTeX-section-section + LaTeX-section-label)) + + in your `.emacs' file. + + The behavior of `LaTeX-section-label' is determined by the variable +`LaTeX-section-label'. + + -- User Option: LaTeX-section-label + Default prefix when asking for a label. + + If it is a string, it is used unchanged for all kinds of sections. + If it is nil, no label is inserted. If it is a list, the list is + searched for a member whose car is equal to the name of the + sectioning command being inserted. The cdr is then used as the + prefix. If the name is not found, or if the cdr is nil, no label + is inserted. + + By default, chapters have a prefix of `cha:' while sections and + subsections have a prefix of `sec:'. Labels are not automatically + inserted for other types of sections. + + +File: auctex.info, Node: Environments, Next: Mathematics, Prev: Sectioning, Up: Editing + +2.4 Inserting Environment Templates +=================================== + +A large apparatus is available that supports insertions of environments, +that is `\begin{}' -- `\end{}' pairs. + + AUCTeX is aware of most of the actual environments available in a +specific document. This is achieved by examining your `\documentclass' +command, and consulting a precompiled list of environments available in +a large number of styles. + + You insert an environment with `C-c C-e', and select an environment +type. Depending on the environment, AUCTeX may ask more questions +about the optional parts of the selected environment type. With `C-u +C-c C-e' you will change the current environment. + + -- Command: LaTeX-environment ARG + (`C-c C-e') AUCTeX will prompt you for an environment to insert. + At this prompt, you may press or to complete a + partially written name, and/or to get a list of available + environments. After selection of a specific environment AUCTeX may + prompt you for further specifications. + + If the optional argument ARG is not-nil (i.e. you have given a + prefix argument), the current environment is modified and no new + environment is inserted. + + As a default selection, AUCTeX will suggest the environment last +inserted or, as the first choice the value of the variable +`LaTeX-default-environment'. + + -- User Option: LaTeX-default-environment + Default environment to insert when invoking `LaTeX-environment' + first time. + + If the document is empty, or the cursor is placed at the top of the +document, AUCTeX will default to insert a `document' environment. + + Most of these are described further in the following sections, and +you may easily specify more. *Note Customizing Environments::. + +* Menu: + +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments + + You can close the current environment with `C-c ]', but we suggest +that you use `C-c C-e' to insert complete environments instead. + + -- Command: LaTeX-close-environment + (`C-c ]') Insert an `\end' that matches the current environment. + + +File: auctex.info, Node: Equations, Next: Floats, Up: Environments + +2.4.1 Equations +--------------- + +When inserting equation-like environments, the `\label' will have a +default prefix, which is controlled by the following variables: + + -- User Option: LaTeX-equation-label + Prefix to use for `equation' labels. + + -- User Option: LaTeX-eqnarray-label + Prefix to use for `eqnarray' labels. + + -- User Option: LaTeX-amsmath-label + Prefix to use for amsmath equation labels. Amsmath equations + include `align', `alignat', `xalignat', `aligned', `flalign' and + `gather'. + + +File: auctex.info, Node: Floats, Next: Itemize-like, Prev: Equations, Up: Environments + +2.4.2 Floats +------------ + +Figures and tables (i.e., floats) may also be inserted using AUCTeX. +After choosing either `figure' or `table' in the environment list +described above, you will be prompted for a number of additional things. + +FLOAT POSITION + This is the optional argument of float environments that controls + how they are placed in the final document. In LaTeX this is a + sequence of the letters `htbp' as described in the LaTeX manual. + The value will default to the value of `LaTeX-float'. + +CAPTION + This is the caption of the float. The default is to insert the + caption at the bottom of the float. You can specify floats where + the caption should be placed at the top with + `LaTeX-top-caption-list'. + +LABEL + The label of this float. The label will have a default prefix, + which is controlled by the variables `LaTeX-figure-label' and + `LaTeX-table-label'. + + Moreover, you will be asked if you want the contents of the float +environment to be horizontally centered. Upon a positive answer a +`\centering' macro will be inserted at the beginning of the float +environment. + + -- User Option: LaTeX-float + Default placement for floats. + + -- User Option: LaTeX-figure-label + Prefix to use for figure labels. + + -- User Option: LaTeX-table-label + Prefix to use for table labels. + + -- User Option: LaTeX-top-caption-list + List of float environments with top caption. + + +File: auctex.info, Node: Itemize-like, Next: Tabular-like, Prev: Floats, Up: Environments + +2.4.3 Itemize-like Environments +------------------------------- + +In an itemize-like environment, nodes (i.e., `\item's) may be inserted +using `C-c '. + + -- Command: LaTeX-insert-item + (`C-c ') Close the current item, move to the next line and + insert an appropriate `\item' for the current environment. That is, + `itemize' and `enumerate' will have `\item ' inserted, while + `description' will have `\item[]' inserted. + + +File: auctex.info, Node: Tabular-like, Next: Customizing Environments, Prev: Itemize-like, Up: Environments + +2.4.4 Tabular-like Environments +------------------------------- + +When inserting Tabular-like environments, that is, `tabular' `array' +etc., you will be prompted for a template for that environment. +Related variables: + + -- User Option: LaTeX-default-format + Default format string for array and tabular environments. + + -- User Option: LaTeX-default-position + Default position string for array and tabular environments. If + nil, act like the empty string is given, but don't prompt for a + position. + + +File: auctex.info, Node: Customizing Environments, Prev: Tabular-like, Up: Environments + +2.4.5 Customizing Environments +------------------------------ + +*Note Adding Environments::, for how to customize the list of known +environments. + + +File: auctex.info, Node: Mathematics, Next: Completion, Prev: Environments, Up: Editing + +2.5 Entering Mathematics +======================== + +TeX is written by a mathematician, and has always contained good +support for formatting mathematical text. AUCTeX supports this +tradition, by offering a special minor mode for entering text with many +mathematical symbols. You can enter this mode by typing `C-c ~'. + + -- Command: LaTeX-math-mode + (`C-c ~') Toggle LaTeX Math mode. This is a minor mode rebinding + the key `LaTeX-math-abbrev-prefix' to allow easy typing of + mathematical symbols. ``' will read a character from the keyboard, + and insert the symbol as specified in `LaTeX-math-default' and + `LaTeX-math-list'. If given a prefix argument, the symbol will be + surrounded by dollar signs. + + You can use another prefix key (instead of ``') by setting the +variable `LaTeX-math-abbrev-prefix'. + + To enable LaTeX Math mode by default, add the following in your +`.emacs' file: + (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) + + -- User Option: LaTeX-math-abbrev-prefix + A string containing the prefix of `LaTeX-math-mode' commands; This + value defaults to ``'. + + The string has to be a key or key sequence in a format understood + by the `kbd' macro. This corresponds to the syntax usually used + in the manuals for Emacs Emacs Lisp. + + The variable `LaTeX-math-list' allows you to add your own mappings. + + -- User Option: LaTeX-math-list + A list containing user-defined keys and commands to be used in + LaTeX Math mode. Each entry should be a list of two to four + elements. + + First, the key to be used after `LaTeX-math-abbrev-prefix' for + macro insertion. If it is nil, the symbol has no associated + keystroke (it is available in the menu, though). + + Second, a string representing the name of the macro (without a + leading backslash.) + + Third, a string representing the name of a submenu the command + should be added to. Use a list of strings in case of nested menus. + + Fourth, the position of a Unicode character to be displayed in the + menu alongside the macro name. This is an integer value. + + -- User Option: LaTeX-math-menu-unicode + Whether the LaTeX menu should try using Unicode for effect. Your + Emacs built must be able to display include Unicode characters in + menus for this feature. + + AUCTeX's reference card `tex-ref.tex' includes a list of all math +mode commands. + + AUCTeX can help you write subscripts and superscripts in math +constructs by automatically inserting a pair of braces after typing <_> +or <^> respectively and putting point between the braces. In order to +enable this feature, set the variable +`TeX-electric-sub-and-superscript' to a non-nil value. + + -- User Option: TeX-electric-sub-and-superscript + If non-nil, insert braces after typing <^> and <_> in math mode. + + +File: auctex.info, Node: Completion, Next: Commenting, Prev: Mathematics, Up: Editing + +2.6 Completion +============== + +Emacs lisp programmers probably know the `lisp-complete-symbol' +command, usually bound to `M-'. Users of the wonderful ispell +mode know and love the `ispell-complete-word' command from that +package. Similarly, AUCTeX has a `TeX-complete-symbol' command, by +default bound to `M-' which is equivalent to `M-C-i'. Using +`TeX-complete-symbol' makes it easier to type and remember the names of +long LaTeX macros. + + In order to use `TeX-complete-symbol', you should write a backslash +and the start of the macro. Typing `M-' will now complete as much +of the macro, as it unambiguously can. For example, if you type +``\renewc'' and then `M-', it will expand to ``\renewcommand''. + + -- Command: TeX-complete-symbol + (`M-') Complete TeX symbol before point. + + A more direct way to insert a macro is with `TeX-insert-macro', +bound to `C-c C-m' which is equivalent to `C-c '. It has the +advantage over completion that it knows about the argument of most +standard LaTeX macros, and will prompt for them. It also knows about +the type of the arguments, so it will for example give completion for +the argument to `\include'. Some examples are listed below. + + -- Command: TeX-insert-macro + (`C-c C-m' or `C-c ') Prompt (with completion) for the name + of a TeX macro, and if AUCTeX knows the macro, prompt for each + argument. + + As a default selection, AUCTeX will suggest the macro last inserted +or, as the first choice the value of the variable `TeX-default-macro'. + + -- User Option: TeX-insert-macro-default-style + Specifies whether `TeX-insert-macro' will ask for all optional + arguments. + + If set to the symbol `show-optional-args', `TeX-insert-macro' asks + for optional arguments of TeX macros. If set to + `mandatory-args-only', `TeX-insert-macro' asks only for mandatory + arguments. When `TeX-insert-macro' is called with prefix argument + (`C-u'), it's the other way round. + + Note that for some macros, there are special mechanisms, e.g. + `LaTeX-includegraphics-options-alist'. + + + -- User Option: TeX-default-macro + Default macro to insert when invoking `TeX-insert-macro' first + time. + + A faster alternative is to bind the function `TeX-electric-macro' to +`\'. This can be done by setting the variable `TeX-electric-escape' + + -- User Option: TeX-electric-escape + If this is non-nil when AUCTeX is loaded, the TeX escape character + `\' will be bound to `TeX-electric-macro' + + The difference between `TeX-insert-macro' and `TeX-electric-macro' +is that space will complete and exit from the minibuffer in +`TeX-electric-macro'. Use if you merely want to complete. + + -- Command: TeX-electric-macro + Prompt (with completion) for the name of a TeX macro, and if + AUCTeX knows the macro, prompt for each argument. Space will + complete and exit. + + By default AUCTeX will put an empty set braces `{}' after a macro +with no arguments to stop it from eating the next whitespace. This can +be stopped by entering `LaTeX-math-mode', *note Mathematics::, or by +setting `TeX-insert-braces' to nil. + + -- User Option: TeX-insert-braces + If non-nil, append a empty pair of braces after inserting a macro. + + Completions work because AUCTeX can analyze TeX files, and store +symbols in Emacs Lisp files for later retrieval. *Note Automatic::, for +more information. + + AUCTeX will also make completion for many macro arguments, for +example existing labels when you enter a `\ref' macro with +`TeX-insert-macro' or `TeX-electric-macro', and BibTeX entries when you +enter a `\cite' macro. For this kind of completion to work, parsing +must be enabled as described in *note Parsing Files::. For `\cite' you +must also make sure that the BibTeX files have been saved at least once +after you enabled automatic parsing on save, and that the basename of +the BibTeX file does not conflict with the basename of one of TeX files. + + +File: auctex.info, Node: Commenting, Next: Indenting, Prev: Completion, Up: Editing + +2.7 Commenting +============== + +It is often necessary to comment out temporarily a region of TeX or +LaTeX code. This can be done with the commands `C-c ;' and `C-c %'. +`C-c ;' will comment out all lines in the current region, while `C-c %' +will comment out the current paragraph. Type `C-c ;' again to +uncomment all lines of a commented region, or `C-c %' again to +uncomment all comment lines around point. These commands will insert +or remove a single `%' respectively. + + -- Command: TeX-comment-or-uncomment-region + (`C-c ;') Add or remove `%' from the beginning of each line in the + current region. Uncommenting works only if the region encloses + solely commented lines. If AUCTeX should not try to guess if the + region should be commented or uncommented the commands + `TeX-comment-region' and `TeX-uncomment-region' can be used to + explicitly comment or uncomment the region in concern. + + -- Command: TeX-comment-or-uncomment-paragraph + (`C-c %') Add or remove `%' from the beginning of each line in the + current paragraph. When removing `%' characters the paragraph is + considered to consist of all preceding and succeeding lines + starting with a `%', until the first non-comment line. + + +File: auctex.info, Node: Indenting, Next: Filling, Prev: Commenting, Up: Editing + +2.8 Indenting +============= + +Indentation means the addition of whitespace at the beginning of lines +to reflect special syntactical constructs. This makes it easier to see +the structure of the document, and to catch errors such as a missing +closing brace. Thus, the indentation is done for precisely the same +reasons that you would indent ordinary computer programs. + + Indentation is done by LaTeX environments and by TeX groups, that is +the body of an environment is indented by the value of +`LaTeX-indent-level' (default 2). Also, items of an `itemize-like' +environment are indented by the value of `LaTeX-item-indent', default +-2. (Items are identified with the help of `LaTeX-item-regexp'.) If +more environments are nested, they are indented `accumulated' just like +most programming languages usually are seen indented in nested +constructs. + + You can explicitely indent single lines, usually by pressing , +or marked regions by calling `indent-region' on it. If you have +`auto-fill-mode' enabled and a line is broken while you type it, Emacs +automatically cares about the indentation in the following line. If +you want to have a similar behavior upon typing , you can +customize the variable `TeX-newline-function' and change the default of +`newline' which does no indentation to `newline-and-indent' which +indents the new line or `reindent-then-newline-and-indent' which +indents both the current and the new line. + + There are certain LaTeX environments which should be indented in a +special way, like `tabular' or `verbatim'. Those environments may be +specified in the variable `LaTeX-indent-environment-list' together with +their special indentation functions. Taking the `verbatim' environment +as an example you can see that `current-indentation' is used as the +indentation function. This will stop AUCTeX from doing any indentation +in the environment if you hit for example. + + There are environments in `LaTeX-indent-environment-list' which do +not bring a special indentation function with them. This is due to the +fact that first the respective functions are not implemented yet and +second that filling will be disabled for the specified environments. +This shall prevent the source code from being messed up by accidently +filling those environments with the standard filling routine. If you +think that providing special filling routines for such environments +would be an appropriate and challenging task for you, you are invited to +contribute. (*Note Filling::, for further information about the filling +functionality) + + The check for the indentation function may be enabled or disabled by +customizing the variable `LaTeX-indent-environment-check'. + + As a side note with regard to formatting special environments: Newer +Emacsen include `align.el' and therefore provide some support for +formatting `tabular' and `tabbing' environments with the function +`align-current' which will nicely align columns in the source code. + + AUCTeX is able to format commented parts of your code just as any +other part. This means LaTeX environments and TeX groups in comments +will be indented syntactically correct if the variable +`LaTeX-syntactic-comments' is set to t. If you disable it, comments +will be filled like normal text and no syntactic indentation will be +done. + + Following you will find a list of most commands and variables related +to indenting with a small summary in each case: + +`' + `LaTeX-indent-line' will indent the current line. + +`' + `newline-and-indent' inserts a new line (much like ) and + moves the cursor to an appropriate position by the left margin. + + Most keyboards nowadays lack a linefeed key and `C-j' may be + tedious to type. Therefore you can customize AUCTeX to perform + indentation upon typing as well. The respective option is + called `TeX-newline-function'. + +`C-j' + Alias for + + -- User Option: LaTeX-indent-environment-list + List of environments with special indentation. The second element + in each entry is the function to calculate the indentation level in + columns. + + The filling code currently cannot handle tabular-like environments + which will be completely messed-up if you try to format them. + This is why most of these environments are included in this + customization option without a special indentation function. This + will prevent that they get filled. + + -- User Option: LaTeX-indent-level + Number of spaces to add to the indentation for each `\begin' not + matched by a `\end'. + + -- User Option: LaTeX-item-indent + Number of spaces to add to the indentation for `\item''s in list + environments. + + -- User Option: TeX-brace-indent-level + Number of spaces to add to the indentation for each `{' not + matched by a `}'. + + -- User Option: LaTeX-syntactic-comments + If non-nil comments will be filled and indented according to LaTeX + syntax. Otherwise they will be filled like normal text. + + -- User Option: TeX-newline-function + Used to specify the function which is called when is pressed. + This will normally be `newline' which simply inserts a new line. + In case you want to have AUCTeX do indentation as well when you + press , use the built-in functions `newline-and-indent' or + `reindent-then-newline-and-indent'. The former inserts a new line + and indents the following line, i.e. it moves the cursor to the + right position and therefore acts as if you pressed . The + latter function additionally indents the current line. If you + choose `Other', you can specify your own fancy function to be + called when is pressed. + + +File: auctex.info, Node: Filling, Prev: Indenting, Up: Editing + +2.9 Filling +=========== + +Filling deals with the insertion of line breaks to prevent lines from +becoming wider than what is specified in `fill-column'. The linebreaks +will be inserted automatically if `auto-fill-mode' is enabled. In this +case the source is not only filled but also indented automatically as +you write it. + + `auto-fill-mode' can be enabled for AUCTeX by calling +`turn-on-auto-fill' in one of the hooks AUCTeX is running. *Note Modes +and Hooks::. As an example, if you want to enable `auto-fill-mode' in +`LaTeX-mode', put the following into your init file: + + (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) + + You can manually fill explicitely marked regions, paragraphs, +environments, complete sections, or the whole buffer. (Note that manual +filling in AUCTeX will indent the start of the region to be filled in +contrast to many other Emacs modes.) + + There are some syntactical constructs which are handled specially +with regard to filling. These are so-called code comments and paragraph +commands. + + Code comments are comments preceded by code or text in the same line. +Upon filling a region, code comments themselves will not get filled. +Filling is done from the start of the region to the line with the code +comment and continues after it. In order to prevent overfull lines in +the source code, a linebreak will be inserted before the last +non-comment word by default. This can be changed by customizing +`LaTeX-fill-break-before-code-comments'. If you have overfull lines +with code comments you can fill those explicitely by calling +`LaTeX-fill-paragraph' or pressing `M-q' with the cursor positioned on +them. This will add linebreaks in the comment and indent subsequent +comment lines to the column of the comment in the first line of the +code comment. In this special case `M-q' only acts on the current line +and not on the whole paragraph. + + Lines with `\par' are treated similarly to code comments, i.e. +`\par' will be treated as paragraph boundary which should not be +followed by other code or text. But it is not treated as a real +paragraph boundary like an empty line where filling a paragraph would +stop. + + Paragraph commands like `\section' or `\noindent' (the list of +commands is defined by `LaTeX-paragraph-commands') are often to be +placed in their own line(s). This means they should not be consecuted +with any preceding or following adjacent lines of text. AUCTeX will +prevent this from happening if you do not put any text except another +macro after the end of the last brace of the respective macro. If +there is other text after the macro, AUCTeX regards this as a sign that +the macro is part of the following paragraph. + + Here are some examples: + + \begin{quote} + text text text text + + \begin{quote}\label{foo} + text text text text + + If you press `M-q' on the first line in both examples, nothing will +change. But if you write + + \begin{quote} text + text text text text + + and press `M-q', you will get + + \begin{quote} text text text text text + + Besides code comments and paragraph commands, another speciality of +filling in AUCTeX involves commented lines. You should be aware that +these comments are treated as islands in the rest of the LaTeX code if +syntactic filling is enabled. This means, for example, if you try to +fill an environment with `LaTeX-fill-environment' and have the cursor +placed on a commented line which does not have a surrounding +environment inside the comment, AUCTeX will report an error. + + The relevant commands and variables with regard to filling are: + +`C-c C-q C-p' + `LaTeX-fill-paragraph' will fill and indent the current paragraph. + +`M-q' + Alias for `C-c C-q C-p' + +`C-c C-q C-e' + `LaTeX-fill-environment' will fill and indent the current + environment. This may e.g. be the `document' environment, in + which case the entire document will be formatted. + +`C-c C-q C-s' + `LaTeX-fill-section' will fill and indent the current logical + sectional unit. + +`C-c C-q C-r' + `LaTeX-fill-region' will fill and indent the current region. + + -- User Option: LaTeX-fill-break-at-separators + List of separators before or after which respectively linebreaks + will be inserted if they do not fit into one line. The separators + can be curly braces, brackets, switches for inline math (`$', `\(', + `\)') and switches for display math (`\[', `\]'). Such formatting + can be useful to make macros and math more visible or to prevent + overfull lines in the LaTeX source in case a package for + displaying formatted TeX output inside the Emacs buffer, like + preview-latex, is used. + + -- User Option: LaTeX-fill-break-before-code-comments + Code comments are comments preceded by some other text in the same + line. When a paragraph containing such a comment is to be filled, + the comment start will be seen as a border after which no line + breaks will be inserted in the same line. If the option + `LaTeX-fill-break-before-code-comments' is enabled (which is the + default) and the comment does not fit into the line, a line break + will be inserted before the last non-comment word to minimize the + chance that the line becomes overfull. + + +File: auctex.info, Node: Display, Next: Processing, Prev: Editing, Up: Top + +3 Controlling Screen Display +**************************** + +It is often desirable to get visual help of what markup code in a text +actually does whithout having to decipher it explicitely. For this +purpose Emacs and AUCTeX provide font locking (also known as syntax +highlighting) which visually sets off markup code like macros or +environments by using different colors or fonts. For example text to be +typeset in italics can be displayed with an italic font in the editor as +well, or labels and references get their own distinct color. + + While font locking helps you grasp the purpose of markup code and +separate markup from content, the markup code can still be distracting. +AUCTeX lets you hide those parts and show them again at request with +its built-in support for hiding macros and environments which we call +folding here. + + Besides folding of macros and environments, AUCTeX provides support +for Emacs' outline mode which lets you narrow the buffer content to +certain sections of your text by hiding the parts not belonging to these +sections. + +* Menu: + +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document + + +File: auctex.info, Node: Font Locking, Next: Folding, Up: Display + +3.1 Font Locking +================ + +Font locking is supposed to improve readability of the source code by +highlighting certain keywords with different colors or fonts. It +thereby lets you recognize the function of markup code to a certain +extent without having to read the markup command. For general +information on controlling font locking with Emacs' Font Lock mode, see +*note Font Lock Mode: (emacs)Font Lock. + + -- User Option: TeX-install-font-lock + Once font locking is enabled globally or for the major modes + provided by AUCTeX, the font locking patterns and functionality of + font-latex are activated by default. You can switch to a + different font locking scheme or disable font locking in AUCTeX by + customizing the variable `TeX-install-font-lock'. + + Besides font-latex AUCTeX ships with a scheme which is derived + from Emacs' default LaTeX mode and activated by choosing + `tex-font-setup'. Be aware that this scheme is not coupled with + AUCTeX's style system and not the focus of development. Therefore + and due to font-latex being much more feature-rich the following + explanations will only cover font-latex. + + In case you want to hook in your own fontification scheme, you can + choose `other' and insert the name of the function which sets up + your font locking patterns. If you want to disable fontification + in AUCTeX completely, choose `ignore'. + + font-latex provides many options for customization which are +accessible with `M-x customize-group RET font-latex RET'. For this +description the various options are explained in conceptional groups. + +* Menu: + +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex +* Known problems:: Known fontification problems + + +File: auctex.info, Node: Fontification of macros, Next: Fontification of quotes, Up: Font Locking + +3.1.1 Fontification of macros +----------------------------- + +Highlighting of macros can be customized by adapting keyword lists which +can be found in the customization group `font-latex-keywords'. + + Three types of macros can be handled differently with respect to +fontification: + + 1. Commands of the form `\foo[bar]{baz}' which consist of the macro + itself, optional arguments in square brackets and mandatory + arguments in curly braces. For the command itself the face + `font-lock-keyword-face' will be used and for the optional + arguments the face `font-lock-variable-name-face'. The face + applied to the mandatory argument depends on the macro class + represented by the respective built-in variables. + + 2. Declaration macros of the form `{\foo text}' which consist of the + macro which may be enclosed in a TeX group together with text to be + affected by the macro. In case a TeX group is present, the macro + will get the face `font-lock-keyword-face' and the text will get + the face configured for the respective macro class. If no TeX + group is present, the latter face will be applied to the macro + itself. + + 3. Simple macros of the form `\foo' which do not have any arguments or + groupings. The respective face will be applied to the macro + itself. + + Customization variables for `\foo[bar]{baz}' type macros allow both +the macro name and the sequence of arguments to be specified. The +latter is done with a string which can contain the characters +`*' + indicating the existence of a starred variant for the macro, + +`[' + for optional arguments in brackets, + +`{' + for mandatory arguments in braces, + +`\' + for mandatory arguments consisting of a single macro and + +`|' + as a prefix indicating that two alternatives are following. + For example the specifier for `\documentclass' would be `[{' because +the macro has one optional followed by one mandatory argument. The +specifier for `\newcommand' would be `*|{\[[{' because there is a +starred variant, the mandatory argument following the macro name can be +a macro or a TeX group which can be followed by two optional arguments +and the last token is a mandatory argument in braces. + + Customization variables for the `{\foo text}' and `\foo' types are +simple lists of strings where each entry is a macro name (without the +leading backslash). + +General macro classes +--------------------- + +font-latex provides keyword lists for different macro classes which are +described in the following table: + +`font-latex-match-function-keywords' + Keywords for macros defining or related to functions, like + `\newcommand'. + Type: `\macro[...]{...}' + Face: `font-lock-function-name-face' + +`font-latex-match-reference-keywords' + Keywords for macros defining or related to references, like `\ref'. + Type: `\macro[...]{...}' + Face: `font-lock-constant-face' + +`font-latex-match-textual-keywords' + Keywords for macros specifying textual content, like `\caption'. + Type: `\macro[...]{...}' + Face: `font-lock-type-face' + +`font-latex-match-variable-keywords' + Keywords for macros defining or related to variables, like + `\setlength'. + Type: `\macro[...]{...}' + Face: `font-lock-variable-name-face' + +`font-latex-match-warning-keywords' + Keywords for important macros, e.g. affecting line or page break, + like `\clearpage'. + Type: `\macro' + Face: `font-latex-warning-face' + +Sectioning commands +------------------- + +Sectioning commands are macros like `\chapter' or `\section'. For +these commands there are two fontification schemes which may be +selected by customizing the variable `font-latex-fontify-sectioning'. + + -- User Option: font-latex-fontify-sectioning + Per default sectioning commands will be shown in a larger, + proportional font, which corresponds to a number for this + variable. The font size varies with the sectioning level, e.g. + `\part' (`font-latex-sectioning-0-face') has a larger font than + `\paragraph' (`font-latex-sectioning-5-face'). Typically, values + from 1.05 to 1.3 for `font-latex-fontify-sectioning' give best + results, depending on your font setup. If you rather like to use + the base font and a different color, set the variable to the symbol + `color'. In this case the face `font-lock-type-face' will be used + to fontify the argument of the sectioning commands. + + You can make font-latex aware of your own sectioning commands be +adding them to the keyword lists: +`font-latex-match-sectioning-0-keywords' +(`font-latex-sectioning-0-face') ... +`font-latex-match-sectioning-5-keywords' +(`font-latex-sectioning-5-face'). + + Related to sectioning there is special support for slide titles which +may be fontified with the face `font-latex-slide-title-face'. You can +add macros which should appear in this face by customizing the variable +`font-latex-match-slide-title-keywords'. + +Commands for changing fonts +--------------------------- + +LaTeX provides various macros for changing fonts or font attributes. +For example, you can select an italic font with `\textit{...}' or bold +with `\textbf{...}'. An alternative way to specify these fonts is to +use special macros in TeX groups, like `{\itshape ...}' for italics and +`{\bfseries ...}' for bold. As mentioned above, we call the former +variants commands and the latter declarations. + + Besides the macros for changing fonts provided by LaTeX there is an +infinite number of other macros--either defined by yourself for logical +markup or defined by macro packages--which affect the font in the +typeset text. While LaTeX's built-in macros and macros of packages +known by AUCTeX are already handled by font-latex, different keyword +lists per type style and macro type are provided for entering your own +macros which are listed in the table below. + +`font-latex-match-bold-command-keywords' + Keywords for commands specifying a bold type style. + Face: `font-latex-bold-face' + +`font-latex-match-italic-command-keywords' + Keywords for commands specifying an italic font. + Face: `font-latex-italic-face' + +`font-latex-match-math-command-keywords' + Keywords for commands specifying a math font. + Face: `font-latex-math-face' + +`font-latex-match-type-command-keywords' + Keywords for commands specifying a typewriter font. + Face: `font-lock-type-face' + +`font-latex-match-bold-declaration-keywords' + Keywords for declarations specifying a bold type style. + Face: `font-latex-bold-face' + +`font-latex-match-italic-declaration-keywords' + Keywords for declarations specifying an italic font. + Face: `font-latex-italic-face' + +`font-latex-match-type-declaration-keywords' + Keywords for declarations specifying a typewriter font. + Face: `font-latex-type-face' + +Deactivating defaults of built-in keyword classes +------------------------------------------------- + +font-latex ships with predefined lists of keywords for the classes +described above. You can disable these defaults per class by +customizing the variable `font-latex-deactivated-keyword-classes'. +This is a list of strings for keyword classes to be deactivated. Valid +entries are "warning", "variable", "reference", "function" , +"sectioning-0", "sectioning-1", "sectioning-2", "sectioning-3", +"sectioning-4", "sectioning-5", "textual", "bold-command", +"italic-command", "math-command", "type-command", "bold-declaration", +"italic-declaration", "type-declaration". + + You can also get rid of certain keywords only. For example if you +want to remove highlighting of footnotes as references you can put the +following stanza into your init file: + + (eval-after-load "font-latex" + '(setq-default + font-latex-match-reference-keywords-local + (remove "footnote" font-latex-match-reference-keywords-local))) + + But note that this means fiddling with font-latex's internals and is +not guaranteed to work in future versions of font-latex. + +User-defined keyword classes +---------------------------- + +In case the customization options explained above do not suffice for +your needs, you can specify your own keyword classes by customizing the +variable `font-latex-user-keyword-classes'. + + -- User Option: font-latex-user-keyword-classes + Every keyword class consists of four parts, a name, a list of + keywords, a face and a specifier for the type of macros to be + highlighted. + + When adding new entries, you have to use unique values for the + class names, i.e. they must not clash with names of the built-in + keyword classes or other names given by you. Additionally the + names must not contain spaces. + + The list of keywords defines which commands and declarations + should be covered by the keyword class. A keyword can either be a + simple command name omitting the leading backslash or a list + consisting of the command name and a string specifying the + sequence of arguments for the command. + + The face argument can either be an existing face or font + specifications made by you. (The latter option is not available + on XEmacs.) + + There are three alternatives for the type of keywords--"Command + with arguments", "Declaration inside TeX group" and "Command + without arguments"--which correspond with the macro types + explained above. + + +File: auctex.info, Node: Fontification of quotes, Next: Fontification of math, Prev: Fontification of macros, Up: Font Locking + +3.1.2 Fontification of quotes +----------------------------- + +Text in quotation marks is displayed with the face +`font-latex-string-face'. Besides the various forms of opening and +closing double and single quotation marks, so-called guillemets (<<, >>) +can be used for quoting. Because there are two styles of using +them--French style: << text >>; German style: >>text<<--you can +customize the variable `font-latex-quotes' to tell font-latex which +type you are using if the correct value cannot be derived from document +properties. + + -- User Option: font-latex-quotes + The default value of `font-latex-quotes' is `auto' which means + that font-latex will try to derive the correct type of quotation + mark matching from document properties like the language option + supplied to the babel LaTeX package. + + If the automatic detection fails for you and you mostly use one + specific style you can set it to a specific language-dependent + value as well. Set the value to `german' if you are using + >>German quotes<< and to `french' if you are using << French + quotes >>. font-latex will recognize the different ways these + quotes can be given in your source code, i.e. (`"<', `">'), (`<<', + `>>') and the respective 8-bit variants. + + If you set `font-latex-quotes' to nil, quoted content will not be + fontified. + + +File: auctex.info, Node: Fontification of math, Next: Verbatim content, Prev: Fontification of quotes, Up: Font Locking + +3.1.3 Fontification of mathematical constructs +---------------------------------------------- + +In LaTeX mathematics can be indicated by a variety of different +methods: toggles (like dollar signs), macros and environments. Math +constructs known by font-latex are displayed with the face +`font-latex-math-face'. Support for dollar signs and shorthands like +`\(...\)' or `\[...\]' is built-in and not customizable. Support for +other math macros and environments can be adapted by customizing the +variables `font-latex-match-math-command-keywords' and +`font-latex-math-environments' respectively. + + In order to make math constructs more readable, font-latex displays +subscript and superscript parts in a smaller font and raised or lowered +respectively. This fontification feature can be controlled with the +variables `font-latex-fontify-script' and `font-latex-script-display'. + + -- User Option: font-latex-fontify-script + If non-nil, fontify subscript and superscript strings. + + Note that this feature is not available on XEmacs, for which it is + disabled per default. In GNU Emacs raising and lowering is not + enabled for versions 21.3 and before due to it working not + properly. + + -- User Option: font-latex-script-display + Display specification for subscript and superscript content. The + car is used for subscript, the cdr is used for superscript. The + feature is implemented using so-called display properties. For + information on what exactly to specify for the values, see *note + Other Display Specifications: (elisp)Other Display Specs. + + +File: auctex.info, Node: Verbatim content, Next: Faces, Prev: Fontification of math, Up: Font Locking + +3.1.4 Verbatim macros and environments +-------------------------------------- + +Usually it is not desirable to have content to be typeset verbatim +highlighted according to LaTeX syntax. Therefore this content will be +fontified uniformly with the face `font-latex-verbatim-face'. + + font-latex differentiates three different types of verbatim +constructs for fontification. Macros with special characters like | as +delimiters, macros with braces, and environments. Which macros and +environments are recognized is controlled by the variables +`LaTeX-verbatim-macros-with-delims', +`LaTeX-verbatim-macros-with-braces', and `LaTeX-verbatim-environments' +respectively. + + +File: auctex.info, Node: Faces, Next: Known problems, Prev: Verbatim content, Up: Font Locking + +3.1.5 Faces used by font-latex +------------------------------ + +In case you want to change the colors and fonts used by font-latex +please refer to the faces mentioned in the explanations above and use +`M-x customize-face RET RET'. All faces defined by font-latex +are accessible through a customization group by typing `M-x +customize-group RET font-latex-highlighting-faces RET'. + + +File: auctex.info, Node: Known problems, Prev: Faces, Up: Font Locking + +3.1.6 Known fontification problems +---------------------------------- + +In certain cases the fontification machinery fails to interpret buffer +contents correctly. This can lead to color bleed, i.e. large parts of a +buffer get fontified with an inappropriate face. A typical situation +for this to happen is the use of a dollar sign (`$') in a verbatim +macro or environment. If font-latex is not aware of the verbatim +construct, it assumes the dollar sign to be a toggle for mathematics and +fontifies the following buffer content with the respective face until it +finds a closing dollar sign or till the end of the buffer. + + As a remedy you can make the verbatim construct known to font-latex, +*note Verbatim content::. If this is not possible, you can insert a +commented dollar sign (`%$') at the next suitable end of line as a +quick workaround. + + +File: auctex.info, Node: Folding, Next: Outline, Prev: Font Locking, Up: Display + +3.2 Folding Macros and Environments +=================================== + +A popular complaint about markup languages like TeX and LaTeX is that +there is too much clutter in the source text and that one cannot focus +well on the content. There are macros where you are only interested in +the content they are enclosing, like font specifiers where the content +might already be fontified in a special way by font locking. Or macros +the content of which you only want to see when actually editing it, +like footnotes or citations. Similarly you might find certain +environments or comments distracting when trying to concentrate on the +body of your document. + + With AUCTeX's folding functionality you can collapse those items and +replace them by a fixed string, the content of one of their arguments, +or a mixture of both. If you want to make the original text visible +again in order to view or edit it, move point sideways onto the +placeholder (also called display string) or left-click with the mouse +pointer on it. (The latter is currently only supported on Emacs.) The +macro or environment will unfold automatically, stay open as long as +point is inside of it and collapse again once you move point out of it. +(Note that folding of environments currently does not work in every +AUCTeX mode.) + + In order to use this feature, you have to activate `TeX-fold-mode' +which will activate the auto-reveal feature and the necessary commands +to hide and show macros and environments. You can activate the mode in +a certain buffer by typing the command `M-x TeX-fold-mode RET' or using +the keyboard shortcut `C-c C-o C-f'. If you want to use it every time +you edit a LaTeX document, add it to a hook: + + (add-hook 'LaTeX-mode-hook (lambda () + (TeX-fold-mode 1))) + + If it should be activated in all AUCTeX modes, use `TeX-mode-hook' +instead of `LaTeX-mode-hook'. + + Once the mode is active there are several commands available to hide +and show macros, environments and comments: + + -- Command: TeX-fold-buffer + (`C-c C-o C-b') Hide all foldable items in the current buffer + according to the setting of `TeX-fold-type-list'. + + If you want to have this done automatically every time you open a + file, add it to a hook and make sure the function is called after + font locking is set up for the buffer. The following code should + accomplish this: + + (add-hook 'find-file-hook 'TeX-fold-buffer t) + + The command can be used any time to refresh the whole buffer and + fold any new macros and environments which were inserted after the + last invocation of the command. + + -- User Option: TeX-fold-type-list + List of symbols determining the item classes to consider for + folding. This can be macros, environments and comments. Per + default only macros and environments are folded. + + -- User Option: TeX-fold-force-fontify + In order for all folded content to get the right faces, the whole + buffer has to be fontified before folding is carried out. + `TeX-fold-buffer' therefore will force fontification of unfontified + regions. As this will prolong the time folding takes, you can + prevent forced fontification by customizing the variable + `TeX-fold-force-fontify'. + + -- User Option: TeX-fold-preserve-comments + By default items found in comments will be folded. If your + comments often contain unfinished code this might lead to + problems. Give this variable a non-nil value and foldable items + in your comments will be left alone. + + -- Command: TeX-fold-region + (`C-c C-o C-r') Hide all configured macros in the marked region. + + -- Command: TeX-fold-paragraph + (`C-c C-o C-p') Hide all configured macros in the paragraph + containing point. + + -- Command: TeX-fold-macro + (`C-c C-o C-m') Hide the macro on which point currently is located. + If the name of the macro is found in `TeX-fold-macro-spec-list', + the respective display string will be shown instead. If it is not + found, the name of the macro in sqare brackets or the default + string for unspecified macros + (`TeX-fold-unspec-macro-display-string') will be shown, depending + on the value of the variable `TeX-fold-unspec-use-name'. + + -- Command: TeX-fold-env + (`C-c C-o C-e') Hide the environment on which point currently is + located. The behavior regarding the display string is analogous to + `TeX-fold-macro' and determined by the variables + `TeX-fold-env-spec-list' and `TeX-fold-unspec-env-display-string' + respectively. + + -- Command: TeX-fold-math + Hide the math macro on which point currently is located. If the + name of the macro is found in `TeX-fold-math-spec-list', the + respective display string will be shown instead. If it is not + found, the name of the macro in sqare brackets or the default + string for unspecified macros + (`TeX-fold-unspec-macro-display-string') will be shown, depending + on the value of the variable `TeX-fold-unspec-use-name'. + + -- Command: TeX-fold-comment + (`C-c C-o C-c') Hide the comment point is located on. + + -- Command: TeX-fold-clearout-buffer + (`C-c C-o b') Permanently unfold all macros and environments in the + current buffer. + + -- Command: TeX-fold-clearout-region + (`C-c C-o r') Permanently unfold all macros and environments in the + marked region. + + -- Command: TeX-fold-clearout-paragraph + (`C-c C-o p') Permanently unfold all macros and environments in the + paragraph containing point. + + -- Command: TeX-fold-clearout-item + (`C-c C-o i') Permanently show the macro or environment on which + point currently is located. In contrast to temporarily opening the + macro when point is moved sideways onto it, the macro will be + permanently unfolded and will not collapse again once point is + leaving it. + + -- Command: TeX-fold-dwim + (`C-c C-o C-o') Hide or show items according to the current + context. If there is folded content, unfold it. If there is a + marked region, fold all configured content in this region. If + there is no folded content but a macro or environment, fold it. + + In case you want to use a different prefix than `C-c C-o' for these +commands you can customize the variable `TeX-fold-command-prefix'. +(Note that this will not change the key binding for activating the +mode.) + + The commands above will only take macros or environments into +consideration which are specified in the variables +`TeX-fold-macro-spec-list' or `TeX-fold-env-spec-list' respectively. + + -- User Option: TeX-fold-macro-spec-list + List of replacement specifiers and macros to fold. The specifier + can be a string, an integer or a function symbol. + + If you specify a string, it will be used as a display replacement + for the whole macro. Numbers in braces, brackets, parens or angle + brackets will be replaced by the respective macro argument. For + example `{1}' will be replaced by the first mandatory argument of + the macro. One can also define alternatives within the specifier + which are used if an argument is not found. Alternatives are + separated by `||'. They are most useful with optional arguments. + As an example, the default specifier for `\item' is `[1]:||*' which + means that if there is an optional argument, its value is shown + followed by a colon. If there is no optional argument, only an + asterisk is used as the display string. + + If you specify a number as the first element, the content of the + respective mandatory argument of a LaTeX macro will be used as the + placeholder. + + If the first element is a function symbol, the function will be + called with all mandatory arguments of the macro and the result of + the function call will be used as a replacement for the macro. + + The placeholder is made by copying the text from the buffer + together with its properties, i.e. its face as well. If + fontification has not happened when this is done (e.g. because of + lazy font locking) the intended fontification will not show up. + As a workaround you can leave Emacs idle a few seconds and wait + for stealth font locking to finish before you fold the buffer. Or + you just re-fold the buffer with `TeX-fold-buffer' when you notice + a wrong fontification. + + -- User Option: TeX-fold-env-spec-list + List of display strings or argument numbers and environments to + fold. Argument numbers refer to the `\begin' statement. That + means if you have e.g. `\begin{tabularx}{\linewidth}{XXX} ... + \end{tabularx}' and specify 3 as the argument number, the resulting + display string will be "XXX". + + -- User Option: TeX-fold-math-spec-list + List of display strings and math macros to fold. + + The variables `TeX-fold-macro-spec-list', `TeX-fold-env-spec-list', +and `TeX-fold-math-spec-list' apply to any AUCTeX mode. If you want to +make settings which are only applied to LaTeX mode, you can use the +mode-specific variables `LaTeX-fold-macro-spec-list', +`LaTeX-fold-env-spec-list', and `LaTeX-fold-math-spec-list' + + -- User Option: TeX-fold-unspec-macro-display-string + Default display string for macros which are not specified in + `TeX-fold-macro-spec-list'. + + -- User Option: TeX-fold-unspec-env-display-string + Default display string for environments which are not specified in + `TeX-fold-env-spec-list'. + + -- User Option: TeX-fold-unspec-use-name + If non-nil the name of the macro or environment surrounded by + square brackets is used as display string, otherwise the defaults + specified in `TeX-fold-unspec-macro-display-string' or + `TeX-fold-unspec-env-display-string' respectively. + + When you hover with the mouse pointer over folded content, its +original text will be shown in a tooltip or the echo area depending on +Tooltip mode being activate. In order to avoid exorbitantly big +tooltips and to cater for the limited space in the echo area the +content will be cropped after a certain amount of characters defined by +the variable `TeX-fold-help-echo-max-length'. + + -- User Option: TeX-fold-help-echo-max-length + Maximum length of original text displayed in a tooltip or the echo + area for folded content. Set it to zero in order to disable this + feature. + + +File: auctex.info, Node: Outline, Prev: Folding, Up: Display + +3.3 Outlining the Document +========================== + +AUCTeX supports the standard outline minor mode using LaTeX/ConTeXt +sectioning commands as header lines. *Note Outline Mode: +(emacs)Outline Mode. + + You can add your own headings by setting the variable +`TeX-outline-extra'. + + -- Variable: TeX-outline-extra + List of extra TeX outline levels. + + Each element is a list with two entries. The first entry is the + regular expression matching a header, and the second is the level + of the header. A `^' is automatically prepended to the regular + expressions in the list, so they must match text at the beginning + of the line. + + See `LaTeX-section-list' or `ConTeXt-INTERFACE-section-list' for + existing header levels. + + The following example add `\item' and `\bibliography' headers, with +`\bibliography' at the same outline level as `\section', and `\item' +being below `\subparagraph'. + + (setq TeX-outline-extra + '(("[ \t]*\\\\\\(bib\\)?item\\b" 7) + ("\\\\bibliography\\b" 2))) + + You may want to check out the unbundled `out-xtra' package for even +better outline support. It is available from your favorite emacs lisp +archive. + + +File: auctex.info, Node: Processing, Next: Customization, Prev: Display, Up: Top + +4 Starting Processors, Viewers and Other Programs +************************************************* + +The most powerful features of AUCTeX may be those allowing you to run +TeX, LaTeX, ConTeXt and other external commands like BibTeX and +`makeindex' from within Emacs, viewing and printing the results, and +moreover allowing you to _debug_ your documents. + + AUCTeX comes with a special tool bar for TeX and LaTeX which +provides buttons for the most important commands. You can enable or +disable it by customizing the options `plain-TeX-enable-toolbar' and +`LaTeX-enable-toolbar' in the `TeX-tool-bar' customization group. + +* Menu: + +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging TeX and LaTeX output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. + + +File: auctex.info, Node: Commands, Next: Viewing, Up: Processing + +4.1 Executing Commands +====================== + +Formatting the document with TeX, LaTeX or ConTeXt, viewing with a +previewer, printing the document, running BibTeX, making an index, or +checking the document with `lacheck' or `chktex' all require running an +external command. + +* Menu: + +* Starting a Command:: Starting a Command on a Document or Region +* Selecting a Command:: Selecting and Executing a Command +* Processor Options:: Options for TeX Processors + + +File: auctex.info, Node: Starting a Command, Next: Selecting a Command, Up: Commands + +4.1.1 Starting a Command on a Document or Region +------------------------------------------------ + +There are two ways to run an external command, you can either run it on +the current document with `TeX-command-master', or on the current +region with `TeX-command-region'. A special case of running TeX on a +region is `TeX-command-buffer' which differs from `TeX-command-master' +if the current buffer is not its own master file. + + -- Command: TeX-command-master + (`C-c C-c') Query the user for a command, and run it on the master + file associated with the current buffer. The name of the master + file is controlled by the variable `TeX-master'. The available + commands are controlled by the variable `TeX-command-list'. + + -- Command: TeX-command-region + (`C-c C-r') Query the user for a command, and run it on the + contents of the selected region. The region contents are written + into the region file, after extracting the header and trailer from + the master file. If mark is inactive (which can happen with + Transient Mark mode), use the old region. See also the command + `TeX-pin-region' about how to fix a region. + + The name of the region file is controlled by the variable + `TeX-region'. The name of the master file is controlled by the + variable `TeX-master'. The header is all text up to the line + matching the regular expression `TeX-header-end'. The trailer is + all text from the line matching the regular expression + `TeX-trailer-start'. The available commands are controlled by the + variable `TeX-command-list'. + + -- Command: TeX-command-buffer + (`C-c C-b') Query the user for a command, and apply it to the + contents of the current buffer. The buffer contents are written + into the region file, after extracting the header and trailer from + the master file. The command is then actually run on the region + file. See above for details. + + -- User Option: TeX-region + The name of the file for temporarily storing the text when + formatting the current region. + + -- User Option: TeX-header-end + A regular expression matching the end of the header. By default, + this is `\begin{document}' in LaTeX mode and `%**end of header' in + TeX mode. + + -- User Option: TeX-trailer-start + A regular expression matching the start of the trailer. By + default, this is `\end{document}' in LaTeX mode and `\bye' in TeX + mode. + + If you want to change the values of `TeX-header-end' and +`TeX-trailer-start' you can do this for all files by setting the +variables in a mode hook or per file by specifying them as file +variables (*note File Variables: (emacs)File Variables.). + + -- Command: TeX-pin-region + (`C-c C-t C-r') If you don't have a mode like Transient Mark mode + active, where marks get disabled automatically, the region would + need to get properly set before each call to `TeX-command-region'. + If you fix the current region with `C-c C-t C-r', then it will get + used for more commands even though mark and point may change. An + explicitly activated mark, however, will always define a new + region when calling `TeX-command-region'. + + AUCTeX will allow one process for each document, plus one process +for the region file to be active at the same time. Thus, if you are +editing N different documents, you can have N plus one processes +running at the same time. If the last process you started was on the +region, the commands described in *note Debugging:: and *note Control:: +will work on that process, otherwise they will work on the process +associated with the current document. + + +File: auctex.info, Node: Selecting a Command, Next: Processor Options, Prev: Starting a Command, Up: Commands + +4.1.2 Selecting and Executing a Command +--------------------------------------- + +Once you started the command selection with `C-c C-c', `C-c C-s' or +`C-c C-b' you will be prompted for the type of command. AUCTeX will +try to guess which command is appropriate in the given situation and +propose it as default. Usually this is a processor like `TeX' or +`LaTeX' if the document was changed or a viewer if the document was +just typeset. Other commands can be selected in the minibuffer with +completion support by typing . + + The available commands are defined by the variable +`TeX-command-list'. Per default it includes commands for typesetting +the document (e.g. `LaTeX'), for viewing the output (`View'), for +printing (`Print'), for generating an index (`Index') or for spell +checking (`Spell') to name but a few. You can also add your own +commands by adding entries to `TeX-command-list'. Refer to its doc +string for information about its syntax. You might also want to look +at `TeX-expand-list' to learn about the expanders you can use in +`TeX-command-list'. + + Note that the default of the variable occasionally changes. +Therefore it is advisable to add to the list rather than overwriting +it. You can do this with a call to `add-to-list' in your init file. +For example, if you wanted to add a command for running a program called +`foo' on the master or region file, you could do this with the +following form. + + (eval-after-load "tex" + '(add-to-list 'TeX-command-list + '("Foo" "foo %s" TeX-run-command t t :help "Run foo") t)) + + As mentioned before, AUCTeX will try to guess what command you want +to invoke. If you want to use another command than `TeX', `LaTeX' or +whatever processor AUCTeX thinks is appropriate for the current mode, +set the variable `TeX-command-default'. You can do this for all files +by setting it in a mode hook or per file by specifying it as a file +variable (*note File Variables: (emacs)File Variables.). + + -- User Option: TeX-command-default + The default command to run in this buffer. Must be an entry in + `TeX-command-list'. + + After confirming a command to execute, AUCTeX will try to save any +buffers related to the document, and check if the document needs to be +reformatted. If the variable `TeX-save-query' is non-nil, AUCTeX will +query before saving each file. By default AUCTeX will check emacs +buffers associated with files in the current directory, in one of the +`TeX-macro-private' directories, and in the `TeX-macro-global' +directories. You can change this by setting the variable +`TeX-check-path'. + + -- User Option: TeX-check-path + Directory path to search for dependencies. + + If nil, just check the current file. Used when checking if any + files have changed. + + +File: auctex.info, Node: Processor Options, Prev: Selecting a Command, Up: Commands + +4.1.3 Options for TeX Processors +-------------------------------- + +There are some options you can customize affecting which processors are +invoked or the way this is done and which output they produce as a +result. These options control if DVI or PDF output should be produced, +if TeX should be started in interactive or nonstop mode, if source +specials or a SyncTeX file should be produced for making inverse and +forward search possible or which TeX engine should be used instead of +regular TeX, like PDFTeX, Omega or XeTeX. + + -- Command: TeX-PDF-mode + (`C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a + buffer-local minor mode. You can customize `TeX-PDF-mode' to give + it a different default. The default is used when AUCTeX does not + have additional clue about what a document might want. This + option usually results in calling either PDFTeX or ordinary TeX. + + -- User Option: TeX-DVI-via-PDFTeX + If this is set, DVI will also be produced by calling PDFTeX, + setting `\pdfoutput=0'. This makes it possible to use PDFTeX + features like character protrusion even when producing DVI files. + Contemporary TeX distributions do this anyway, so that you need + not enable the option within AUCTeX. + + -- Command: TeX-interactive-mode + (`C-c C-t C-i') This command toggles the interactive mode of + AUCTeX, a global minor mode. You can customize + `TeX-interactive-mode' to give it a different default. In + interactive mode, TeX will pause with an error prompt when errors + are encountered and wait for the user to type something. + + -- Command: TeX-source-correlate-mode + (`C-c C-t C-s') Toggles support for forward and inverse search. + Forward search refers to jumping to the place in the previewed + document corresponding to where point is located in the document + source and inverse search to the other way round. *Note I/O + Correlation::. + + You can permanently activate `TeX-source-correlate-mode' by + customizing the variable `TeX-source-correlate-mode'. There is a + bunch of customization options for the mode, use `M-x + customize-group TeX-view ' to find out more. + + AUCTeX is aware of three different means to do I/O correlation: + source specials (only DVI output), the pdfsync LaTeX package (only + PDF output) and SyncTeX. The choice between source specials and + SyncTeX can be controlled with the variable + `TeX-source-correlate-method'. + + Should you use source specials it has to be stressed _very_ + strongly however, that source specials can cause differences in + page breaks and spacing, can seriously interfere with various + packages and should thus _never_ be used for the final version of + a document. In particular, fine-tuning the page breaks should be + done with source specials switched off. + + AUCTeX also allows you to easily select different TeX engines for +processing, either by using the entries in the `TeXing Options' submenu +below the `Command' menu or by calling the function `TeX-engine-set'. +These eventually set the variable `TeX-engine' which you can also +modify directly. + + -- User Option: TeX-engine + This variable allows you to choose which TeX engine should be used + for typesetting the document, i.e. the executables which will be + used when you invoke the `TeX' or `LaTeX' commands. The value + should be one of the symbols defined in `TeX-engine-alist-builtin' + or `TeX-engine-alist'. The symbols `default', `xetex', `luatex' + and `omega' are available from the built-in list. + + Note that `TeX-engine' is buffer-local, so setting the variable +directly or via the above mentioned menu or function will not take +effect in other buffers. If you want to activate an engine for all +AUCTeX modes, set `TeX-engine' in your init file, e.g. by using `M-x +customize-variable '. If you want to activate it for a certain +AUCTeX mode only, set the variable in the respective mode hook. If you +want to activate it for certain files, set it through file variables +(*note File Variables: (emacs)File Variables.). + + Should you need to change the executable names related to the +different engine settings, there are some variables you can tweak. +Those are `TeX-command', `LaTeX-command', `TeX-Omega-command', +`LaTeX-Omega-command', `ConTeXt-engine' and `ConTeXt-Omega-engine'. +The rest of the executables is defined directly in +`TeX-engine-alist-builtin'. If you want to override an entry from +that, add an entry to `TeX-engine-alist' that starts with the same +symbol as that the entry in the built-in list and specify the +executables you want to use instead. You can also add entries to +`TeX-engine-alist' in order to add support for engines not covered per +default. + + -- User Option: TeX-engine-alist + Alist of TeX engines and associated commands. Each entry is a + list with a maximum of five elements. The first element is a + symbol used to identify the engine. The second is a string + describing the engine. The third is the command to be used for + plain TeX. The fourth is the command to be used for LaTeX. The + fifth is the command to be used for the `--engine' parameter of + ConTeXt's `texexec' program. Each command can either be a + variable or a string. An empty string or nil means there is no + command available. + + You can customize AUCTeX to show the processor output as it is +produced. + + -- User Option: TeX-show-compilation + If non-nil, the output of TeX compilation is shown in another + window. + + +File: auctex.info, Node: Viewing, Next: Debugging, Prev: Commands, Up: Processing + +4.2 Viewing the Formatted Output +================================ + +AUCTeX allows you to start external programs for previewing the +formatted output of your document. + +* Menu: + +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search + + +File: auctex.info, Node: Starting Viewers, Next: I/O Correlation, Up: Viewing + +4.2.1 Starting Viewers +---------------------- + +Viewers are normally invoked by pressing `C-c C-c' once the document is +formatted, which will propose the View command, or by activating the +respective entry in the Command menu. Alternatively you can type `C-c +C-v' which calls the function `TeX-view'. + + -- Command: TeX-view + (`C-c C-v') Start a viewer without confirmation. The viewer is + started either on a region or the master file, depending on the + last command issued. This is especially useful for jumping to the + location corresponding to point in the viewer when using + `TeX-source-correlate-mode'. + + AUCTeX will try to guess which type of viewer (DVI, PostScript or +PDF) has to be used and what options are to be passed over to it. This +decision is based on the output files present in the working directory +as well as the class and style options used in the document. For +example, if there is a DVI file in your working directory, a DVI viewer +will be invoked. In case of a PDF file it will be a PDF viewer. If +you specified a special paper format like `a5paper' or use the +`landscape' option, this will be passed to the viewer by the +appropriate options. Especially some DVI viewers depend on this kind +of information in order to display your document correctly. In case +you are using `pstricks' or `psfrag' in your document, a DVI viewer +cannot display the contents correctly and a PostScript viewer will be +invoked instead. + + The association between the tests for the conditions mentioned above +and the viewers is made in the variable `TeX-view-program-selection'. +Therefore this variable is the starting point for customization if you +want to use other viewers than the ones suggested by default. + + -- User Option: TeX-view-program-selection + This is a list of predicates and viewers which is evaluated from + front to back in order to find out which viewer to call under the + given conditions. In the first element of each list item you can + reference one or more predicates defined in + `TeX-view-predicate-list' or `TeX-view-predicate-list-builtin'. + In the second element you can reference a viewer defined in + `TeX-view-program-list' or `TeX-view-program-list-builtin'. The + viewer of the first item with a positively evaluated predicate is + selected. + + So `TeX-view-program-selection' only contains references to the +actual implementations of predicates and viewer commands respectively +which can be found elsewhere. AUCTeX comes with a set of preconfigured +predicates and viewer commands which are stored in the variables +`TeX-view-predicate-list-builtin' and `TeX-view-program-list-builtin' +respectively. If you are not satisfied with those and want to +overwrite one of them or add your own definitions, you can do so via +the variables `TeX-view-predicate-list' and `TeX-view-program-list'. + + -- User Option: TeX-view-predicate-list + This is a list of predicates for viewer selection and invocation. + The first element of each list item is a symbol and the second + element a Lisp form to be evaluated. The form should return nil + if the predicate is not fulfilled. + + A built-in predicate from `TeX-view-predicate-list-builtin' can be + overwritten by defining a new predicate with the same symbol. + + -- User Option: TeX-view-program-list + This is a list of viewer specifications each consisting of a + symbolic name and either a command line or a function to be + invoked when the viewer is called. If a command line is used, + parts of it can be conditionalized by prefixing them with + predicates from `TeX-view-predicate-list' or + `TeX-view-predicate-list-builtin'. (See the doc string for the + exact format to use.) The command line can also contain + placeholders as defined in `TeX-expand-list' which are expanded + before the viewer is called. + + A built-in viewer spec from `TeX-view-program-list-builtin' can be + overwritten by defining a new viewer spec with the same name. + + Note that the viewer selection and invocation as described above will +only work if certain default settings in AUCTeX are intact. For one, +the whole viewer selection machinery will only be triggered if the `%V' +expander in `TeX-expand-list' is unchanged. So if you have trouble +with the viewer invocation you might check if there is an older +customization of the variable in place. In addition, the use of a +function in `TeX-view-program-list' only works if the View command in +`TeX-command-list' makes use of the hook `TeX-run-discard-or-function'. + + Note also that the implementation described above replaces an older +one which was less flexible. This old implementation works with the +variables `TeX-output-view-style' and `TeX-view-style' which are used +to associate file types and style options with viewers. If desired you +can reactivate it by using the placeholder `%vv' for the View command +in `TeX-command-list'. Note however, that it is bound to be removed +from AUCTeX once the new implementation proved to be satisfactory. For +the time being, find a short description of the mentioned customization +options below. + + -- User Option: TeX-output-view-style + List of output file extensions, style options and view options. + Each item of the list consists of three elements. If the first + element (a regular expression) matches the output file extension, + and the second element (a regular expression) matches the name of + one of the style options, any occurrence of the string `%V' in a + command in `TeX-command-list' will be replaced with the third + element. + + -- User Option: TeX-view-style + List of style options and view options. This is the predecessor of + `TeX-output-view-style' which does not provide the possibility to + specify output file extensions. It is used as a fallback in case + none of the alternatives specified in `TeX-output-view-style' + match. In case none of the entries in `TeX-view-style' match + either, no suggestion for a viewer is made. + + +File: auctex.info, Node: I/O Correlation, Prev: Starting Viewers, Up: Viewing + +4.2.2 Forward and Inverse Search +-------------------------------- + +Forward and inverse search refer to the correlation between the document +source in the editor and the typeset document in the viewer. Forward +search allows you to jump to the place in the previewed document +corresponding to a certain line in the document source and inverse +search vice versa. + + AUCTeX supports three methods for forward and inverse search: source +specials (only DVI output), the pdfsync LaTeX package (only PDF output) +and SyncTeX (any type of output). If you want to make use of forward +and inverse searching with source specials or SyncTeX, switch on +`TeX-source-correlate-mode'. *Note Processor Options::, on how to do +that. The use of the pdfsync package is detected automatically if +document parsing is enabled. + + Forward search happens automatically upon calling the viewer, e.g. by +typing `C-c C-v' (`TeX-view'). This will open the viewer or bring it +to front and display the output page corresponding to the position of +point in the source file. AUCTeX will automatically pass the necessary +command line options to the viewer for this to happen. + + Upon opening the viewer you will be asked if you want to start a +server process (Gnuserv or Emacs server) which is necessary for inverse +search. This happens only if there is no server running already. You +can customize the variable `TeX-source-correlate-start-server' to +inhibit the question and always or never start the server respectively. + + -- User Option: TeX-source-correlate-start-server + If `TeX-source-correlate-mode' is active and a viewer is invoked, + the default behavior is to ask if a server process should be + started. Set this variable to `t' if the question should be + inhibited and the server should always be started. Set it to + `nil' if the server should never be started. Inverse search will + not be available in the latter case. + + Inverse search, i.e. jumping to the part of your document source in +Emacs corresponding to a certain position in the viewer, is triggered +from the viewer, typically by a mouse click. Refer to the documentation +of your viewer to find out how it has to be configured and what you have +to do exactly. In xdvi you normally have to use `C-down-mouse-1'. + + +File: auctex.info, Node: Debugging, Next: Checking, Prev: Viewing, Up: Processing + +4.3 Catching the errors +======================= + +Once you've formatted your document you may `debug' it, i.e. browse +through the errors (La)TeX reported. + + -- Command: TeX-next-error + (`C-c `') Go to the next error reported by TeX. The view will be + split in two, with the cursor placed as close as possible to the + error in the top view. In the bottom view, the error message will + be displayed along with some explanatory text. + + Normally AUCTeX will only report real errors, but you may as well +ask it to report `bad boxes' and warnings as well. + + -- Command: TeX-toggle-debug-bad-boxes + (`C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes + (i.e. overfull and underfull boxes) as well as normal errors. + + -- Command: TeX-toggle-debug-warnings + (`C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as + well as normal errors. + + As default, AUCTeX will display a special help buffer containing the +error reported by TeX along with the documentation. There is however +an `expert' option, which allows you to display the real TeX output. + + -- User Option: TeX-display-help + If t AUCTeX will automatically display a help text whenever an + error is encountered using `TeX-next-error' (`C-c `'). If nil a + terse information about the error is displayed in the echo area. + If `expert' AUCTeX will display the output buffer with the raw TeX + output. + + +File: auctex.info, Node: Checking, Next: Control, Prev: Debugging, Up: Processing + +4.4 Checking for problems +========================= + +Running TeX or LaTeX will only find regular errors in the document, not +examples of bad style. Furthermore, description of the errors may +often be confusing. The utility `lacheck' can be used to find style +errors, such as forgetting to escape the space after an abbreviation or +using `...' instead of `\ldots' and many other problems like that. You +start `lacheck' with `C-c C-c Check '. The result will be a list +of errors in the `*compilation*' buffer. You can go through the errors +with `C-x `' (`next-error', *note Compilation: (emacs)Compilation.), +which will move point to the location of the next error. + + Another newer program which can be used to find errors is `chktex'. +It is much more configurable than `lacheck', but doesn't find all the +problems `lacheck' does, at least in its default configuration. You +must install the programs before using them, and for `chktex' you may +also need modify `TeX-command-list' unless you use its `lacheck' +compatibility wrapper. You can get `lacheck' from +`' or +alternatively `chktex' from +`'. + + +File: auctex.info, Node: Control, Next: Cleaning, Prev: Checking, Up: Processing + +4.5 Controlling the output +========================== + +A number of commands are available for controlling the output of an +application running under AUCTeX + + -- Command: TeX-kill-job + (`C-c C-k') Kill currently running external application. This + may be either of TeX, LaTeX, previewer, BibTeX, etc. + + -- Command: TeX-recenter-output-buffer + (`C-c C-l') Recenter the output buffer so that the bottom line is + visible. + + -- Command: TeX-home-buffer + (`C-c ^') Go to the `master' file in the document associated with + the current buffer, or if already there, to the file where the + current process was started. + + +File: auctex.info, Node: Cleaning, Next: Documentation, Prev: Control, Up: Processing + +4.6 Cleaning intermediate and output files +========================================== + + -- Command: TeX-clean + Remove generated intermediate files. In case a prefix argument is + given, remove output files as well. + + Canonical access to the function is provided by the `Clean' and + `Clean All' entries in `TeX-command-list', invokable with `C-c + C-c' or the Command menu. + + The patterns governing which files to remove can be adapted + separately for each AUCTeX mode by means of the variables + `plain-TeX-clean-intermediate-suffixes', + `plain-TeX-clean-output-suffixes', + `LaTeX-clean-intermediate-suffixes', `LaTeX-clean-output-suffixes', + `docTeX-clean-intermediate-suffixes', + `docTeX-clean-output-suffixes', + `Texinfo-clean-intermediate-suffixes', + `Texinfo-clean-output-suffixes', + `ConTeXt-clean-intermediate-suffixes' and + `ConTeXt-clean-output-suffixes'. + + -- User Option: TeX-clean-confirm + Control if deletion of intermediate and output files has to be + confirmed before it is actually done. If non-nil, ask before + deleting files. + + +File: auctex.info, Node: Documentation, Prev: Cleaning, Up: Processing + +4.7 Documentation about macros and packages +=========================================== + + -- Command: TeX-doc + (`C-c ?') Get documentation about macros, packages or TeX & Co. + in general. The function will prompt for the name of a command or + manual, providing a list of available keywords for completion. If + point is on a command or word with available documentation, this + will be suggested as default. + + In case no documentation could be found, a prompt for querying the + `texdoc' program is shown, should the latter be available. + + The command can be invoked by the key binding mentioned above as + well as the `Find Documentation...' entry in the mode menu. + + +File: auctex.info, Node: Customization, Next: Appendices, Prev: Processing, Up: Top + +5 Customization and Extension +***************************** + +* Menu: + +* Modes and Hooks:: Modes and Hooks +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of TeX Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support + + +File: auctex.info, Node: Modes and Hooks, Next: Multifile, Up: Customization + +5.1 Modes and Hooks +=================== + +AUCTeX supports a wide variety of derivatives and extensions of TeX. +Besides plain TeX those are LaTeX, AMS-TeX, ConTeXt, Texinfo and +docTeX. For each of them there is a separate major mode in AUCTeX and +each major mode runs `text-mode-hook', `TeX-mode-hook' as well as a +hook special to the mode in this order. The following table provides +an overview of the respective mode functions and hooks. + +Type Mode function Hook +------------------------------------------------------- +Plain TeX `plain-TeX-mode' `plain-TeX-mode-hook' +LaTeX `LaTeX-mode' `LaTeX-mode-hook' +AMS-TeX `ams-tex-mode' `AmS-TeX-mode-hook' +ConTeXt `ConTeXt-mode' `ConTeXt-mode-hook' +Texinfo `Texinfo-mode' `Texinfo-mode-hook' +DocTeX `docTeX-mode' `docTeX-mode-hook' + + If you need to make a customization via a hook which is only relevant +for one of the modes listed above, put it into the respective mode hook, +if it is relevant for any AUCTeX mode, add it to `TeX-mode-hook' and if +it is relevant for all text modes, append it to `text-mode-hook'. + + +File: auctex.info, Node: Multifile, Next: Parsing Files, Prev: Modes and Hooks, Up: Customization + +5.2 Multifile Documents +======================= + +You may wish to spread a document over many files (as you are likely to +do if there are multiple authors, or if you have not yet discovered the +power of the outline commands (*note Outline::)). This can be done by +having a "master" file in which you include the various files with the +TeX macro `\input' or the LaTeX macro `\include'. These files may also +include other files themselves. However, to format the document you +must run the commands on the top level master file. + + When you, for example, ask AUCTeX to run a command on the master +file, it has no way of knowing the name of the master file. By default, +it will assume that the current file is the master file. If you insert +the following in your `.emacs' file AUCTeX will use a more advanced +algorithm. + + (setq-default TeX-master nil) ; Query for master file. + + If AUCTeX finds the line indicating the end of the header in a master +file (`TeX-header-end'), it can figure out for itself that this is a +master file. Otherwise, it will ask for the name of the master file +associated with the buffer. To avoid asking you again, AUCTeX will +automatically insert the name of the master file as a file variable +(*note File Variables: (emacs)File Variables.). You can also insert +the file variable yourself, by putting the following text at the end of +your files. + + %%% Local Variables: + %%% TeX-master: "master" + %%% End: + + You should always set this variable to the name of the top level +document. If you always use the same name for your top level +documents, you can set `TeX-master' in your `.emacs' file. + + (setq-default TeX-master "master") ; All master files called "master". + + -- User Option: TeX-master + The master file associated with the current buffer. If the file + being edited is actually included from another file, then you can + tell AUCTeX the name of the master file by setting this variable. + If there are multiple levels of nesting, specify the top level + file. + + If this variable is `nil', AUCTeX will query you for the name. + + If the variable is `t', then AUCTeX will assume the file is a + master file itself. + + If the variable is `shared', then AUCTeX will query for the name, + but will not change the file. + + -- User Option: TeX-one-master + Regular expression matching ordinary TeX files. + + You should set this variable to match the name of all files, for + which it is a good idea to append a `TeX-master' file variable + entry automatically. When AUCTeX adds the name of the master file + as a file variable, it does not need to ask next time you edit the + file. + + If you dislike AUCTeX automatically modifying your files, you can + set this variable to `""'. By default, AUCTeX will modify + any file with an extension of `.tex'. + + -- Command: TeX-master-file-ask + (`C-c _') Query for the name of a master file and add the + respective File Variables (*note File Variables: (emacs)File + Variables.) to the file for setting this variable permanently. + + AUCTeX will not ask for a master file when it encounters existing + files. This function shall give you the possibility to insert the + variable manually. + + AUCTeX keeps track of macros, environments, labels, and style files +that are used in a given document. For this to work with multifile +documents, AUCTeX has to have a place to put the information about the +files in the document. This is done by having an `auto' subdirectory +placed in the directory where your document is located. Each time you +save a file, AUCTeX will write information about the file into the +`auto' directory. When you load a file, AUCTeX will read the +information in the `auto' directory about the file you loaded _and the +master file specified by `TeX-master'_. Since the master file (perhaps +indirectly) includes all other files in the document, AUCTeX will get +information from all files in the document. This means that you will +get from each file, for example, completion for all labels defined +anywhere in the document. + + AUCTeX will create the `auto' directory automatically if +`TeX-auto-save' is non-nil. Without it, the files in the document will +not know anything about each other, except for the name of the master +file. *Note Automatic Local::. + + -- Command: TeX-save-document + (`C-c C-d') Save all buffers known to belong to the current + document. + + -- User Option: TeX-save-query + If non-nil, then query the user before saving each file with + `TeX-save-document'. + + +File: auctex.info, Node: Parsing Files, Next: Internationalization, Prev: Multifile, Up: Customization + +5.3 Automatic Parsing of TeX Files +================================== + +AUCTeX depends heavily on being able to extract information from the +buffers by parsing them. Since parsing the buffer can be somewhat slow, +the parsing is initially disabled. You are encouraged to enable them by +adding the following lines to your `.emacs' file. + + (setq TeX-parse-self t) ; Enable parse on load. + (setq TeX-auto-save t) ; Enable parse on save. + + The latter command will make AUCTeX store the parsed information in +an `auto' subdirectory in the directory each time the TeX files are +stored, *note Automatic Local::. If AUCTeX finds the pre-parsed +information when loading a file, it will not need to reparse the buffer. +The information in the `auto' directory is also useful for multifile +documents, *note Multifile::, since it allows each file to access the +parsed information from all the other files in the document. This is +done by first reading the information from the master file, and then +recursively the information from each file stored in the master file. + + The variables can also be done on a per file basis, by changing the +file local variables. + + %%% Local Variables: + %%% TeX-parse-self: t + %%% TeX-auto-save: t + %%% End: + + Even when you have disabled the automatic parsing, you can force the +generation of style information by pressing `C-c C-n'. This is often +the best choice, as you will be able to decide when it is necessary to +reparse the file. + + -- User Option: TeX-parse-self + Parse file after loading it if no style hook is found for it. + + -- User Option: TeX-auto-save + Automatically save style information when saving the buffer. + + -- Command: TeX-normal-mode ARG + (`C-c C-n') Remove all information about this buffer, and apply the + style hooks again. Save buffer first including style information. + With optional argument, also reload the style hooks. + + When AUCTeX saves your buffer, it can optionally convert all tabs in +your buffer into spaces. Tabs confuse AUCTeX's error message parsing +and so should generally be avoided. However, tabs are significant in +some environments, and so by default AUCTeX does not remove them. To +convert tabs to spaces when saving a buffer, insert the following in +your `.emacs' file: + + (setq TeX-auto-untabify t) + + -- User Option: TeX-auto-untabify + Automatically remove all tabs from a file before saving it. + + Instead of disabling the parsing entirely, you can also speed it +significantly up by limiting the information it will search for (and +store) when parsing the buffer. You can do this by setting the default +values for the buffer local variables `TeX-auto-regexp-list' and +`TeX-auto-parse-length' in your `.emacs' file. + + ;; Only parse LaTeX class and package information. + (setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list) + ;; The class and package information is usually near the beginning. + (setq-default TeX-auto-parse-length 2000) + + This example will speed the parsing up significantly, but AUCTeX +will no longer be able to provide completion for labels, macros, +environments, or bibitems specified in the document, nor will it know +what files belong to the document. + + These variables can also be specified on a per file basis, by +changing the file local variables. + + %%% Local Variables: + %%% TeX-auto-regexp-list: TeX-auto-full-regexp-list + %%% TeX-auto-parse-length: 999999 + %%% End: + + -- User Option: TeX-auto-regexp-list + List of regular expressions used for parsing the current file. + + -- User Option: TeX-auto-parse-length + Maximal length of TeX file that will be parsed. + + The pre-specified lists of regexps are defined below. You can use +these before loading AUCTeX by quoting them, as in the example above. + + -- Constant: TeX-auto-empty-regexp-list + Parse nothing + + -- Constant: LaTeX-auto-minimal-regexp-list + Only parse LaTeX class and packages. + + -- Constant: LaTeX-auto-label-regexp-list + Only parse LaTeX labels. + + -- Constant: LaTeX-auto-regexp-list + Parse common LaTeX commands. + + -- Constant: plain-TeX-auto-regexp-list + Parse common plain TeX commands. + + -- Constant: TeX-auto-full-regexp-list + Parse all TeX and LaTeX commands that AUCTeX can use. + + +File: auctex.info, Node: Internationalization, Next: Automatic, Prev: Parsing Files, Up: Customization + +5.4 Language Support +==================== + +TeX and Emacs are usable for European (Latin, Cyrillic, Greek) based +languages. Some LaTeX and EmacsLisp packages are available for easy +typesetting and editing documents in European languages. + + For CJK (Chinese, Japanese, and Korean) languages, Emacs or XEmacs +with MULE (MULtilingual Enhancement to GNU Emacs) support is required. +MULE is part of Emacs by default since Emacs 20. XEmacs has to be +configured with the `--with-mule' option. Special versions of TeX are +needed for CJK languages: CTeX and ChinaTeX for Chinese, ASCII pTeX and +NTT jTeX for Japanese, HLaTeX and kTeX for Korean. The CJK-LaTeX +package is required for supporting multiple CJK scripts within a single +document. + + Note that Unicode is not fully supported in Emacs 21 and XEmacs 21. +CJK characters are not usable. Please use the MULE-UCS EmacsLisp +package or Emacs 22 (not released yet) if you need CJK. + +* Menu: + +* European:: Using AUCTeX with European Languages +* Japanese:: Using AUCTeX with Japanese + + +File: auctex.info, Node: European, Next: Japanese, Up: Internationalization + +5.4.1 Using AUCTeX with European Languages +------------------------------------------ + +5.4.1.1 Typing and Displaying Non-ASCII Characters +.................................................. + +First you will need a way to write non-ASCII characters. You can either +use macros, or teach TeX about the ISO character sets. I prefer the +latter, it has the advantage that the usual standard emacs word +movement and case change commands will work. + + With LaTeX2e, just add `\usepackage[latin1]{inputenc}'. Other +languages than Western European ones will probably have other encoding +needs. + + To be able to display non-ASCII characters you will need an +appropriate font and a version of GNU Emacs capable of displaying 8-bit +characters (e.g. Emacs 21). The manner in which this is supported +differs between Emacsen, so you need to take a look at your respective +documentation. + + A compromise is to use an European character set when editing the +file, and convert to TeX macros when reading and writing the files. + +`iso-cvt.el' + Much like `iso-tex.el' but is bundled with Emacs 19.23 and later. + +`x-compose.el' + Similar package bundled with new versions of XEmacs. + +`X-Symbol' + a much more complete package for both Emacs and XEmacs that can + also handle a lot of mathematical characters and input methods. + +5.4.1.2 Style Files for Different Languages +........................................... + +AUCTeX supports style files for several languages. Each style file may +modify AUCTeX to better support the language, and will run a language +specific hook that will allow you to for example change ispell +dictionary, or run code to change the keyboard remapping. The +following will for example choose a Danish dictionary for documents +including `\usepackage[danish]{babel}'. This requires parsing to be +enabled, *note Parsing Files::. + + (add-hook 'TeX-language-dk-hook + (lambda () (ispell-change-dictionary "danish"))) + + The following style files are recognized: + +`bulgarian' + Runs style hook `TeX-language-bg-hook'. Gives `"' word syntax, + makes the <"> key insert a literal `"'. Typing <"> twice will + insert insert `"`' or `"'' depending on context. Typing <-> twice + will insert `"=', three times `--'. + +`czech' + Runs style hook `TeX-language-cz-hook'. Pressing <"> will insert + `\uv{' and `}' depending on context. + +`danish' + Runs style hook `TeX-language-dk-hook'. Pressing <"> will insert + `"`' and `"'' depending on context. Typing <-> twice will insert + `"=', i.e. a hyphen string allowing hyphenation in the composing + words. + +`dutch' + Runs style hook `TeX-language-nl-hook'. + +`german' +`ngerman' + Runs style hook `TeX-language-de-hook'. Gives `"' word syntax, + makes the <"> key insert a literal `"'. Pressing the key twice + will give you opening or closing German quotes (`"`' or `"''). + Typing <-> twice will insert `"=', three times `--'. + +`frenchb' +`francais' + Runs style hook `TeX-language-fr-hook'. Pressing <"> will insert + `\\og' and `\\fg' depending on context. Note that the language + name for customizing `TeX-quote-language-alist' is `french'. + +`icelandic' + Runs style hook `TeX-language-is-hook'. Gives `"' word syntax, + makes the <"> key insert a literal `"'. Typing <"> twice will + insert insert `"`' or `"'' depending on context. Typing <-> twice + will insert `"=', three times `--'. + +`italian' + Runs style hook `TeX-language-it-hook'. Pressing <"> will insert + `"<' and `">' depending on context. + +`polish' + Runs style hook `TeX-language-pl-hook'. Gives `"' word syntax and + makes the <"> key insert a literal `"'. Pressing <"> twice will + insert `"`' or `"'' depending on context. + +`polski' + Runs style hook `TeX-language-pl-hook'. Makes the <"> key insert + a literal `"'. Pressing <"> twice will insert `,,' or `''' + depending on context. + +`slovak' + Runs style hook `TeX-language-sk-hook'. Pressing <"> will insert + `\uv{' and `}' depending on context. + +`swedish' + Runs style hook `TeX-language-sv-hook'. Pressing <"> will insert + `'''. Typing <-> twice will insert `"=', three times `--'. + + Replacement of language-specific hyphen strings like `"=' with +dashes does not require to type <-> three times in a row. You can put +point after the hypen string anytime and trigger the replacement by +typing <->. + + In case you are not satisfied with the suggested behavior of quote +and hyphen insertion you can change it by customizing the variables +`TeX-quote-language-alist' and `LaTeX-babel-hyphen-language-alist' +respectively. + + -- User Option: TeX-quote-language-alist + Used for overriding the default language-specific quote insertion + behavior. This is an alist where each element is a list + consisting of four items. The first item is the name of the + language in concern as a string. See the list of supported + languages above. The second item is the opening quotation mark. + The third item is the closing quotation mark. Opening and closing + quotation marks can be specified directly as strings or as + functions returning a string. The fourth item is a boolean + controlling quote insertion. It should be non-nil if if the + special quotes should only be used after inserting a literal `"' + character first, i.e. on second key press. + + -- User Option: LaTeX-babel-hyphen-language-alist + Used for overriding the behavior of hyphen insertion for specific + languages. Every element in this alist is a list of three items. + The first item should specify the affected language as a string. + The second item denotes the hyphen string to be used as a string. + The third item, a boolean, controls the behavior of hyphen + insertion and should be non-nil if the special hyphen should be + inserted after inserting a literal `-' character, i.e. on second + key press. + + The defaults of hyphen insertion are defined by the variables +`LaTeX-babel-hyphen' and `LaTeX-babel-hyphen-after-hyphen' respectively. + + -- User Option: LaTeX-babel-hyphen + String to be used when typing <->. This usually is a hyphen + alternative or hyphenation aid provided by `babel' and the related + language style files, like `"=', `"~' or `"-'. + + Set it to an empty string or nil in order to disable + language-specific hyphen insertion. + + -- User Option: LaTeX-babel-hyphen-after-hyphen + Control insertion of hyphen strings. If non-nil insert normal + hyphen on first key press and swap it with the language-specific + hyphen string specified in the variable `LaTeX-babel-hyphen' on + second key press. If nil do it the other way round. + + +File: auctex.info, Node: Japanese, Prev: European, Up: Internationalization + +5.4.2 Using AUCTeX with Japanese TeX +------------------------------------ + +To write Japanese text with AUCTeX, you need to have versions of TeX +and Emacs that support Japanese. There exist at least two variants of +TeX for Japanese text (NTT jTeX and ASCII pTeX). AUCTeX can be used +with MULE (MULtilingual Enhancement to GNU Emacs) supported Emacsen. + + To use the Japanese TeX variants, simply activate +`japanese-plain-tex-mode' or `japanese-latex-mode' and everything +should work. If not, send mail to Masayuki Ataka +`', who kindly donated the code for +supporting Japanese in AUCTeX. None of the primary AUCTeX maintainers +understand Japanese, so they cannot help you. + + If you usually use AUCTeX in Japanese, setting the following +variables is useful. + + -- User Option: TeX-default-mode + Mode to enter for a new file when it cannott be determined whether + the file is plain TeX or LaTeX or what. + + If you want to enter Japanese LaTeX mode whenever this may happen, + set the variable like this: + (setq TeX-default-mode 'japanese-latex-mode) + + -- User Option: japanese-TeX-command-default + The default command for `TeX-command' in Japanese TeX mode. + + The default value is `"pTeX"'. + + -- User Option: japanese-LaTeX-command-default + The default command for `TeX-command' in Japanese LaTeX mode. + + The default value is `"LaTeX"'. + + -- User Option: japanese-LaTeX-default-style + The default style/class when creating a new Japanese LaTeX + document. + + The default value is `"jarticle"'. + + See `tex-jp.el' for more information. + + +File: auctex.info, Node: Automatic, Next: Style Files, Prev: Internationalization, Up: Customization + +5.5 Automatic Customization +=========================== + +Since AUCTeX is so highly customizable, it makes sense that it is able +to customize itself. The automatic customization consists of scanning +TeX files and extracting symbols, environments, and things like that. + + The automatic customization is done on three different levels. The +global level is the level shared by all users at your site, and consists +of scanning the standard TeX style files, and any extra styles added +locally for all users on the site. The private level deals with those +style files you have written for your own use, and use in different +documents. You may have a `~/lib/TeX/' directory where you store +useful style files for your own use. The local level is for a specific +directory, and deals with writing customization for the files for your +normal TeX documents. + + If compared with the environment variable `TEXINPUTS', the global +level corresponds to the directories built into TeX. The private level +corresponds to the directories you add yourself, except for `.', which +is the local level. + +* Menu: + +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory + + By default AUCTeX will search for customization files in all the +global, private, and local style directories, but you can also set the +path directly. This is useful if you for example want to add another +person's style hooks to your path. Please note that all matching files +found in `TeX-style-path' are loaded, and all hooks defined in the +files will be executed. + + -- User Option: TeX-style-path + List of directories to search for AUCTeX style files. Each must + end with a slash. + + By default, when AUCTeX searches a directory for files, it will +recursively search through subdirectories. + + -- User Option: TeX-file-recurse + Whether to search TeX directories recursively: nil means do not + recurse, a positive integer means go that far deep in the directory + hierarchy, t means recurse indefinitely. + + By default, AUCTeX will ignore files name `.', `..', `SCCS', `RCS', +and `CVS'. + + -- User Option: TeX-ignore-file + Regular expression matching file names to ignore. + + These files or directories will not be considered when searching + for TeX files in a directory. + + +File: auctex.info, Node: Automatic Global, Next: Automatic Private, Up: Automatic + +5.5.1 Automatic Customization for the Site +------------------------------------------ + +Assuming that the automatic customization at the global level was done +when AUCTeX was installed, your choice is now: will you use it? If you +use it, you will benefit by having access to all the symbols and +environments available for completion purposes. The drawback is slower +load time when you edit a new file and perhaps too many confusing +symbols when you try to do a completion. + + You can disable the automatic generated global style hooks by setting +the variable `TeX-auto-global' to nil. + + -- User Option: TeX-macro-global + Directories containing the site's TeX style files. + + -- User Option: TeX-style-global + Directory containing hand generated TeX information. Must end + with a slash. + + These correspond to TeX macros shared by all users of a site. + + -- User Option: TeX-auto-global + Directory containing automatically generated information. + + For storing automatic extracted information about the TeX macros + shared by all users of a site. + + +File: auctex.info, Node: Automatic Private, Next: Automatic Local, Prev: Automatic Global, Up: Automatic + +5.5.2 Automatic Customization for a User +---------------------------------------- + +You should specify where you store your private TeX macros, so AUCTeX +can extract their information. The extracted information will go to +the directories listed in `TeX-auto-private' + + Use `M-x TeX-auto-generate ' to extract the information. + + -- User Option: TeX-macro-private + Directories where you store your personal TeX macros. The value + defaults to the directories listed in the `TEXINPUTS' and + `BIBINPUTS' environment variables or to the respective directories + in `$TEXMFHOME' if no results can be obtained from the environment + variables. + + -- User Option: TeX-auto-private + List of directories containing automatically generated AUCTeX style + files. These correspond to the personal TeX macros. + + -- Command: TeX-auto-generate TEX AUTO + (`M-x TeX-auto-generate ') Generate style hook for TEX and + store it in AUTO. If TEX is a directory, generate style hooks for + all files in the directory. + + -- User Option: TeX-style-private + List of directories containing hand generated AUCTeX style files. + These correspond to the personal TeX macros. + + +File: auctex.info, Node: Automatic Local, Prev: Automatic Private, Up: Automatic + +5.5.3 Automatic Customization for a Directory +--------------------------------------------- + +AUCTeX can update the style information about a file each time you save +it, and it will do this if the directory `TeX-auto-local' exist. +`TeX-auto-local' is by default set to `"auto"', so simply creating an +`auto' directory will enable automatic saving of style information. + + The advantage of doing this is that macros, labels, etc. defined in +any file in a multifile document will be known in all the files in the +document. The disadvantage is that saving will be slower. To disable, +set `TeX-auto-local' to nil. + + -- User Option: TeX-style-local + Directory containing hand generated TeX information. Must end + with a slash. + + These correspond to TeX macros found in the current directory. + + -- User Option: TeX-auto-local + Directory containing automatically generated TeX information. + Must end with a slash. + + These correspond to TeX macros found in the current directory. + + +File: auctex.info, Node: Style Files, Prev: Automatic, Up: Customization + +5.6 Writing Your Own Style Support +================================== + +*Note Automatic::, for a discussion about automatically generated +global, private, and local style files. The hand generated style files +are equivalent, except that they by default are found in `style' +directories instead of `auto' directories. + +* Menu: + +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding Other Information +* Hacking the Parser:: Automatic Extraction of New Things + + If you write some useful support for a public TeX style file, please +send it to us. + + +File: auctex.info, Node: Simple Style, Next: Adding Macros, Up: Style Files + +5.6.1 A Simple Style File +------------------------- + +Here is a simple example of a style file. + + ;;; book.el - Special code for book style. + + (TeX-add-style-hook + "book" + (lambda () + (LaTeX-largest-level-set "chapter"))) + + This file specifies that the largest kind of section in a LaTeX +document using the book document style is chapter. The interesting +thing to notice is that the style file defines an (anonymous) function, +and adds it to the list of loaded style hooks by calling +`TeX-add-style-hook'. + + The first time the user indirectly tries to access some style +specific information, such as the largest sectioning command available, +the style hooks for all files directly or indirectly read by the +current document is executed. The actual files will only be evaluated +once, but the hooks will be called for each buffer using the style file. + + -- Function: TeX-add-style-hook STYLE HOOK + Add HOOK to the list of functions to run when we use the TeX file + STYLE. + + +File: auctex.info, Node: Adding Macros, Next: Adding Environments, Prev: Simple Style, Up: Style Files + +5.6.2 Adding Support for Macros +------------------------------- + +The most common thing to define in a style hook is new symbols (TeX +macros). Most likely along with a description of the arguments to the +function, since the symbol itself can be defined automatically. + + Here are a few examples from `latex.el'. + + (TeX-add-style-hook + "latex" + (lambda () + (TeX-add-symbols + '("arabic" TeX-arg-counter) + '("label" TeX-arg-define-label) + '("ref" TeX-arg-label) + '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t) + '("newtheorem" TeX-arg-define-environment + [ TeX-arg-environment "Numbered like" ] + t [ TeX-arg-counter "Within counter" ])))) + + -- Function: TeX-add-symbols SYMBOL ... + Add each SYMBOL to the list of known symbols. + + Each argument to `TeX-add-symbols' is a list describing one symbol. +The head of the list is the name of the symbol, the remaining elements +describe each argument. + + If there are no additional elements, the symbol will be inserted with +point inside braces. Otherwise, each argument of this function should +match an argument of the TeX macro. What is done depends on the +argument type. + + If a macro is defined multiple times, AUCTeX will chose the one with +the longest definition (i.e. the one with the most arguments). + + Thus, to overwrite + '("tref" 1) ; one argument + you can specify + '("tref" TeX-arg-label ignore) ; two arguments + + `ignore' is a function that does not do anything, so when you insert +a `tref' you will be prompted for a label and no more. + + You can use the following types of specifiers for arguments: + +`string' + Use the string as a prompt to prompt for the argument. + +`number' + Insert that many braces, leave point inside the first. + +`nil' + Insert empty braces. + +`t' + Insert empty braces, leave point between the braces. + +`other symbols' + Call the symbol as a function. You can define your own hook, or + use one of the predefined argument hooks. + +`list' + If the car is a string, insert it as a prompt and the next element + as initial input. Otherwise, call the car of the list with the + remaining elements as arguments. + +`vector' + Optional argument. If it has more than one element, parse it as a + list, otherwise parse the only element as above. Use square + brackets instead of curly braces, and is not inserted on empty user + input. + + A lot of argument hooks have already been defined. The first +argument to all hooks is a flag indicating if it is an optional +argument. It is up to the hook to determine what to do with the +remaining arguments, if any. Typically the next argument is used to +overwrite the default prompt. + +`TeX-arg-conditional' + Implements if EXPR THEN ELSE. If EXPR evaluates to true, parse + THEN as an argument list, else parse ELSE as an argument list. + +`TeX-arg-literal' + Insert its arguments into the buffer. Used for specifying extra + syntax for a macro. + +`TeX-arg-free' + Parse its arguments but use no braces when they are inserted. + +`TeX-arg-eval' + Evaluate arguments and insert the result in the buffer. + +`TeX-arg-label' + Prompt for a label completing with known labels. + +`TeX-arg-macro' + Prompt for a TeX macro with completion. + +`TeX-arg-environment' + Prompt for a LaTeX environment with completion. + +`TeX-arg-cite' + Prompt for a BibTeX citation. + +`TeX-arg-counter' + Prompt for a LaTeX counter. + +`TeX-arg-savebox' + Prompt for a LaTeX savebox. + +`TeX-arg-file' + Prompt for a filename in the current directory, and use it without + the extension. + +`TeX-arg-input-file' + Prompt for the name of an input file in TeX's search path, and use + it without the extension. Run the style hooks for the file. + +`TeX-arg-define-label' + Prompt for a label completing with known labels. Add label to + list of defined labels. + +`TeX-arg-define-macro' + Prompt for a TeX macro with completion. Add macro to list of + defined macros. + +`TeX-arg-define-environment' + Prompt for a LaTeX environment with completion. Add environment to + list of defined environments. + +`TeX-arg-define-cite' + Prompt for a BibTeX citation. + +`TeX-arg-define-counter' + Prompt for a LaTeX counter. + +`TeX-arg-define-savebox' + Prompt for a LaTeX savebox. + +`TeX-arg-corner' + Prompt for a LaTeX side or corner position with completion. + +`TeX-arg-lr' + Prompt for a LaTeX side with completion. + +`TeX-arg-tb' + Prompt for a LaTeX side with completion. + +`TeX-arg-pagestyle' + Prompt for a LaTeX pagestyle with completion. + +`TeX-arg-verb' + Prompt for delimiter and text. + +`TeX-arg-pair' + Insert a pair of numbers, use arguments for prompt. The numbers are + surrounded by parentheses and separated with a comma. + +`TeX-arg-size' + Insert width and height as a pair. No arguments. + +`TeX-arg-coordinate' + Insert x and y coordinates as a pair. No arguments. + + If you add new hooks, you can assume that point is placed directly +after the previous argument, or after the macro name if this is the +first argument. Please leave point located after the argument you are +inserting. If you want point to be located somewhere else after all +hooks have been processed, set the value of `exit-mark'. It will point +nowhere, until the argument hook sets it. + + +File: auctex.info, Node: Adding Environments, Next: Adding Other, Prev: Adding Macros, Up: Style Files + +5.6.3 Adding Support for Environments +------------------------------------- + +Adding support for environments is very much like adding support for +TeX macros, except that each environment normally only takes one +argument, an environment hook. The example is again a short version of +`latex.el'. + + (TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("document" LaTeX-env-document) + '("enumerate" LaTeX-env-item) + '("itemize" LaTeX-env-item) + '("list" LaTeX-env-list)))) + + It is completely up to the environment hook to insert the +environment, but the function `LaTeX-insert-environment' may be of some +help. The hook will be called with the name of the environment as its +first argument, and extra arguments can be provided by adding them to a +list after the hook. + + For simple environments with arguments, for example defined with +`\newenvironment', you can make AUCTeX prompt for the arguments by +giving the prompt strings in the call to `LaTeX-add-environments'. The +fact that an argument is optional can be indicated by wrapping the +prompt string in a vector. + + For example, if you have defined a `loop' environment with the three +arguments FROM, TO, and STEP, you can add support for them in a style +file. + + %% loop.sty + + \newenvironment{loop}[3]{...}{...} + + ;; loop.el + + (TeX-add-style-hook + "loop" + (lambda () + (LaTeX-add-environments + '("loop" "From" "To" "Step")))) + + If an environment is defined multiple times, AUCTeX will choose the +one with the longest definition. Thus, if you have an enumerate style +file, and want it to replace the standard LaTeX enumerate hook above, +you could define an `enumerate.el' file as follows, and place it in the +appropriate style directory. + + (TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("enumerate" LaTeX-env-enumerate foo)))) + + (defun LaTeX-env-enumerate (environment &optional ignore) ...) + + The symbol `foo' will be passed to `LaTeX-env-enumerate' as the +second argument, but since we only added it to overwrite the definition +in `latex.el' it is just ignored. + + -- Function: LaTeX-add-environments ENV ... + Add each ENV to list of loaded environments. + + -- Function: LaTeX-insert-environment ENV [ EXTRA ] + Insert environment of type ENV, with optional argument EXTRA. + + Following is a list of available hooks for `LaTeX-add-environments': + +`LaTeX-env-item' + Insert the given environment and the first item. + +`LaTeX-env-figure' + Insert the given figure-like environment with a caption and a + label. + +`LaTeX-env-array' + Insert the given array-like environment with position and column + specifications. + +`LaTeX-env-label' + Insert the given environment with a label. + +`LaTeX-env-list' + Insert the given list-like environment, a specifier for the label + and the first item. + +`LaTeX-env-minipage' + Insert the given minipage-like environment with position and width + specifications. + +`LaTeX-env-tabular*' + Insert the given tabular*-like environment with width, position and + column specifications. + +`LaTeX-env-picture' + Insert the given environment with width and height specifications. + +`LaTeX-env-bib' + Insert the given environment with a label for a bibitem. + +`LaTeX-env-contents' + Insert the given environment with a filename as its argument. + +`LaTeX-env-args' + Insert the given environment with arguments. You can use this as + a hook in case you want to specify multiple complex arguments just + like in elements of `TeX-add-symbols'. This is most useful if the + specification of arguments to be prompted for with strings and + strings wrapped in a vector as described above is too limited. + + Here is an example from `listings.el' which calls a function with + one argument in order to prompt for a key=value list to be + inserted as an optional argument of the `lstlisting' environment: + + (LaTeX-add-environments + `("lstlisting" LaTeX-env-args + [TeX-arg-key-val ,LaTeX-listings-key-val-options])) + + +File: auctex.info, Node: Adding Other, Next: Hacking the Parser, Prev: Adding Environments, Up: Style Files + +5.6.4 Adding Other Information +------------------------------ + +You can also specify bibliographical databases and labels in the style +file. This is probably of little use, since this information will +usually be automatically generated from the TeX file anyway. + + -- Function: LaTeX-add-bibliographies BIBLIOGRAPHY ... + Add each BIBLIOGRAPHY to list of loaded bibliographies. + + -- Function: LaTeX-add-labels LABEL ... + Add each LABEL to the list of known labels. + + +File: auctex.info, Node: Hacking the Parser, Prev: Adding Other, Up: Style Files + +5.6.5 Automatic Extraction of New Things +---------------------------------------- + +The automatic TeX information extractor works by searching for regular +expressions in the TeX files, and storing the matched information. You +can add support for new constructs to the parser, something that is +needed when you add new commands to define symbols. + + For example, in the file `macro.tex' I define the following macro. + + \newcommand{\newmacro}[5]{% + \def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}% + \def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}% + } + + AUCTeX will automatically figure out that `newmacro' is a macro that +takes five arguments. However, it is not smart enough to automatically +see that each time we use the macro, two new macros are defined. We +can specify this information in a style hook file. + + ;;; macro.el --- Special code for my own macro file. + + ;;; Code: + + (defvar TeX-newmacro-regexp + '("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}" + (1 2) TeX-auto-multi) + "Matches \newmacro definitions.") + + (defvar TeX-auto-multi nil + "Temporary for parsing \\newmacro definitions.") + + (defun TeX-macro-cleanup () + "Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'." + (mapcar (lambda (list) + (mapcar (lambda (symbol) + (setq TeX-auto-symbol + (cons symbol TeX-auto-symbol))) + list)) + TeX-auto-multi)) + + (defun TeX-macro-prepare () + "Clear `Tex-auto-multi' before use." + (setq TeX-auto-multi nil)) + + (add-hook 'TeX-auto-prepare-hook 'TeX-macro-prepare) + (add-hook 'TeX-auto-cleanup-hook 'TeX-macro-cleanup) + + (TeX-add-style-hook + "macro" + (lambda () + (TeX-auto-add-regexp TeX-newmacro-regexp) + (TeX-add-symbols '("newmacro" + TeX-arg-macro + (TeX-arg-macro "Capitalized macro: \\") + t + "BibTeX entry: " + nil)))) + + ;;; macro.el ends here + + When this file is first loaded, it adds a new entry to +`TeX-newmacro-regexp', and defines a function to be called before the +parsing starts, and one to be called after the parsing is done. It +also declares a variable to contain the data collected during parsing. +Finally, it adds a style hook which describes the `newmacro' macro, as +we have seen it before. + + So the general strategy is: Add a new entry to `TeX-newmacro-regexp'. +Declare a variable to contain intermediate data during parsing. Add +hook to be called before and after parsing. In this case, the hook +before parsing just initializes the variable, and the hook after parsing +collects the data from the variable, and adds them to the list of +symbols found. + + -- Variable: TeX-auto-regexp-list + List of regular expressions matching TeX macro definitions. + + The list has the following format ((REGEXP MATCH TABLE) ...), that + is, each entry is a list with three elements. + + REGEXP. Regular expression matching the macro we want to parse. + + MATCH. A number or list of numbers, each representing one + parenthesized subexpression matched by REGEXP. + + TABLE. The symbol table to store the data. This can be a + function, in which case the function is called with the argument + MATCH. Use `TeX-match-buffer' to get match data. If it is not a + function, it is presumed to be the name of a variable containing a + list of match data. The matched data (a string if MATCH is a + number, a list of strings if MATCH is a list of numbers) is put in + front of the table. + + -- Variable: TeX-auto-prepare-hook nil + List of functions to be called before parsing a TeX file. + + -- Variable: TeX-auto-cleanup-hook nil + List of functions to be called after parsing a TeX file. + + +File: auctex.info, Node: Appendices, Next: Indices, Prev: Customization, Up: Top + +Appendix A Copying, Changes, Development, FAQ +********************************************* + +* Menu: + +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: + + +File: auctex.info, Node: Copying this Manual, Next: Changes, Up: Appendices + +A.1 Copying this Manual +======================= + +The copyright notice for this manual is: + + This manual is for AUCTeX (version 11.86 from 2010-02-21), a +sophisticated TeX environment for Emacs. + + Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, +2007, 2008, 2009, 2010 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License." + +The full license text can be read here: + +* Menu: + +* GNU Free Documentation License:: License for copying this manual. + + +File: auctex.info, Node: GNU Free Documentation License, Up: Copying this Manual + +A.1.1 GNU Free Documentation License +------------------------------------ + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software + Foundation, Inc. `http://fsf.org/' + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it + can be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You + accept the license if you copy, modify or distribute the work in a + way requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. If a section does not fit the above definition of + Secondary then it is not allowed to be designated as Invariant. + The Document may contain zero Invariant Sections. If the Document + does not identify any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup, or absence of + markup, has been arranged to thwart or discourage subsequent + modification by readers is not Transparent. An image format is + not Transparent if used for any substantial amount of text. A + copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML, PostScript or PDF designed for + human modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats that + can be read and edited only by proprietary word processors, SGML or + XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML, PostScript or PDF + produced by some word processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a computer-network location from + which the general network-using public has access to download + using public-standard network protocols a complete Transparent + copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section Entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, receipt of a copy of some or all of + the same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents +---------------------------------------------------- + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. + + +File: auctex.info, Node: Changes, Next: Development, Prev: Copying this Manual, Up: Appendices + +A.2 Changes and New Features +============================ + +News in 11.86 +------------- + + * Parsing of LaTeX output was improved. It is now less likely that + AUCTeX opens a non-existent file upon calling `TeX-next-error'; a + problem for example encountered when using MiKTeX 2.8. In addition + quoted file names as emitted by MiKTeX are now supported. + + * A new framework for the definition and selection of viewers was + implemented. If you have customizations regarding viewers you + will have to redo them in this new framework or reenable the old + one. *Note Starting Viewers::, for details. + + * Comprehensive editing support for PSTricks was added. + + * Support for various LaTeX packages was added, e.g. `tabularx', + `CJK', and `hyperref'. + + * An easy way to switch between TeX engines (PDFTeX, LuaTeX, XeTeX, + Omega) was added. + + * Support for SyncTeX was added. This involves the command line + options for LaTeX and the viewer. + + * Folding can now be customized to use macro arguments as replacement + text. + + * `preview.sty' now works with XeTeX. + + * A lot of smaller and larger bugs have been squashed. + +News in 11.85 +------------- + + * Font locking has been improved significantly. It is now less + prone to color bleeding which could lead to high resource usage. + In addition it now includes information about LaTeX macro syntax + and can indicate syntactically incorrect macros in LaTeX mode. + + * The license was updated to GPLv3. + + * Support for the nomencl, flashcards and comment LaTeX packages as + well as the Icelandic language option of babel were added. + + * Support for folding of math macros was added. + + * Lots of minor bugs in features and documentation fixed. + +News in 11.84 +------------- + + * There have been problems with the `-without-texmf-dir' option to + `configure' when the value of `-with-kpathsea-sep' was set or + determined for an installation system with a default different + from that of the runtime system. `with-kpathsea-sep' has been + removed; the setting is now usually determined at runtime. + + Due to this and other problems, preview-latex in the released + XEmacs package failed under Windows or with anything except recent + 21.5 XEmacsen. + + * AUCTeX and preview-latex have been changed in order to accommodate + file names containing spaces. preview-latex now tolerates bad + PostScript code polluting the stack (like some Omega fonts). + + * `preview.sty' had in some cases failed to emit PostScript header + specials. + + * Support for folding of comments was added. + + * The `polish' language option of the babel LaTeX package as well as + the polski LaTeX package are now supported. Most notably this + means that AUCTeX will help to insert quotation marks as defined + by polish.sty (`"`..."'') and polski.sty (`,,...'''). + + * The TeX tool bar is now available and enabled by default in plain + TeX mode. *Note Processing Facilities::. + + * Bug fix in the display of math subscripts and superscripts. + + * Bug fix `TeX-doc' for Emacs 21. + + * There has been quite a number of other bug fixes to various + features and documentation across the board. + + +News in 11.83 +------------- + + * The new function `TeX-doc' provides easy access to documentation + about commands and packages or information related to TeX and + friends in general. *Note Documentation::. + + * You can now get rid of generated intermediate and output files by + means of the new `Clean' and `Clean All' entries in + `TeX-command-list' accessible with `C-c C-c' or the Command menu. + *Note Cleaning::. + + * Support for forward search with PDF files was added. That means + you can jump to a place in the output file corresponding to the + position in the source file. *Note Viewing::. + + Adding support for this feature required the default value of the + variable `TeX-output-view-style' to be changed. Please make sure + you either remove any customizations overriding the new default or + incorporate the changes into your customizations if you want to + use this feature. + + * TeX error messages of the `-file-line-error' kind are now + understood in AUCTeX and preview-latex (parsers are still + separate). + + * Bug fix in XyMTeX support. + + * The LaTeX tool bar is now enabled by default. *Note Processing + Facilities::. + + +News in 11.82 +------------- + + * Support for the MinionPro LaTeX package was added. + + * Warnings and underfull/overfull boxes are now being indicated in + the echo area after a LaTeX run, if the respective debugging + options are activated with `TeX-toggle-debug-warnings' (`C-c C-t + C-w') or `TeX-toggle-debug-bad-boxes' (`C-c C-t C-b'). In this + case `TeX-next-error' will find these warnings in addition to + normal errors. + + The key binding `C-c C-w' for `TeX-toggle-debug-bad-boxes' (which + was renamed from `TeX-toggle-debug-boxes') now is deprecated. + + * AUCTeX now can automatically insert a pair of braces after typing + <_> or <^> in math constructs if the new variable + `TeX-electric-sub-and-superscript' is set to a non-nil value. + + * Some language-specific support for French was added. There now is + completion support for the commands provided by the `frenchb' (and + `francais') options of the babel LaTeX package and easier input of + French quotation marks (`\\og ...\\fg') which can now be inserted + by typing <">. + + * Completion support for options of some LaTeX packages was added. + + * Already in version 11.81 the way to activate AUCTeX changed + substantially. This should now be done with `(load "auctex.el" nil + t t)' instead of the former `(require 'tex-site)'. Related to this + change `tex-mik.el' does not load `tex-site.el' anymore. That + means if you used only `(require 'tex-mik)' in order to activate + AUCTeX, you have to add `(load "auctex.el" nil t t)' before the + latter statement. *Note Loading the package::. + + * Handling of verbatim constructs was consolidated across AUCTeX. + This resulted in the font-latex-specific variables + `font-latex-verb-like-commands', `font-latex-verbatim-macros', and + `font-latex-verbatim-environments' being removed and the more + general variables `LaTeX-verbatim-macros-with-delims', + `LaTeX-verbatim-macros-with-braces', and + `LaTeX-verbatim-environments' being added. + + * The output of a BibTeX run is now checked for warnings and errors, + which are reported in the echo area. + + * The aliases for `font-latex-title-fontify' were removed. Use + `font-latex-fontify-sectioning' instead. + + * The problem that Japanese macros where broken across lines was + fixed. + + * Various bug fixes. + +News in 11.81 +------------- + + * `LaTeX-mark-section' now marks subsections of a given section as + well. The former behavior is available via the prefix argument. + + * preview-latex which was previously available separately became a + subsystem of AUCTeX. There is no documented provision for building + or installing preview-latex separately. It is still possible to + use and install AUCTeX without preview-latex, however. + + * The installation procedures have been overhauled and now also + install startup files as part of the process (those had to be + copied manually previously). You are advised to remove previous + installations of AUCTeX and preview-latex before starting the + installation procedure. A standard installation from an + unmodified tarball no longer requires Makeinfo or Perl. + + Also note that the way AUCTeX is supposed to be activated changed. + Instead of `(require 'tex-site)' you should now use `(load + "auctex.el" nil t t)'. While the former method may still work, + the new method has the advantage that you can deactivate a + preactivated AUCTeX with the statement `(unload-feature + 'tex-site)' before any of its modes have been used. This may be + important especially for site-wide installations. + + * Support for the babel LaTeX package was added. + + * Folding a buffer now ensures that the whole buffer is fontified + before the actual folding is carried out. If this results in + unbearably long execution times, you can fall back to the old + behavior of relying on stealth font locking to do this job in the + background by customizing the variable `TeX-fold-force-fontify'. + + * Folded content now reveals part of its original text in a tooltip + or the echo area when hovering with the mouse pointer over it. + + * The language-specific insertion of quotation marks was + generalized. The variables `LaTeX-german-open-quote', + `LaTeX-german-close-quote', `LaTeX-german-quote-after-quote', + `LaTeX-italian-open-quote', `LaTeX-italian-close-quote', and + `LaTeX-italian-quote-after-quote' are now obsolete. If you are not + satisfied with the default settings, you should customize + `TeX-quote-language-alist' instead. + + * Similar to language-specific quote insertion, AUCTeX now helps you + with hyphens in different languages as well. *Note European::, + for details. + + * Fill problems in Japanese text introduced in AUCTeX 11.55 were + fixed. AUCTeX tries not to break lines between 1-byte and 2-byte + chars. These features will work in Chinese text, too. + + * The scaling factor of the fontification of sectioning commands can + now be customized using the variable + `font-latex-fontify-sectioning'. This variable was previously + called `font-latex-title-fontify'; In this release we provide an + alias but this will disappear in one of the the next releases. + The faces for the sectioning commands are now called + `font-latex-sectioning-N-face' (N=0...5) instead of + `font-latex-title-N-face' (N=1...4). Analogously the names of the + variables holding the related keyword lists were changed from + `font-latex-title-N-keywords' to + `font-latex-sectioning-N-keywords'. *Note Font Locking::, for + details. Make sure to adjust your customizations. + + * Titles in beamer slides marked by the "\frametitle" command are + know displayed with the new face `font-latex-slide-title-face'. + You can add macros to be highlighted with this face to + `font-latex-match-slide-title-keywords'. + + * Of course a lot of bugs have been fixed. + +News in 11.55 +------------- + + * A bug was fixed which lead to the insertion of trailing whitespace + during filling. In particular extra spaces were added to sentence + endings at the end of lines. You can make this whitespace visible + by setting the variable `show-trailing-whitespace' to `t'. If you + want to delete all trailing whitespace in a buffer, type `M-x + delete-trailing-whitespace RET'. + + * A bug was fixed which lead to a `*Compile-Log*' buffer popping up + when the first LaTeX file was loaded in an Emacs session. + + * On some systems the presence of an outdated Emacspeak package lead + to the error message `File mode specification error: (error + "Variable binding depth exceeds max-specpdl-size")'. Precautions + were added which prevent this error from happening. But + nevertheless, it is advised to upgrade or uninstall the outdated + Emacspeak package. + + * The value of `TeX-macro-global' is not determined during + configuration anymore but at load time of AUCTeX. Consequently the + associated configuration option `--with-tex-input-dirs' was + removed. + + * Support for the LaTeX Japanese classes `jsarticle' and `jsbook' + was added. + +News in 11.54 +------------- + + * The parser (used e.g. for `TeX-auto-generate-global') was extended + to recognize keywords common in LaTeX packages and classes, like + "\DeclareRobustCommand" or "\RequirePackage". Additionally a bug + was fixed which led to duplicate entries in AUCTeX style files. + + * Folding can now be done for paragraphs and regions besides single + constructs and the whole buffer. With the new `TeX-fold-dwim' + command content can both be hidden and shown with a single key + binding. In course of these changes new key bindings for + unfolding commands where introduced. The old bindings are still + present but will be phased out in future releases. + + * Info files of the manual now have a .info extension. + + * There is an experimental tool bar support now. It is not + activated by default. If you want to use it, add + (add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) + to your init file. + + * The manual now contains a new chapter "Quick Start". It explains + the main features and how to use them, and should be enough for a + new user to start using AUCTeX. + + * A new section "Font Locking" was added to the manual which explains + syntax highlighting in AUCTeX and its customization. Together with + the sections related to folding and outlining, the section is part + of the new chapter "Display". + + * Keywords for syntax highlighting of LaTeX constructs to be typeset + in bold, italic or typewriter fonts may now be customized. + Besides the built-in classes, new keyword classes may be added by + customizing the variable `font-latex-user-keyword-classes'. The + customization options can be found in the customization group + `font-latex-keywords'. + + * Verbatim content is now displayed with the `fixed-pitch' face. (GNU + Emacs only) + + * Syntax highlighting should not spill out of verbatim content + anymore. (GNU Emacs only) + + * Verbatim commands like `\verb|...|' will not be broken anymore + during filling. + + * You can customize the completion for graphic files with + `LaTeX-includegraphics-read-file'. + + * Support for the LaTeX packages `url', `listings', `jurabib' and + `csquotes' was added with regard to command completion and syntax + highlighting. + + * Performance of fontification and filling was improved. + + * Insertion of nodes in Texinfo mode now supports completion of + existing node names. + + * Setting the variable `LaTeX-float' to `nil' now means that you + will not be prompted for the float position of figures and tables. + You can get the old behaviour of `nil' by setting the variable to + `""', i.e. an empty string. See also *note Floats::. + + * The XEmacs-specific bug concerning `overlays-at' was fixed. + + * Lots of bug fixes. + +News in 11.53 +------------- + + * The LaTeX math menu can include Unicode characters if your Emacs + built supports it. See the variable `LaTeX-math-menu-unicode', + *note Mathematics::. + + * Bug fixes for XEmacs. + + * Completion for graphic files in the TeX search path has been added. + + * `start' is used for the viewer for MiKTeX and fpTeX. + + * The variable `TeX-fold-preserve-comments' can now be customized to + deactivate folding in comments. + +News in 11.52 +------------- + + * Installation and menus under XEmacs work again (maybe for the first + time). + + * Fontification of subscripts and superscripts is now disabled when + the fontification engine is not able to support it properly. + + * Bug fixes in the build process. + +News in 11.51 +------------- + + * PDFTeX and Source Special support did not work with ConTeXt, this + has been fixed. Similar for Source Special support under Windows. + + * Omega support has been added. + + * Bug fixes in the build process. + + * `TeX-fold' now supports folding of environments in Texinfo mode. + +News in 11.50 +------------- + + * The use of source specials when processing or viewing the document + can now be controlled with the new `TeX-source-specials' minor mode + which can be toggled via an entry in the Command menu or the key + binding `C-c C-t C-s'. If you have customized the variable + `TeX-command-list', you have to re-initialize it for this to work. + This means to open a customization buffer for the variable by + typing `M-x customize-variable RET TeX-command-list RET', selecting + "Erase Customization" and do your customization again with the new + default. + + * The content of the command menu now depends on the mode (plain TeX, + LaTeX, ConTeXt etc.). Any former customization of the variable + `TeX-command-list' has to be erased. Otherwise the command menu + and the customization will not work correctly. + + * Support for hiding and auto-revealing macros, e.g. footnotes or + citations, and environments in a buffer was added, *note Folding::. + + * You can now control if indentation is done upon typing by + customizing the variable `TeX-newline-function', *note Indenting::. + + * Limited support for `doc.sty' and `ltxdoc.cls' (`dtx' files) was + added. The new docTeX mode provides functionality for editing + documentation parts. This includes formatting (indenting and + filling), adding and completion of macros and environments while + staying in comments as well as syntax highlighting. (Please note + that the mode is not finished yet. For example syntax + highlighting does not work yet in XEmacs.) + + * For macro completion in docTeX mode the AUCTeX style files + `doc.el', `ltxdoc.el' and `ltx-base.el' were included. The latter + provides general support for low-level LaTeX macros and may be + used with LaTeX class and style files as well. It is currently + not loaded automatically for those files. + + * Support for ConTeXt with a separate ConTeXt mode is now included. + Macro definitions for completion are available in Dutch and + English. + + * The filling and indentation code was overhauled and is now able to + format commented parts of the source syntactically correct. Newly + available functionality and customization options are explained in + the manual. + + * Filling and indentation in XEmacs with preview-latex and activated + previews lead to the insertion of whitespace before multi-line + previews. AUCTeX now contains facilities to prevent this problem. + + * If `TeX-master' is set to `t', AUCTeX will now query for a master + file only when a new file is opened. Existing files will be left + alone. The new function `TeX-master-file-ask' (bound to `C-c _' + is provided for adding the variable manually. + + * Sectioning commands are now shown in a larger font on display + devices which support such fontification. The variable + `font-latex-title-fontify' can be customized to restore the old + appearance, i.e. the usage of a different color instead of a + change in size. + + * Support for `alphanum.sty', `beamer.cls', `booktabs.sty', + `captcont.sty', `emp.sty', `paralist.sty', `subfigure.sty' and + `units.sty'/`nicefrac.sty' was added. Credits go to the authors + mentioned in the respective AUCTeX style files. + + * Inserting graphics with `C-c RET \includegraphics RET' was + improved. See the variable `LaTeX-includegraphics-options-alist'. + + * If `LaTeX-default-position' is `nil', don't prompt for position + arguments in Tabular-like environments, see *note Tabular-like::. + + * Completion for available packages when using `C-c RET \usepackage + RET' was improved on systems using the kpathsea library. + + * The commenting functionality was fixed. The separate functions for + commenting and uncommenting were unified in one function for + paragraphs and regions respectively which do both. + + * Syntax highlighting can be customized to fontify quotes delimited + by either >>German<< or <> quotation marks by changing the + variable `font-latex-quotes'. + + * Certain TeX/LaTeX keywords for functions, references, variables + and warnings will now be fontified specially. You may add your own + keywords by customizing the variables + `font-latex-match-function-keywords', + `font-latex-match-reference-keywords', + `font-latex-match-variable-keywords' and + `font-latex-match-warning-keywords'. + + * If you include the style files `german' or `ngerman' in a document + (directly or via the `babel' package), you should now customize + `LaTeX-german-open-quote', `LaTeX-german-close-quote' and + `LaTeX-german-quote-after-quote' instead of `TeX-open-quote', + `TeX-close-quote' and `TeX-quote-after-quote' if you want to + influence the type of quote insertion. + + * Upon viewing an output file, the right viewer and command line + options for it are now determined automatically by looking at the + extension of the output file and certain options used in the + source file. The behavior can be adapted or extended respectively + by customizing the variable `TeX-output-view-style'. + + * You can control whether `TeX-insert-macro' (`C-c RET') ask for all + optional arguments by customizing the variable + `TeX-insert-macro-default-style', *note Completion::. + + * `TeX-run-discard' is now able to completely detach a process that + it started. + + * The build process was enhanced and is now based on `autoconf' + making installing AUCTeX a mostly automatic process. See *note + Installation:: and *note Installation under MS Windows:: for + details. + +News in 11.14 +------------- + + * Many more LaTeX and LaTeX2e commands are supported. Done by + Masayuki Ataka + +News in 11.12 +------------- + + * Support for the KOMA-Script classes. Contributed by Mark Trettin + . + +News in 11.11 +------------- + + * Support for `prosper.sty', see `http://prosper.sourceforge.net/'. + Contributed by Phillip Lord . + +News in 11.10 +------------- + + * `comment-region' now inserts %% by default. Suggested by "Davide + G. M. Salvetti" . + +News in 11.06 +------------- + + * You can now switch between using the `font-latex' (all emacsen), + the `tex-font' (Emacs 21 only) or no special package for font + locking. Customize `TeX-install-font-lock' for this. + +News in 11.04 +------------- + + * Now use -t landscape by default when landscape option appears. + Suggested by Erik Frisk . + +News in 11.03 +------------- + + * Use `tex-fptex.el' for fpTeX support. Contributed by Fabrice + Popineau . + +News in 11.02 +------------- + + * New user option `LaTeX-top-caption-list' specifies environments + where the caption should go at top. Contributed by + ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * Allow explicit dimensions in `graphicx.sty'. Contributed by + ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * Limited support for `verbatim.sty'. Contributed by + ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * Better support for asmmath items. Patch by + ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * More accurate error parsing. Added by David Kastrup + . + +News in 11.01 +------------- + + * Bug fixes. + +Older versions +-------------- + +See the file `history.texi' for older changes. + + +File: auctex.info, Node: Development, Next: FAQ, Prev: Changes, Up: Appendices + +A.3 Future Development +====================== + +The following sections describe future development of AUCTeX. Besides +mid-term goals, bug reports and requests we cannot fix or honor right +away are being gathered here. If you have some time for Emacs Lisp +hacking, you are encouraged to try to provide a solution to one of the +following problems. If you don't know Lisp, you may help us to improve +the documentation. It might be a good idea to discuss proposed changes +on the mailing list of AUCTeX first. + +* Menu: + +* Mid-term Goals:: +* Wishlist:: +* Bugs:: + + +File: auctex.info, Node: Mid-term Goals, Next: Wishlist, Up: Development + +A.3.1 Mid-term Goals +-------------------- + + * Integration of preview-latex into AUCTeX + + As of AUCTeX 11.81 preview-latex is a part of AUCTeX in the sense + that the installation routines were merged and preview-latex is + being packaged with AUCTeX. + + Further integration will happen at the backend. This involves + folding of error parsing and task management of both packages + which will ease development efforts and avoid redundant work. + + * More flexible option and command handling + + The current state of command handling with `TeX-command-list' is + not very flexible because there is no distinction between + executables and command line options to be passed to them. + + Customization of `TeX-command-list' by the user will interfere with + updates of AUCTeX. + + * Error help catalogs + + Currently, the help for errors is more or less hardwired into + `tex.el'. For supporting error help in other languages, it would + be sensible to instead arrange error messages in language-specific + files, make a common info file from all such catalogs in a given + language and look the error texts up in an appropriate index. The + user would then specify a preference list of languages, and the + errors would be looked up in the catalogs in sequence until they + were identified. + + * Combining `docTeX' with RefTeX + + Macro cross references should also be usable for document + navigation using RefTeX. + + + +File: auctex.info, Node: Wishlist, Next: Bugs, Prev: Mid-term Goals, Up: Development + +A.3.2 Wishlist +-------------- + + * Documentation lookup for macros + + A parser could gather information about which macros are defined in + which LaTeX packages and store the information in a hashtable which + can be used in a backend for `TeX-doc' in order to open the + matching documentation for a given macro. The information could + also be used to insert an appropriate `\usepackage' statement if + the user tries to insert a macro for which the respective package + has not been requested yet. + + * Spell checking of macros + + A special ispell dictionary for macros could be nice to have. + + * Quick error overviews + + An error overview window (extract from the log file with just the + error lines, clickable like a "grep" buffer) and/or fringe + indicators for errors in the main text would be nice. + + * A math entry grid + + A separate frame with a table of math character graphics to click + on in order to insert the respective sequence into the buffer (cf. + the "grid" of x-symbol). + + * Crossreferencing support + + It would be nice if you could index process your favorite + collection of `.dtx' files (such as the LaTeX source), just call a + command on arbitrary control sequence, and get either the DVI + viewer opened right at the definition of that macro (using Source + Specials), or the source code of the `.dtx' file. + + * Better plain TeX support + + For starters, `LaTeX-math-mode' is not very LaTeX-specific in the + first place, and similar holds for indentation and formatting. + + * Poor man's Source Specials In particular in PDF mode (and where + Source Specials cause problems), alternatives would be desirable. + One could implement inverse search by something like Heiko + Oberdiek's `vpe.sty', and forward search by using the `.aux' file + info to correlate labels in the text (possibly in cooperation with + RefTeX) with previewer pages. + + In AUCTeX 11.83, support for forward search with PDF files was + added. Currently this only works if you use the pdfsync LaTeX + package and xpdf as your PDF viewer. *Note Viewing::. + + * Page count when compiling should (optionally) go to modeline of the + window where the compilation command was invoked, instead of the + output window. Suggested by Karsten Tinnefeld + . + + * Command to insert a macrodefinition in the preamble, without moving + point from the current location. Suggested by "Jeffrey C. Ely" + . + + * A database of all commands defined in all stylefiles. When a + command or environment gets entered that is provided in one of the + styles, insert the appropriate `\usepackage' in the preamble. + + * A way to add and overwrite math mode entries in style files, and to + decide where they should be. Suggested by Remo Badii + . + + * Create template for (first) line of tabular environment. + + * I think prompting for the master is the intended behaviour. It + corresponds to a `shared' value for TeX-master. + + There should probably be a `none' value which wouldn't query for + the master, but instead disable all features that relies on + TeX-master. + + This default value for TeX-master could then be controled with + mapping based on the extension. + + * Multiple argument completion for `\bibliography'. In general, I + ought to make `,' special for these kind of completions. + + * Suggest `makeindex' when appropriate. + + * Use index files (when available) to speed up `C-c C-m include + '. + + * Option not to calculate very slow completions like for `C-c C-m + include '. + + * Font menu should be created from `TeX-font-list'. + + * Installation procedure written purely in emacs lisp. + + * Included PostScript files should also be counted as part of the + document. + + * A nice hierarchical by-topic organization of all officially + documented LaTeX macros, available from the menu bar. + + * `TeX-command-default' should be set from the master file, if not + set locally. Suggested by Peter Whaite `'. + + * Make AUCTeX work with `crypt++'. Suggested by Chris Moore + `'. + + * Make AUCTeX work with `longlines'. This would also apply to + preview-latex, though it might make sense to unify error processing + before attempting this. + + * The `Spell' command should apply to all files in a document. Maybe + it could try to restrict to files that have been modified since + last spell check? Suggested by Ravinder Bhumbla + `'. + + * Make <.> check for abbreviations and sentences ending with capital + letters. + + * Use Emacs 19 minibuffer history to choose between previewers, and + other stuff. Suggested by John Interrante + `'. + + * Make features. + + A new command `TeX-update' (`C-c C-u') could be used to create an + up-to-date dvi file by repeatedly running BibTeX, MakeIndex and + (La)TeX, until an error occurs or we are done. + + An alternative is to have an `Update' command that ensures the + `dvi' file is up to date. This could be called before printing and + previewing. + + * Documentation of variables that can be set in a style hook. + + We need a list of what can safely be done in an ordinary style + hook. You can not set a variable that AUCTeX depends on, unless + AUCTeX knows that it has to run the style hooks first. + + Here is the start of such a list. + `LaTeX-add-environments' + + `TeX-add-symbols' + + `LaTeX-add-labels' + + `LaTeX-add-bibliographies' + + `LaTeX-largest-level' + + * Completion for counters and sboxes. + + * Outline should be (better) supported in TeX mode. + + At least, support headers, trailers, as well as TeX-outline-extra. + + * `TeX-header-start' and `TeX-trailer-end'. + + We might want these, just for fun (and outlines) + + * Plain TeX and LaTeX specific header and trailer expressions. + + We should have a way to globally specify the default value of the + header and trailer regexps. + + * Get closer to original `TeX-mode' keybindings. + + A third initialization file (`tex-mode.el') containing an emulator + of the standard `TeX-mode' would help convince some people to + change to AUCTeX. + + * Make `TeX-next-error' parse ahead and store the results in a list, + using markers to remember buffer positions in order to be more + robust with regard to line numbers and changed files. This is what + `next-error' does. (Or did, until Emacs 19). + + * Finish the Texinfo mode. For one thing, many Texinfo mode + commands do not accept braces around their arguments. + + * Hook up the letter environment with `bbdb.el'. + + + +File: auctex.info, Node: Bugs, Prev: Wishlist, Up: Development + +A.3.3 Bugs +---------- + + * The parsed files and style hooks for `example.dtx', `example.sty', + `example.drv' and `example.bib' all clash. Bad. + + * `C-c `' should always stay in the current window, also when it + finds a new file. + + * Do not overwrite emacs warnings about existing auto-save files when + loading a new file. + + * Maybe the regexp for matching a TeX symbol during parsing should be + `"\\\\\\([a-zA-Z]+\\|.\\)"' -- + `' Peter Thiemann. + + * AUCTeX should not parse verbatim environments. + + * Make ``' check for math context in `LaTeX-math-mode'. and simply + self insert if not in a math context. + + * Make `TeX-insert-dollar' more robust. Currently it can be fooled + by `\mbox''es and escaped double dollar for example. + + * Correct indentation for tabular, tabbing, table, math, and array + environments. + + * No syntactic font locking of verbatim macros and environments. + (XEmacs only) + + * Font locking inside of verbatim macros and environments is not + inhibited. This may result in syntax highlighting of unbalanced + dollar signs and the like spilling out of the verbatim content. + (XEmacs only) + + * Folding of LaTeX constructs spanning more than one line may result + in overfull lines. (XEmacs only) + + +File: auctex.info, Node: FAQ, Prev: Development, Up: Appendices + +A.4 Frequently Asked Questions +============================== + + 1. Something is not working correctly. What should I do? + + Well, you might have guessed it, the first place to look is in the + available documentation packaged with AUCTeX. This could be the + release notes (in the `RELEASE' file) or the news section of the + manual in case you are experiencing problems after an upgrade, the + `INSTALL' file in case you are having problems with the + installation, the section about bugs in the manual in case you + encountered a bug or the relevant sections in the manual for other + related problems. + + If this did not help, you can send a bug report to the AUCTeX bug + reporting list by using the command `M-x TeX-submit-bug-report + RET'. But before you do this, you can try to get more information + about the problem at hand which might also help you locate the + cause of the error yourself. + + First, you can try to generate a so-called backtrace which shows + functions involved in a program error. In order to do this, start + Emacs with the command line `emacs --debug-init' and/or put the + line + + (setq debug-on-error t) + + as the first line into your init file. XEmacs users might want to + add `(setq stack-trace-on-error t)' as well. After Emacs has + started, you can load a file which triggers the error and a new + window should pop up showing the backtrace. If you get such a + backtrace, please include it in the bug report. + + Second, you can try to figure out if something in your personal or + site configuration triggers the error by starting Emacs without + such customizations. You can do this by invoking Emacs with the + command line `emacs -q -no-site-file'. Once Emacs is running, + copy the line + + (load "auctex.el" nil t t) + + into the `*scratch*' buffer and type `M-x eval-buffer RET'. This + makes sure that AUCTeX will be used for the file types it + supports. After you have done so, you can load the file + triggering the error. If everything is working now, you know that + you have to search either in the site configuration file or your + personal init file for statements related to the problem. + + 2. What versions of Emacs and XEmacs are supported? + + AUCTeX was tested with Emacs 21 and XEmacs 21.4.15. Older + versions may work but are unsupported. Older versions of XEmacs + might possibly made to work by updating the `xemacs-base' package + through the XEmacs package system. If you are looking for a + recommendation, it would appear that the smoothest working + platform on all operating systems at the current point of time + would be Emacs 22.1. At the time of this writing, however, it has + not been released and is still under development. The quality of + the development version is quite solid, so we recommend giving it + a try. With a developer version, of course, you have to be + prepared to update in case you managed to get your snapshot at a + bad time. The second best choice would be the latest released + Emacs 21.4. However, Unicode support is less good, there is no + version for the popular GTK toolkit, and the native versions for + Windows and MacOS don't offer toolbar and preview-latex support. + + Our success with XEmacs has been less than convincing. Under the + Windows operating system, nominally the only option for a released, + stable Emacs variant supporting toolbars and preview-latex would be + XEmacs 21.4. However, code for core functionality like formatting + and syntax highlighting tends to be different and often older than + even Emacs 21.4, and Unicode support as delivered is problematic + at best, missing on Windows. Both AUCTeX and XEmacs developers + don't hear much from active users of the combination. Partly for + that reason, problems tend to go unnoticed for long amounts of + time and are often found, if at all, after releases. No + experiences or recommendations can be given for beta or developer + versions of XEmacs. + + 3. What should I do when `./configure' does not find programs like + latex? + + This is problem often encountered on Windows. Make sure that the + `PATH' environment variable includes the directories containing the + relevant programs, as described in *note Installation under MS + Windows: (auctex)Installation under MS Windows. + + 4. Why doesn't the completion, style file, or multi-file stuff work? + + It must be enabled first, insert this in your init file: + + (setq-default TeX-master nil) + (setq TeX-parse-self t) + (setq TeX-auto-save t) + + Read also the chapters about parsing and multifile documents in the + manual. + + 5. Why doesn't `TeX-save-document' work? + + `TeX-check-path' has to contain "./" somewhere. + + 6. Why is the information in `foo.tex' forgotten when I save + `foo.bib'? + + For various reasons, AUCTeX ignores the extension when it stores + information about a file, so you should use unique base names for + your files. E.g. rename `foo.bib' to `foob.bib'. + + 7. Why doesn't AUCTeX signal when processing a document is done? + + If the message in the minibuffer stays "Type `C-c C-l' to display + results of compilation.", you probably have a misconfiguration in + your init file (`.emacs', `init.el' or similar). To track this + down either search in the `*Messages*' buffer for an error message + or put `(setq debug-on-error t)' as the first line into your init + file, restart Emacs and open a LaTeX file. Emacs will complain + loudly by opening a debugging buffer as soon as an error occurs. + The information in the debugging buffer can help you find the + cause of the error in your init file. + + 8. What does AUC stand for? + + AUCTeX came into being at Aalborg University in Denmark. Back then + the Danish name of the university was Aalborg Universitetscenter; + AUC for short. + + + +File: auctex.info, Node: Indices, Prev: Appendices, Up: Top + +Indices +******* + +* Menu: + +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: + + +File: auctex.info, Node: Key Index, Next: Function Index, Up: Indices + +Key Index +========= + +[index] +* Menu: + +* ": Quotes. (line 15) +* $: Quotes. (line 62) +* : Indenting. (line 72) +* : Indenting. (line 69) +* C-c %: Commenting. (line 23) +* C-c ;: Commenting. (line 15) +* C-c : Itemize-like. (line 10) +* C-c ?: Documentation. (line 7) +* C-c ]: Environments. (line 56) +* C-c ^: Control. (line 18) +* C-c _: Multifile. (line 70) +* C-c `: Debugging. (line 10) +* C-c C-b: Starting a Command. (line 35) +* C-c C-c: Starting a Command. (line 13) +* C-c C-d: Multifile. (line 98) +* C-c C-e: Environments. (line 20) +* C-c C-f: Font Specifiers. (line 44) +* C-c C-f C-b <1>: Font Specifiers. (line 16) +* C-c C-f C-b: Editing Facilities. (line 73) +* C-c C-f C-c <1>: Font Specifiers. (line 37) +* C-c C-f C-c: Editing Facilities. (line 94) +* C-c C-f C-e <1>: Font Specifiers. (line 22) +* C-c C-f C-e: Editing Facilities. (line 79) +* C-c C-f C-f <1>: Font Specifiers. (line 31) +* C-c C-f C-f: Editing Facilities. (line 88) +* C-c C-f C-i <1>: Font Specifiers. (line 19) +* C-c C-f C-i: Editing Facilities. (line 76) +* C-c C-f C-r <1>: Font Specifiers. (line 28) +* C-c C-f C-r: Editing Facilities. (line 85) +* C-c C-f C-s <1>: Font Specifiers. (line 25) +* C-c C-f C-s: Editing Facilities. (line 82) +* C-c C-f C-t <1>: Font Specifiers. (line 34) +* C-c C-f C-t: Editing Facilities. (line 91) +* C-c C-k: Control. (line 10) +* C-c C-l: Control. (line 14) +* C-c C-m: Completion. (line 30) +* C-c C-n: Parsing Files. (line 44) +* C-c C-o b: Folding. (line 113) +* C-c C-o C-b: Folding. (line 44) +* C-c C-o C-c: Folding. (line 110) +* C-c C-o C-e: Folding. (line 94) +* C-c C-o C-f: Folding. (line 32) +* C-c C-o C-m: Folding. (line 85) +* C-c C-o C-o: Folding. (line 132) +* C-c C-o C-p: Folding. (line 81) +* C-c C-o C-r: Folding. (line 78) +* C-c C-o i: Folding. (line 125) +* C-c C-o p: Folding. (line 121) +* C-c C-o r: Folding. (line 117) +* C-c C-q C-e: Filling. (line 92) +* C-c C-q C-p: Filling. (line 86) +* C-c C-q C-r: Filling. (line 101) +* C-c C-q C-s: Filling. (line 97) +* C-c C-r: Starting a Command. (line 19) +* C-c C-s: Sectioning. (line 23) +* C-c C-t C-b: Debugging. (line 19) +* C-c C-t C-i: Processor Options. (line 29) +* C-c C-t C-p: Processor Options. (line 15) +* C-c C-t C-r: Starting a Command. (line 61) +* C-c C-t C-s: Processor Options. (line 36) +* C-c C-t C-w: Debugging. (line 23) +* C-c C-v: Starting Viewers. (line 12) +* C-c {: Quotes. (line 86) +* C-c ~: Mathematics. (line 12) +* C-j: Indenting. (line 81) +* M-: Completion. (line 20) +* M-q: Filling. (line 89) + + +File: auctex.info, Node: Function Index, Next: Variable Index, Prev: Key Index, Up: Indices + +Function Index +============== + +[index] +* Menu: + +* LaTeX-add-bibliographies: Adding Other. (line 11) +* LaTeX-add-environments: Adding Environments. (line 67) +* LaTeX-add-labels: Adding Other. (line 14) +* LaTeX-close-environment: Environments. (line 56) +* LaTeX-env-args: Adding Environments. (line 109) +* LaTeX-env-array: Adding Environments. (line 81) +* LaTeX-env-bib: Adding Environments. (line 103) +* LaTeX-env-contents: Adding Environments. (line 106) +* LaTeX-env-figure: Adding Environments. (line 77) +* LaTeX-env-item: Adding Environments. (line 74) +* LaTeX-env-label: Adding Environments. (line 85) +* LaTeX-env-list: Adding Environments. (line 88) +* LaTeX-env-minipage: Adding Environments. (line 92) +* LaTeX-env-picture: Adding Environments. (line 100) +* LaTeX-env-tabular*: Adding Environments. (line 96) +* LaTeX-environment: Environments. (line 20) +* LaTeX-fill-environment: Filling. (line 81) +* LaTeX-fill-paragraph: Filling. (line 86) +* LaTeX-fill-region: Filling. (line 101) +* LaTeX-fill-section: Filling. (line 97) +* LaTeX-indent-line: Indenting. (line 69) +* LaTeX-insert-environment: Adding Environments. (line 70) +* LaTeX-insert-item: Itemize-like. (line 10) +* LaTeX-math-mode: Mathematics. (line 12) +* LaTeX-section: Sectioning. (line 23) +* LaTeX-section-heading: Sectioning. (line 85) +* LaTeX-section-label: Sectioning. (line 101) +* LaTeX-section-section: Sectioning. (line 95) +* LaTeX-section-title: Sectioning. (line 89) +* LaTeX-section-toc: Sectioning. (line 92) +* TeX-add-style-hook: Simple Style. (line 28) +* TeX-add-symbols: Adding Macros. (line 25) +* TeX-arg-cite: Adding Macros. (line 105) +* TeX-arg-conditional: Adding Macros. (line 82) +* TeX-arg-coordinate: Adding Macros. (line 165) +* TeX-arg-corner: Adding Macros. (line 143) +* TeX-arg-counter: Adding Macros. (line 108) +* TeX-arg-define-cite: Adding Macros. (line 134) +* TeX-arg-define-counter: Adding Macros. (line 137) +* TeX-arg-define-environment: Adding Macros. (line 130) +* TeX-arg-define-label: Adding Macros. (line 122) +* TeX-arg-define-macro: Adding Macros. (line 126) +* TeX-arg-define-savebox: Adding Macros. (line 140) +* TeX-arg-environment: Adding Macros. (line 102) +* TeX-arg-eval: Adding Macros. (line 93) +* TeX-arg-file: Adding Macros. (line 114) +* TeX-arg-free: Adding Macros. (line 90) +* TeX-arg-input-file: Adding Macros. (line 118) +* TeX-arg-label: Adding Macros. (line 96) +* TeX-arg-literal: Adding Macros. (line 86) +* TeX-arg-lr: Adding Macros. (line 146) +* TeX-arg-macro: Adding Macros. (line 99) +* TeX-arg-pagestyle: Adding Macros. (line 152) +* TeX-arg-pair: Adding Macros. (line 158) +* TeX-arg-savebox: Adding Macros. (line 111) +* TeX-arg-size: Adding Macros. (line 162) +* TeX-arg-tb: Adding Macros. (line 149) +* TeX-arg-verb: Adding Macros. (line 155) +* TeX-auto-generate: Automatic Private. (line 24) +* TeX-clean: Cleaning. (line 7) +* TeX-command-buffer: Starting a Command. (line 35) +* TeX-command-master: Starting a Command. (line 13) +* TeX-command-region: Starting a Command. (line 19) +* TeX-comment-or-uncomment-paragraph: Commenting. (line 23) +* TeX-comment-or-uncomment-region: Commenting. (line 15) +* TeX-complete-symbol: Completion. (line 20) +* TeX-doc: Documentation. (line 7) +* TeX-electric-macro: Completion. (line 67) +* TeX-fold-buffer: Folding. (line 44) +* TeX-fold-clearout-buffer: Folding. (line 113) +* TeX-fold-clearout-item: Folding. (line 125) +* TeX-fold-clearout-paragraph: Folding. (line 121) +* TeX-fold-clearout-region: Folding. (line 117) +* TeX-fold-comment: Folding. (line 110) +* TeX-fold-dwim: Folding. (line 132) +* TeX-fold-env: Folding. (line 94) +* TeX-fold-macro: Folding. (line 85) +* TeX-fold-math: Folding. (line 101) +* TeX-fold-mode: Folding. (line 32) +* TeX-fold-paragraph: Folding. (line 81) +* TeX-fold-region: Folding. (line 78) +* TeX-font: Font Specifiers. (line 44) +* TeX-header-end: Multifile. (line 29) +* TeX-home-buffer: Control. (line 18) +* TeX-insert-braces: Quotes. (line 86) +* TeX-insert-dollar: Quotes. (line 62) +* TeX-insert-macro: Completion. (line 30) +* TeX-insert-quote: Quotes. (line 15) +* TeX-interactive-mode: Processor Options. (line 29) +* TeX-kill-job: Control. (line 10) +* TeX-master-file-ask: Multifile. (line 70) +* TeX-next-error: Debugging. (line 10) +* TeX-normal-mode: Parsing Files. (line 44) +* TeX-PDF-mode: Processor Options. (line 15) +* TeX-pin-region: Starting a Command. (line 61) +* TeX-recenter-output-buffer: Control. (line 14) +* TeX-save-document: Multifile. (line 98) +* TeX-source-correlate-mode <1>: I/O Correlation. (line 12) +* TeX-source-correlate-mode: Processor Options. (line 36) +* TeX-toggle-debug-bad-boxes: Debugging. (line 19) +* TeX-toggle-debug-warnings: Debugging. (line 23) +* TeX-view <1>: I/O Correlation. (line 20) +* TeX-view: Starting Viewers. (line 12) + + +File: auctex.info, Node: Variable Index, Next: Concept Index, Prev: Function Index, Up: Indices + +Variable Index +============== + +[index] +* Menu: + +* ConTeXt-clean-intermediate-suffixes: Cleaning. (line 7) +* ConTeXt-clean-output-suffixes: Cleaning. (line 7) +* ConTeXt-engine: Processor Options. (line 83) +* ConTeXt-Omega-engine: Processor Options. (line 83) +* docTeX-clean-intermediate-suffixes: Cleaning. (line 7) +* docTeX-clean-output-suffixes: Cleaning. (line 7) +* font-latex-deactivated-keyword-classes: Fontification of macros. + (line 174) +* font-latex-fontify-script: Fontification of math. + (line 21) +* font-latex-fontify-sectioning: Fontification of macros. + (line 102) +* font-latex-match-bold-command-keywords: Fontification of macros. + (line 143) +* font-latex-match-bold-declaration-keywords: Fontification of macros. + (line 143) +* font-latex-match-function-keywords: Fontification of macros. + (line 66) +* font-latex-match-italic-command-keywords: Fontification of macros. + (line 143) +* font-latex-match-italic-declaration-keywords: Fontification of macros. + (line 143) +* font-latex-match-math-command-keywords <1>: Fontification of math. + (line 6) +* font-latex-match-math-command-keywords: Fontification of macros. + (line 143) +* font-latex-match-reference-keywords: Fontification of macros. + (line 66) +* font-latex-match-sectioning-0-keywords: Fontification of macros. + (line 113) +* font-latex-match-sectioning-1-keywords: Fontification of macros. + (line 113) +* font-latex-match-sectioning-2-keywords: Fontification of macros. + (line 113) +* font-latex-match-sectioning-3-keywords: Fontification of macros. + (line 113) +* font-latex-match-sectioning-4-keywords: Fontification of macros. + (line 113) +* font-latex-match-sectioning-5-keywords: Fontification of macros. + (line 113) +* font-latex-match-slide-title-keywords: Fontification of macros. + (line 120) +* font-latex-match-textual-keywords: Fontification of macros. + (line 66) +* font-latex-match-type-command-keywords: Fontification of macros. + (line 143) +* font-latex-match-type-declaration-keywords: Fontification of macros. + (line 143) +* font-latex-match-variable-keywords: Fontification of macros. + (line 66) +* font-latex-match-warning-keywords: Fontification of macros. + (line 66) +* font-latex-math-environments: Fontification of math. + (line 6) +* font-latex-quotes: Fontification of quotes. + (line 16) +* font-latex-script-display: Fontification of math. + (line 29) +* font-latex-sectioning-0-face: Fontification of macros. + (line 102) +* font-latex-sectioning-1-face: Fontification of macros. + (line 102) +* font-latex-sectioning-2-face: Fontification of macros. + (line 102) +* font-latex-sectioning-3-face: Fontification of macros. + (line 102) +* font-latex-sectioning-4-face: Fontification of macros. + (line 102) +* font-latex-sectioning-5-face: Fontification of macros. + (line 102) +* font-latex-slide-title-face: Fontification of macros. + (line 120) +* font-latex-user-keyword-classes: Fontification of macros. + (line 204) +* japanese-LaTeX-command-default: Japanese. (line 6) +* japanese-LaTeX-default-style: Japanese. (line 6) +* japanese-TeX-command-default: Japanese. (line 6) +* LaTeX-amsmath-label: Equations. (line 16) +* LaTeX-auto-label-regexp-list: Parsing Files. (line 100) +* LaTeX-auto-minimal-regexp-list: Parsing Files. (line 97) +* LaTeX-auto-regexp-list: Parsing Files. (line 103) +* LaTeX-babel-hyphen: European. (line 150) +* LaTeX-babel-hyphen-after-hyphen: European. (line 158) +* LaTeX-babel-hyphen-language-alist: European. (line 137) +* LaTeX-clean-intermediate-suffixes: Cleaning. (line 7) +* LaTeX-clean-output-suffixes: Cleaning. (line 7) +* LaTeX-command: Processor Options. (line 83) +* LaTeX-csquotes-close-quote: Quotes. (line 44) +* LaTeX-csquotes-open-quote: Quotes. (line 44) +* LaTeX-csquotes-quote-after-quote: Quotes. (line 44) +* LaTeX-default-environment: Environments. (line 35) +* LaTeX-default-format: Tabular-like. (line 11) +* LaTeX-default-position: Tabular-like. (line 14) +* LaTeX-enable-toolbar: Processing. (line 11) +* LaTeX-eqnarray-label: Equations. (line 13) +* LaTeX-equation-label: Equations. (line 10) +* LaTeX-figure-label: Floats. (line 25) +* LaTeX-fill-break-at-separators: Filling. (line 104) +* LaTeX-fill-break-before-code-comments: Filling. (line 114) +* LaTeX-float: Floats. (line 14) +* LaTeX-fold-env-spec-list: Folding. (line 189) +* LaTeX-fold-macro-spec-list: Folding. (line 189) +* LaTeX-fold-math-spec-list: Folding. (line 189) +* LaTeX-font-list: Font Specifiers. (line 59) +* LaTeX-indent-environment-check: Indenting. (line 51) +* LaTeX-indent-environment-list: Indenting. (line 37) +* LaTeX-indent-level: Indenting. (line 19) +* LaTeX-item-indent: Indenting. (line 19) +* LaTeX-item-regexp: Indenting. (line 19) +* LaTeX-math-abbrev-prefix: Mathematics. (line 27) +* LaTeX-math-list: Mathematics. (line 37) +* LaTeX-math-menu-unicode: Mathematics. (line 55) +* LaTeX-Omega-command: Processor Options. (line 83) +* LaTeX-paragraph-commands: Filling. (line 55) +* LaTeX-section-hook: Sectioning. (line 50) +* LaTeX-section-label: Sectioning. (line 53) +* LaTeX-syntactic-comments: Indenting. (line 63) +* LaTeX-table-label: Floats. (line 25) +* LaTeX-top-caption-list: Floats. (line 20) +* LaTeX-verbatim-environments: Verbatim content. (line 10) +* LaTeX-verbatim-macros-with-braces: Verbatim content. (line 10) +* LaTeX-verbatim-macros-with-delims: Verbatim content. (line 10) +* plain-TeX-auto-regexp-list: Parsing Files. (line 106) +* plain-TeX-clean-intermediate-suffixes: Cleaning. (line 7) +* plain-TeX-clean-output-suffixes: Cleaning. (line 7) +* plain-TeX-enable-toolbar: Processing. (line 11) +* TeX-auto-cleanup-hook: Hacking the Parser. (line 101) +* TeX-auto-empty-regexp-list: Parsing Files. (line 94) +* TeX-auto-full-regexp-list: Parsing Files. (line 109) +* TeX-auto-global: Automatic Global. (line 26) +* TeX-auto-local: Automatic Local. (line 23) +* TeX-auto-parse-length: Parsing Files. (line 88) +* TeX-auto-prepare-hook: Hacking the Parser. (line 98) +* TeX-auto-private: Automatic Private. (line 20) +* TeX-auto-regexp-list <1>: Hacking the Parser. (line 79) +* TeX-auto-regexp-list: Parsing Files. (line 85) +* TeX-auto-save: Parsing Files. (line 41) +* TeX-auto-untabify: Parsing Files. (line 58) +* TeX-brace-indent-level: Indenting. (line 103) +* TeX-check-path: Selecting a Command. (line 56) +* TeX-clean-confirm: Cleaning. (line 27) +* TeX-close-quote: Quotes. (line 26) +* TeX-command: Processor Options. (line 83) +* TeX-command-default: Selecting a Command. (line 43) +* TeX-command-list <1>: Selecting a Command. (line 14) +* TeX-command-list: Starting a Command. (line 16) +* TeX-default-macro: Completion. (line 52) +* TeX-default-mode: Japanese. (line 6) +* TeX-display-help: Debugging. (line 31) +* TeX-DVI-via-PDFTeX: Processor Options. (line 22) +* TeX-electric-escape: Completion. (line 59) +* TeX-electric-sub-and-superscript: Mathematics. (line 69) +* TeX-engine: Processor Options. (line 67) +* TeX-engine-alist: Processor Options. (line 83) +* TeX-engine-alist-builtin: Processor Options. (line 83) +* TeX-expand-list: Selecting a Command. (line 14) +* TeX-file-recurse: Automatic. (line 46) +* TeX-fold-command-prefix: Folding. (line 137) +* TeX-fold-env-spec-list: Folding. (line 180) +* TeX-fold-force-fontify: Folding. (line 64) +* TeX-fold-help-echo-max-length: Folding. (line 217) +* TeX-fold-macro-spec-list: Folding. (line 147) +* TeX-fold-math-spec-list: Folding. (line 187) +* TeX-fold-preserve-comments: Folding. (line 72) +* TeX-fold-type-list: Folding. (line 59) +* TeX-fold-unspec-env-display-string: Folding. (line 200) +* TeX-fold-unspec-macro-display-string: Folding. (line 196) +* TeX-fold-unspec-use-name: Folding. (line 204) +* TeX-font-list: Font Specifiers. (line 50) +* TeX-header-end: Starting a Command. (line 32) +* TeX-ignore-file: Automatic. (line 54) +* TeX-insert-braces: Completion. (line 77) +* TeX-insert-macro-default-style: Completion. (line 38) +* TeX-install-font-lock: Font Locking. (line 14) +* TeX-interactive-mode: Processor Options. (line 29) +* TeX-language-bg-hook: European. (line 53) +* TeX-language-cz-hook: European. (line 53) +* TeX-language-de-hook: European. (line 53) +* TeX-language-dk-hook: European. (line 53) +* TeX-language-is-hook: European. (line 53) +* TeX-language-it-hook: European. (line 53) +* TeX-language-nl-hook: European. (line 53) +* TeX-language-pl-hook: European. (line 53) +* TeX-language-sk-hook: European. (line 53) +* TeX-language-sv-hook: European. (line 53) +* TeX-macro-global <1>: Automatic Global. (line 17) +* TeX-macro-global: Customizing. (line 20) +* TeX-macro-private: Automatic Private. (line 13) +* TeX-master <1>: Multifile. (line 42) +* TeX-master: Starting a Command. (line 16) +* TeX-math-close-double-dollar: Quotes. (line 72) +* TeX-newline-function: Indenting. (line 29) +* TeX-Omega-command: Processor Options. (line 83) +* TeX-one-master: Multifile. (line 57) +* TeX-open-quote: Quotes. (line 22) +* TeX-outline-extra: Outline. (line 14) +* TeX-output-view-style: Starting Viewers. (line 100) +* TeX-parse-self: Parsing Files. (line 38) +* TeX-PDF-mode: Processor Options. (line 15) +* TeX-quote-after-quote: Quotes. (line 30) +* TeX-quote-language-alist: European. (line 124) +* TeX-region: Starting a Command. (line 32) +* TeX-save-query: Multifile. (line 102) +* TeX-show-compilation: Processor Options. (line 110) +* TeX-source-correlate-method: Processor Options. (line 47) +* TeX-source-correlate-mode: Processor Options. (line 36) +* TeX-source-correlate-start-server: I/O Correlation. (line 26) +* TeX-style-global: Automatic Global. (line 20) +* TeX-style-local: Automatic Local. (line 17) +* TeX-style-path: Automatic. (line 39) +* TeX-style-private: Automatic Private. (line 29) +* TeX-trailer-start: Starting a Command. (line 32) +* TeX-view-predicate-list: Starting Viewers. (line 58) +* TeX-view-program-list: Starting Viewers. (line 67) +* TeX-view-program-selection: Starting Viewers. (line 38) +* TeX-view-style: Starting Viewers. (line 109) +* Texinfo-clean-intermediate-suffixes: Cleaning. (line 7) +* Texinfo-clean-output-suffixes: Cleaning. (line 7) + diff --git a/aquamacs/src/site-lisp/edit-modes/info/auctex.info-2 b/aquamacs/src/site-lisp/edit-modes/info/auctex.info-2 new file mode 100644 index 000000000000..87100321e728 Binary files /dev/null and b/aquamacs/src/site-lisp/edit-modes/info/auctex.info-2 differ diff --git a/aquamacs/src/site-lisp/edit-modes/info/ess.info b/aquamacs/src/site-lisp/edit-modes/info/ess.info index 95fd3365ef6c..d66c24867df0 100644 --- a/aquamacs/src/site-lisp/edit-modes/info/ess.info +++ b/aquamacs/src/site-lisp/edit-modes/info/ess.info @@ -1,11 +1,11 @@ -ESS -- Emacs Speaks Statistics -This is ess.info, produced by makeinfo version 4.13 from ess.texi. +This is ess.info, produced by makeinfo version 4.8 from ess.texi. +ESS -- Emacs Speaks Statistics ****************************** INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY -* ESS: (ess). Emacs Speaks Statistics (S/S+/R, SAS, BUGS/JAGS, Stata, XLisp-Stat). +* ESS: (ess). Emacs Speaks Statistics (S/S+/R, SAS, BUGS, Stata, XLisp-Stat). END-INFO-DIR-ENTRY  @@ -14,28 +14,26 @@ File: ess.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) ESS: Emacs Speaks Statistics **************************** -ESS version 5.8 +ESS version 5.3.6 by A.J. Rossini, R.M. Heiberger, K. Hornik, M. Maechler, - R.A. Sparapani, - S.J. Eglen, - S.P. Luque - and H. Redestig. + R.A. Sparapani + and S.J. Eglen. Emacs Speaks Statistics (ESS) provides an intelligent, consistent interface between the user and the software. ESS interfaces with - SAS, S-PLUS, R, BUGS/JAGS and other statistical analysis packages - under the Unix, Microsoft Windows, and Apple Mac operating - systems. ESS is itself a package within the emacs text editor and - uses emacs features to streamline the creation and use of - statistical software. ESS knows the syntax and grammar of - statistical analysis packages and provides consistent display and - editing features based on that knowledge. ESS assists in - interactive and batch execution of statements written in these - statistical analysis languages. + SAS, S-PLUS, R, BUGS and other statistical analysis packages under + the Unix, Microsoft Windows, and Apple Mac operating systems. ESS + is itself a package within the emacs text editor and uses emacs + features to streamline the creation and use of statistical + software. ESS knows the syntax and grammar of statistical + analysis packages and provides consistent display and editing + features based on that knowledge. ESS assists in interactive and + batch execution of statements written in these statistical + analysis languages. * Menu: @@ -53,7 +51,6 @@ ESS version 5.8 * ESS for SAS:: * ESS for BUGS:: -* ESS for JAGS:: * Miscellaneous:: Other features of ESS * Mailing lists/bug reports:: How to get assistance with ESS @@ -78,8 +75,8 @@ incorporated. ESS provides a common, generic, and useful interface, through emacs, to many statistical packages. It currently supports the S family, SAS, -BUGS/JAGS, Stata and XLisp-Stat with the level of support roughly in -that order. +BUGS, Stata and XLisp-Stat with the level of support roughly in that +order. A bit of notation before we begin. _emacs_ refers to both _GNU Emacs_ by the Free Software Foundation, as well as _XEmacs_ by the @@ -208,819 +205,623 @@ File: ess.info, Node: New features, Next: Credits, Prev: Features, Up: Intro 1.2 New features in ESS ======================= - Changes/New Features in 5.8: - * ESS[R]: New ess-rutils.el with utilities for listing, loading, - installing, and updating packages, as well as object - manipulation (listing, viewing, and deleting). It also - provides an alternative to RSiteSearch() that uses the - browse-url function, so results can be viewed in an Emacs web - browser. +Changes/New Features in 5.3.6: + * ESS: for Xemacs, using "gnuclient" (without a "-q") works for + things like fix() after M-x gnuserv-start has been done. + + * ESSR: M-x R-newest should now work in more situations on MS + Windows, e.g., when R has been installed in a non-default + "ProgramFiles" directory tree. - * ESS[R]: much more extensive Roxygen interface, via ess-roxy.el - from Henning Redestig. Ess-roxy supports filling of roxygen - fields, generation and updating roxygen templates, - completion of roxygen tags, basic navigation (marking and - moving between entries), foling using hs-minor-mode and - preview of the Rd file. + * ESSR: For Xemacs, startup (with new tooltip code) works again. - * Emacs lisp files have got better names (partly, for now). + Changes/New Features in 5.3.5: + * ESS[R] a new defun is available, `M-x R-newest', which will start + the newest version of R that it can find on your system. - Changes/New Features in 5.7: - * ESS[R]: loading a source file (`C-c C-l') now works in - Windows, similarly to other platforms; (further; it had - accidentally been broken in ESS 5.6 on all platforms) + * ESS[R] add Sven Hartenstein's "R function arguments tips" + functionality, via new file `../lisp/essd-r-args.el'. Note that + this includes an "electric "("" behavior inside `R-mode' which is + _active by default_ and can be customized via + ESS-R-ARGS-ELECTRIC-PAREN; i.e., use `(setq + ess-r-args-electric-paren nil)' to turn it off. Further, + ESS-R-ARGS-SHOW-AS allows to switch to the "tooltip" mode. - Changes/New Features in 5.6: - * ESS[R]: help() calls have to differ from old default, with - newer versions of R; currently via .help.ESS <- - function(...) hack. - - Changes/New Features in 5.4: - * ESS[SAS]: The long overdue change from `make-regexp' to - `regexp-opt' for font-locking is complete. The new - `regexp-opt' is now the default since it is better than the - old code in many ways (and especially more maintainable). - However, there are certainly some special cases missed (bug - reports and patches welcome!). Setting - `ess-sas-run-regexp-opt' to `nil' will result in the old code - being used. + * ESS: functions `ess-get-pdf-viewer' and *-ps-viewer; built on new + customizable variables ESS-PDF-VIEWER-PREF and + ESS-PS-VIEWER-PREF; currently used in `ess-swv-PDF' and `*-PS'. - * ESS[BUGS] and ESS[JAGS]: typing `=' now results in `<-'. - - * ESS[R] function arguments "show" `(ess-r-args-show)' now - uses the new `(tooltip-show-at-point)' contributed by Erik - Iverson. - - * Toolbar icons now also work in (beta) Emacs 23. - - * ESS[S]: New function `ess-change-directory' for setting both - emacs' current directory and the directory of an *R* or *S* - buffer. - - * ESS[S] when transient-mark-mode is true, the mark is now kept, - rather than deactivated, thanks to a patch from David Reitter. - - Changes/New Features in 5.3.11: - * ESS[SAS]: work around bug in Emacs 22.2 & 22.3 which fails to - set case-fold fontification automatically. + * ESS[R] Improved `ess-swv-PDF' to run pdf viewer only if pdflatex + was ok - * Rd mode: support new keyword 'Rdversion' + * ESS[R] Improved `ess-swv-weave' to start R automatically if none + is running. - * ESS[R]: now again works with Emacs 21.x + * ESS: Do no longer ask _which_ ESS process to use if there is only + one. - Changes/New Features in 5.3.10: - * Fixed noweb-mode bug accidentally introduced into 5.3.9 + Changes/New Features in 5.3.4: + * ESS[R] now better work with options(error=recover); and the new + default of CHM help files on windows. - * In noweb-mode, e.g., Rnw-mode, electric "<" also inserts - closing "@". Further, the code chunk boundaries are better - kept up-to-date, such that code[R] <-> text[LaTeX] minor - mode switching should happen more reliably. + * ESS[R] some more cleanup in the "sweave" functions - * In noweb-mode, fix a buglet in rare [Enter] or [Tab] - behavior; further, by default disable the former `[[' .. - `]]' code-protection-when-filling behavior which has been - found to be buggy. + * miscellaneous fixes - Changes/New Features in 5.3.9: - * ESS[SAS]: evince PDF viewer now supported as well; search - order: evince, Xpdf, Adobe/Acrobat Reader + Changes/New Features in 5.3.3: + * ESS[S] fix buglet (5.3.2 only) which left command prompt in + "execute buffer" and hence help files. - * ESS[R]: added support for Roxygen, potentially to be extended. - - * ESS[S] (and R): inferior (`*R*') and transcript modes no - longer fontify language keywords (such as `for', `in', etc). + * new customizable variable `ess-display-buffer-reuse-frames' set to + true (which changes default behavior) such that execution or help + *frames* are reused. - * iESS[Stata]: Customize the `ess-sta-delimiter-friendly' - setting to `t' to convert embedded semi-colons to newlines - for Stata processing. - - * Sweave fix for embedded blanks in PDF reader and PDF files - - * Several fixes for Major Mode Convention violations in - `ess-mode' and `noweb-mode'. - - * ESS[JAGS]: `M-x comment-region' now available! - - * ESS[S] The `ess-swv-*' commands (and keybindings) are now in - a submenu of the "Noweb" menu, when editing Sweave files. - - Changes/New Features in 5.3.8: - * ESS[JAGS]: more separation from ESS[BUGS] (as much as is - currently planned); now `C-c C-c' on an empty `.jmd' creates - a template as it should; symbolic links are created for CODA - output so BOA is happy: from `index.txt' to `.ind' and - `chain#.txt' to `#.out' - - * ESS[SAS]: buffer-local `ess-sas-submit-command' and - `ess-sas-submit-command-options' now recognized by - `ess-sas-submit-region' + Changes/New Features in 5.3.2: + * Classic BUGS now supported by `(require 'essd-bugs)' with ESS[BUGS] + and JAGS by `(require 'essd-jags)' with ESS[JAGS]. But, + only one of them can be used at a time since they don't play + nice together. Also, `C-c C-c' is now bound to the function + `ess-bugs-next-action' (`F12' has been retired). And + finally, note that `essl-bug.el' is deprecated and the + replacement is `essl-bugs.el'. + + * ESS[R] Improved some of the "Sweave-make" functions (yet scarcely + documented) in `ess-swv.el'. + + * ESS[S] No longer mess with .Last.value (nor in other "languages"). + + Changes/New Features in 5.3.1: + * See the docs for 2 ways to install ESS for XEmacs + 1. by uncommenting the XEmacs part of Section 1 of + `Makeconf' and performing `make install' + + 2. by unpacking either `ess-5.3.1.tgz' or + `ess-5.3.1.zip' into + `PREFIX/lib/xemacs/site-packages' on unix or + `PREFIX\XEmacs\site-packages' on windows + + * ESS[R]: fixed bugs so that Rterm.exe can be found by XEmacs - * ESS[S]: When trying to evaluate code in an S language buffer - and there is no associated process, now start R - automatically instead of signalling an error. Also, restart - R if there is an associated process which is not running. - However, do not start R just via the "electric" `(' - (`ess-r-args-auto-show'). + * ESS[S]: `ess-toggle-S-assign-key' is slightly changed; in + particular, the default `ess-assign-key' is now `C-x ='. - * ESS[S]: For (one-line) functions withOUT '{ .. }' bodys, the - end of function is now correctly found more often. This - notably improves `C-c C-c' - (`ess-eval-function-or-paragraph-and-step'). + * ESS[R]: `M-x R-site-search' is a new (slightly experimental) + utility similar to R's `RSiteSearch(..)' but with the advantage of + using Emacs' preferred browser, see `browse-url-browser-function' - * ESS[JAGS]: cleanup/re-organization of elisp code; symbolic - links for CODA output are now only created by the new JAGS - `system' command in version 1.0.3; specify whether this - command is available via `ess-jags-system'; if not present, - then no links are created so that the `*shell*' buffer does - not become unresponsive during the batch run + Changes/New Features in 5.3.0: + * ESS[BUGS]: sanely re-format statistical output, `.bog', from + scientific notation to numbers rounded with 4 decimal places with + `M-x ess-bugs-sci-round-to-4-dp'. - Changes/New Features in 5.3.7: - * ESS: `ess-default-style' now *is* customizable, i.e., - changing its value in `~/.emacs' now does have the desired - effect. + * The keys for navigating among section headings in help buffers + worked, but only for one language per session; they should now + work for multiple languages. (They were also broken on Windows + machines.) - * ESS: `ess-font-lock-mode' is a new variable (default: t) - which controls whether font-locking is enabled in ESS buffers. + * ESS[S] long standing buglets in the internal logic for loading + lisp code on Windows. Particularly fixed behavior in help mode + with S-plus GUI. - * ESS[R]: for XEmacs on Windows; another tweak to find R - versions + * New variable, `ess-use-inferior-program-name-in-buffer-name', + which enables using the executable name instead of the dialect + name for R. Feature request. - * ESS[SAS]: font-locking updated for ODS and SAS Bayesian - Procedures; a more consistent handling of SAS options by - `ess-sas-submit-command-options' which is buffer-local; - portable snooze for MS Windows via customize-able - `ess-sleep-for' (floats welcome); Xpdf now supported as a PDF - viewer + * ESS[S] `ess-execute-screen-options' now also works correctly when + there is more than one window *side-by-side* in the same frame and + runs in the correct buffer also when there is more than one S + buffer. - * ESS[Rnw]: now also works with "emacs -nw" and Emacs 22. + * iESS[S] new functions `ess-eval-paragraph-and-step' and + `ess-eval-function-or-paragraph-and-step' are bound to keys `C-c + C-p' and `C-c C-c' respectively and to the menu in ESS-mode; also + bound in the help mode (for evaluating examples). + + * ESS[S] new function `ess-toggle-S-assign-key' allows to assign the + " <- " insertion to an arbitrary key. + + Changes/New Features in 5.2.12: + * ESS[SAS]: `M-;' fixed, but the XEmacs function `comment-dwim' may + be broken, if so, use `M-x comment-region' and `M-x + uncomment-region' instead; only valid PROCs are fontified which is + very helpful finding syntax errors (currently supported: BASE, + ETS, FSP, GRAPH, IML, INSIGHT and STAT); the "feature" where + `F'-keys take you to an empty buffer when the requested + destination is a file that does not exist has been fixed, now the + request results in a no-op. Further, sas-mode now also works in + simple terminals. - * ESS[JAGS]: now requires JAGS 1.0 (see the new ESS for JAGS - help section for more information): both need work; - suggestions welcome + * Rterm/Cygwin combination works under Microsoft Windows. - * ESS[R]: [TAB] completion now uses the R-internal completion - mechanism (for R >= 2.5.0). + * ESS[R]: internal calls use baseenv() instead of NULL and define + 'baseenv' where needed. - * ESS[R] ([S]): interpretation of "_" as assignment has been - removed in `ess-continued-statement-p' for R and S. + * New experimental support for installing ESS. See the file + `lisp/ess-install.el'. - * several internal code cleanups. + Changes/New Features in 5.2.11: + * ESS Info entry and `dir' handled more effectively for GNU Emacs + users - * ESS[R]: An experimental version of a new command `Rgui' on MS - Windows to send lines directly from emacs to `Rgui' is - available in file `lisp/essd-rgui.el'. Preliminary - documentation is in file `doc/rgui-doc.txt'. - - Changes/New Features in 5.3.6: - * ESS: for XEmacs, using "gnuclient" (without a "-q") works for - things like fix() after M-x gnuserv-start has been done. - - * ESS[R]: M-x R-newest should now work in more situations on MS - Windows, e.g., when R has been installed in a non-default - "ProgramFiles" directory tree. In these cases, there's no - need to specify the name (and full path) of the R program - anymore. + * ESS[SAS]: temporary files created for batch submission of a region + are now named based on the current file; see `ess-sas-file-root' + for details; all `lag' and `dif' functions now fontified correctly + + * iESS[SAS]: fixed a few nagging bugs, however, still does not + appear to work at this time; please let us know if you have any + ideas. + + * ESS[S]: Support for running other versions of Splus has been added + for unix. Two new variables, `ess-s-versions' and + `ess-s-versions-list', are used to tell ESS what other versions of + Splus you would like to run. + + Changes/New Features in 5.2.10: + * ESS[R]: ess-r-versions can no longer be customized (since the + customization was not taking effect unless customizations were + loaded before ESS). Its value has been changed so that it will + also find R executables beginning "R-devel" and "R-patched". If + you wish to change this variable, it must be set in your `.emacs' + before ESS is loaded. - * ESS[R]: For XEmacs, startup (with new tooltip code) works - again. - - Changes/New Features in 5.3.5: - * ESS[R] a new defun is available, `M-x R-newest', which will - start the newest version of R that it can find on your system. - - * ESS[R] add Sven Hartenstein's "R function arguments tips" - functionality, via new file `../lisp/essd-r-args.el'. Note - that this includes an "electric "("" behavior inside `R-mode' - which is _active by default_ and can be customized via - `ess-r-args-electric-paren'; i.e., use `(setq - ess-r-args-electric-paren nil)' to turn it off. Further, - `ess-r-args-show-as' allows to switch to the "tooltip" mode. - - * ESS: functions `ess-get-pdf-viewer' and *-ps-viewer; built on - new customizable variables `ess-pdf-viewer-pref' and - `ess-ps-viewer-pref'; currently used in `ess-swv-PDF' and - `*-PS'. - - * ESS[R] Improved `ess-swv-PDF' to run pdf viewer only if - pdflatex was ok - - * ESS[R] Improved `ess-swv-weave' to start R automatically if - none is running. - - * ESS: Do no longer ask _which_ ESS process to use if there is - only one. - - Changes/New Features in 5.3.4: - * ESS[R] now better work with options(error=recover); and the - new default of CHM help files on windows. - - * ESS[R] some more cleanup in the "sweave" functions - - * miscellaneous fixes - - Changes/New Features in 5.3.3: - * ESS[S] fix buglet (5.3.2 only) which left command prompt in - "execute buffer" and hence help files. - - * new customizable variable `ess-display-buffer-reuse-frames' - set to true (which changes default behavior) such that - execution or help *frames* are reused. - - Changes/New Features in 5.3.2: - * Classic BUGS now supported by `(require 'essd-bugs)' with - ESS[BUGS] and JAGS by `(require 'essd-jags)' with - ESS[JAGS]. But, only one of them can be used at a time - since they don't play nice together. Also, `C-c C-c' - is now bound to the function `ess-bugs-next-action' - (`F12' has been retired). And finally, note that - `essl-bug.el' is deprecated and the replacement is - `essl-bugs.el'. - - * ESS[R] Improved some of the "Sweave-make" functions (yet - scarcely documented) in `ess-swv.el'. - - * ESS[S] No longer mess with .Last.value (nor in other - "languages"). - - Changes/New Features in 5.3.1: - * See the docs for 2 ways to install ESS for XEmacs - 1. by uncommenting the XEmacs part of Section 1 - of `Makeconf' and performing `make install' - - 2. by unpacking either `ess-5.3.1.tgz' or - `ess-5.3.1.zip' into - `PREFIX/lib/xemacs/site-packages' on unix or - `PREFIX\XEmacs\site-packages' on windows - - * ESS[R]: fixed bugs so that Rterm.exe can be found by XEmacs - - * ESS[S]: `ess-toggle-S-assign-key' is slightly changed; in - particular, the default `ess-assign-key' is now `C-x ='. - - * ESS[R]: `M-x R-site-search' is a new (slightly experimental) - utility similar to R's `RSiteSearch(..)' but with the - advantage of using Emacs' preferred browser, see - `browse-url-browser-function' - - Changes/New Features in 5.3.0: - * ESS[BUGS]: sanely re-format statistical output, `.bog', from - scientific notation to numbers rounded with 4 decimal places - with `M-x ess-bugs-sci-round-to-4-dp'. - - * The keys for navigating among section headings in help buffers - worked, but only for one language per session; they should - now work for multiple languages. (They were also broken on - Windows machines.) - - * ESS[S] long standing buglets in the internal logic for loading - lisp code on Windows. Particularly fixed behavior in help - mode with S-plus GUI. - - * New variable, `ess-use-inferior-program-name-in-buffer-name', - which enables using the executable name instead of the - dialect name for R. Feature request. - - * ESS[S] `ess-execute-screen-options' now also works correctly - when there is more than one window *side-by-side* in the same - frame and runs in the correct buffer also when there is more - than one S buffer. - - * iESS[S] new functions `ess-eval-paragraph-and-step' and - `ess-eval-function-or-paragraph-and-step' are bound to keys - `C-c C-p' and `C-c C-c' respectively and to the menu in - ESS-mode; also bound in the help mode (for evaluating - examples). - - * ESS[S] new function `ess-toggle-S-assign-key' allows to - assign the " <- " insertion to an arbitrary key. - - - Changes/New Features in 5.2.12: - * ESS[SAS]: `M-;' fixed, but the XEmacs function `comment-dwim' - may be broken, if so, use `M-x comment-region' and `M-x - uncomment-region' instead; only valid PROCs are fontified - which is very helpful finding syntax errors (currently - supported: BASE, ETS, FSP, GRAPH, IML, INSIGHT and STAT); the - "feature" where `F'-keys take you to an empty buffer when the - requested destination is a file that does not exist has been - fixed, now the request results in a no-op. Further, sas-mode - now also works in simple terminals. - - * Rterm/Cygwin combination works under Microsoft Windows. - - * ESS[R]: internal calls use baseenv() instead of NULL and - define 'baseenv' where needed. - - * New experimental support for installing ESS. See the file - `lisp/ess-install.el'. - - Changes/New Features in 5.2.11: - * ESS Info entry and `dir' handled more effectively for GNU - Emacs users - - * ESS[SAS]: temporary files created for batch submission of a - region are now named based on the current file; see - `ess-sas-file-root' for details; all `lag' and `dif' - functions now fontified correctly - - * iESS[SAS]: fixed a few nagging bugs, however, still does not - appear to work at this time; please let us know if you have - any ideas. - - * ESS[S]: Support for running other versions of Splus has been - added for unix. Two new variables, `ess-s-versions' and - `ess-s-versions-list', are used to tell ESS what other - versions of Splus you would like to run. - - Changes/New Features in 5.2.10: - * ESS[R]: ess-r-versions can no longer be customized (since the - customization was not taking effect unless customizations - were loaded before ESS). Its value has been changed so that - it will also find R executables beginning "R-devel" and - "R-patched". If you wish to change this variable, it must be - set in your `.emacs' before ESS is loaded. - - * Installation with GNU Make enhanced: unix and unix-like - operating systems will now be able to install ESS for all - users in either a GNU Emacs site-lisp or an XEmacs package - configuration by editing `lisp/ess-site.el' and `Makeconf' - accordingly, then issuing `make install' - - * ESS[S]: Filename completion (inside strings) now also works in - XEmacs for R and S-plus. - - Changes/New Features in 5.2.9: - * ESS[R] for Windows: the \ directory character bug with - respect to ess-load-file has been eradicated. - - * iESS[SAS]: `C-c C-r' and `C-c C-b' once again work as - intended and documented. - - * ESS[S]: M-x ess-fix-EQ-assign is a bit more agressive. - - * ESS[S]: Imenu now also shows setAs(), etc. - - * ESS[R]: R function pattern enhanced with underlying code such - that `M-C-a' (`ess-beginning-of-function') etc now work for - many more cases, including S4 method definitions. - - * iESS[R]: myOwnhelp(1) no longer wrongly triggers help(1). - - * ESS[R]: Improved detection of bogus help buffers: valid help - buffers containing with the string "no documentation"(e.g. - contour) were being treated as bogus. - - * ESS[R]: In R help buffers, if - `options("help.try.all.packages" = TRUE)' then `?rlm' will - list which packages rlm is defined in. This help buffer is - not bogus, but instead is now relabelled "*help[R](rlm in - packages)*". - - * ESS[STA]: add "//" as comment starting character to - syntax-table. - - Changes/New Features in 5.2.8: - * iESS: [Tab] completes *file* names "inside string" as in - earlier (<= 5.2.3) ESS versions. - - Changes/New Features in 5.2.7: - * If you use Custom to change the variable ess-toolbar-items, - the new toolbar is used in all subsequent ESS buffers. - - * ESS[SAS]: new feature: if ess-sas-log-max >0 and your .log - grows to more than ess-sas-log-max bytes, just the first - ess-sas-log-max bytes are refreshed; this is helpful when - your .sas program generates lots of error messages and gets - too big for emacs to display - - * ESS[R/S]: `M-;' in R/S editing modes will now indent with - either one or two hashes depending on context. - - * ESS[R]: David Whiting's Sweave extensions (to 'noweb') are - now available (from ess-swv.el loaded by default). - - Changes/New Features in 5.2.6: - * Removed non-ASCII characters in a few files. - - * ESS[R]: now works better when UTF-8 locale is active; in - particular, you get correct directional quotes in R's startup - message for R-devel (unstable development version of R - 2.1.0) when using environment variables LANGUAGE=en@quot - LC_ALL=en_US.UTF-8 - - * ESS[SAS]: toggling of .log mode improved (`F10'); toggling of - .lst mode now also available (`C-F10'); killing all buffers - associated with .sas program no longer bound to `C-F10' since - its a bit overzealous. - - * S-Plus 7 for Windows is now recognized. - - * ESS[S] (incl. R): in auto-fill mode, strings are not wrapped - anymore. - - * ESS[S] (incl. R): font-lock now correctly differs between R - and S, e.g., for "_"; both now fontify warning(.) and S does - terminate() additionally. - - * Support for `bell' aka `beep' aka `ding' aka `alarm' in all - inferior modes: When \a is output "to the the console" at the - beginning of a line, the bell is rung. - - Changes/New Features in 5.2.5: - * ESS[R]: `C-c C-q' or `Quit S' from the menu now should work - (again and less klunkily) and do not append `-exited' to the - buffer name. Further, the behavior of `(ess-cleanup)', - called from ess-quit, now depends on the new customizable - variable `ess-S-quit-kill-buffers-p' which defaults to `nil'. - Consequently, the question _"Delete all buffers associated - with ..?"_ will not be asked anymore by default. - - * ESS[SAS] - ess-ebcdic-to-ascii-search-and-replace will now - work with the `recode' application as well which is available - on many platforms - - * ESS[S] (incl. R): Name completion for slots of S4 objects now - works! - - Changes/New Features in 5.2.4: - * The documentation now includes an overview of how to use the - emacs TAGS facility for S functions. (The distribution also - used to contain a directory `etc/other/Tags' where a ~1990 - version of `etags.c' was distributed; this is no longer - relevant and so has been deleted.) - - * ESS[SAS] - When you are working with EBCDIC files on an ASCII - platform, .log NOTEs may display as gibberish since the EBCDIC - characters are not converted to ASCII prior to their display. - So, the function ess-ebcdic-to-ascii-search-and-replace is - provided for convenience and is bound to `C-F11'. This - function requires the `dd' command (only available on unix or - unix-like platforms). - - * ESS: Completion of object names is now always done - dynamically rather than allowing the option of using a - pre-computed database (by `ess-create-object-name-db') since - modern computers seem fast enough for dynamic completion. - (We expect few users, if any, have been using the - pre-computed database method.) - - * ESS: object completion in iESS buffers running on Windows was - very slow (for GNU Emacs, but not XEmacs) and has now been - fixed. Further, it was more or less broken for all versions - of S-plus 6.x, and has been fixed to work everywhere but with - the Windows' GUI of S-plus. The list of objects now shows - unique names also when an object appears more than once in - the search path. - - * ESS[R]: Completion of object names now also includes those - starting with ".". - - Changes/New Features in 5.2.3: - * ESS: When new inferior ESS processes are created, by default - they will replace the current buffer (this restores behavior - from pre 5.2.0). If you wish new ESS processes to start in - another window of the current frame, set - inferior-ess-same-window to nil. - - * New variables inferior-Splus-args and inferior-R-args provide - a way to pass command line arguments to starting S and R - processes. - - Changes/New Features in 5.2.2: - * bug-fixes for 5.2.1 (require 'executable), html docs, etc. - - * ess-lisp-directory/../doc/info added to Info-directory-list - if ess-info not found by info - - * ESS[R]: If you have other versions of R on your exec-path, - such as "R-1.8.1" with Unix or "rw1081" with Windows, ESS - will find them and create appropriate functions, such as `M-x - R-1.8.1' or `M-x rw1081', for calling them. By default only - Unix programs beginning "R-1" and "R-2" and Windows programs - parallel to the version of R in your exec-path will be found, - but see ess-r-versions and ess-rterm-versions for ways to - find other versions of R. - - * ESS[R]: Other versions of R, such as "R-1.8.1" on Unix and - "rw1081" on Windows, are added to the "ESS / Start Process / - Other" menu. - - * ESS[S]: If you have other versions of S-Plus on your Windows - computer, such as S-Plus 6.1 or S-Plus 4.5, ESS will find - them and create appropriate functions, such as `M-x splus61', - for calling the console version (Sqpe) inside an emacs - buffer. By default only programs installed in the default - location will be found, but see ess-SHOME-versions for ways - to find other versions of S-Plus. - - * ESS[S]: Other versions of Sqpe on Windows, such as "splus61", - are added to the "ESS / Start Process / Other" menu. - - * ESS[R]: (bug fix) ess-quit (bound to `C-c C-q') should now - quit the inferior R process, when issued from either the - inferior buffer, or from a .R buffer. - - Changes/New Features in 5.2.1: - * ESS[S] (R and S-plus): now have toolbar support with icons to - evaluate code in the inferior process or to switch there. - This code is experimental and likely to change as XEmacs/Emacs - issues get resolved. The toolbar should be enabled if your - Emacs displays images, but can be disabled with the variable - ess-use-toolbar. Thanks to David Smith from Insightful for - the S-plus logo. - - * ESS[SAS]: ess-sas-graph-view (`F12') enhanced; you can specify - external file viewers for each graphics file type via the - alist ess-sas-graph-view-viewer-alist; also .jpg/.gif are now - handled by image-mode on XEmacs, if available, otherwise by - graphics primitives as before - - Changes/New Features in 5.2.0: - * ESS[BUGS]: new info documentation! now supports interactive - processing thanks to Aki Vehtari (mailto:Aki.Vehtari@hut.fi); - new architecture-independent unix support as well as support - for BUGS v. 0.5 - - * ESS[SAS]: convert .log to .sas with ess-sas-transcript; info - documentation improved; Local Variable bug fixes; SAS/IML - statements/functions now highlighted; files edited remotely - by ange-ftp/EFS/tramp are recognized and pressing SUBMIT - opens a buffer on the remote host via the local variable - ess-sas-shell-buffer-remote-init which defaults to "ssh"; - changed the definition of the variable - ess-sas-edit-keys-toggle to boolean rather than 0/1; added - the function ess-electric-run-semicolon which automatically - reverse indents lines containing only "run;"; `C-F1' creates - MS RTF portrait from the current buffer; `C-F2' creates MS - RTF landscape from the current buffer; `C-F9' opens a SAS - DATASET with PROC INSIGHT rather than PROC FSVIEW; "inferior" - aliases for SAS batch: `C-c C-r' for submit region, `C-c - C-b' for submit buffer, `C-c C-x' for goto .log; `C-c C-y' - for goto .lst - - * ESS[S]: Pressing underscore ("_") once inserts " <- " (as - before); pressing underscore twice inserts a literal - underscore. To stop this smart behaviour, add - "(ess-toggle-underscore nil)" to your .emacs after ess-site - has been loaded; ess-dump-filename-template-proto (new name!) - now can be customized successfully (for S language dialects); - Support for Imenu has been improved; set ess-imenu-use-S to - non-nil to get an "Imenu-S" item on your menubar; ess-help: - Now using nice underlines (instead of `nuke-* ^H_') - - * ESS[R]: After (require 'essa-r), `M-x ess-r-var' allows to - load numbers from any Emacs buffer into an existing *R* - process; `M-x ess-rdired' gives a "directory editor" of R - objects; fixed ess-retr-lastvalue-command, i.e. .Last.value - bug (thanks to David Brahm) - - * ESS: Support for creating new window frames has been added to - ESS. Inferior ESS processes can be created in dedicated - frames by setting inferior-ess-own-frame to t. ESS help - buffers can also open in new frames; see the documentation - for ess-help-own-frame for details. (Thanks to Kevin Rodgers - for contributing code.) - - Changes/New Features in 5.1.24: - * The version number is now correct even inside ESS/Emacs - - Changes/New Features in 5.1.23: - * Minor more Makefile clean up. - - Changes/New Features in 5.1.22: - * Besides info documentation, PDF and HTML documentation are - also provided (instead of built using "make") and available - on the web as well; see ESS web page - (http://ess.r-project.org/) and StatLib - (http://lib.stat.cmu.edu/general/ESS/doc) - - * Now that info documentation is available, the README.* files - are no longer supported. However, they are still distributed - for what it's worth. - - * ESS is now an XEmacs package! See XEmacs Installation HOWTO - (http://www.xemacs.org/Install/index.html) for details - (specifically, items 10-15). - - * ESS[SAS]: more user-friendly enhancements for remote SAS - batch jobs with Kermit file transfers (LOG and OUTPUT - function key features now supported). Multiple shells now - supported so you can run SAS on different computers from - different buffers by setting the buffer-local variable - ess-sas-shell-buffer to unique buffer names. - - * Major re-vamping of Makefile/Makeconf. - - Changes/New Features in 5.1.21: - * ESS[SAS]: info documentation now available!, see ESS->Help - for SAS; `F12' opens GSASFILE nearest point for viewing - either within emacs, when available, or via an external - viewer; more syntax highlighting keywords; more enhancements - for remote SAS batch jobs with Kermit; new framework for - remote SAS interactive jobs, see ess-remote - - * ESS[S]: info documentation now available!, see ESS->Help for - the S family - - * Makefile: tag now independent of rel; info files made by - doc/Makefile and installed in new info sub-directory - - Changes/New Features in 5.1.20: - * New `options()$STERM' in the S dialects (S, S-Plus, R). The - S program can determine the environment in which it is - currently running. ESS sets the option to `iESS' or `ddeESS' - when it starts an S language process. We recommend other - specific values for S language processes that ESS does not - start. - - * New `ess-mouse-me' function, assigned to S-mouse-3 by default. - User may click on a word or region and then choose from the - menu to display the item, or a summary, or a plot, etc. This - feature is still under development. - - * GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & - BUGS), (some from Stephen Eglen). - - * XEmacs 21.x is now supported (fixed w32-using-nt bug) - - * XEmacs on Win (NT) is better supported. - - * Workaround for bug in Sqpe+6 (S-PLUS 6 for Win). - - * should now work even when imenu is not available (for old - XEmacsen). - - * ESS[SAS]: XEmacs-Imenu fix; `C-TAB' is globalized along with - your function-key definitions, if specified; you can specify - your SAS library definitions outside of autoexec.sas for - ess-sas-data-view with SAS code placed in the variable - ess-sas-data-view-libname, also the dataset name is defaulted - to the nearest permanent dataset to point; Speedbar support - now works for permanent datasets, please ignore first./last.; - new font-locking is now the default with more improvements - for font-locking PROCs, macro statements, * ; and %* ; - comments; you can toggle sas-log-mode with `F10' which will - font-lock your .log (if it isn't too big); submit remote .sas - files accessed with ange-ftp, EFS or Tramp (Kermit is - experimental) by setting ess-sas-submit-method to 'sh; - ess-sas-submit-command and ess-sas-submit-command-options are - buffer-local so you can have local file variable sections at - the end of your .sas files to request different executables - or specify special options and the local file variables are - re-read at submit instead of only at file open so that if you - make a change it is picked up immediately; - - * ESS[BUGS]: font-lock with `in' fixed. - - * for STATA: font-lock bug fixed. + * Installation with GNU Make enhanced: unix and unix-like operating + systems will now be able to install ESS for all users in either a + GNU Emacs site-lisp or an XEmacs package configuration by editing + `lisp/ess-site.el' and `Makeconf' accordingly, then issuing `make + install' + + * ESS[S]: Filename completion (inside strings) now also works in + XEmacs for R and S-plus. + + Changes/New Features in 5.2.9: + * ESS[R] for Windows: the \ directory character bug with respect to + ess-load-file has been eradicated. + + * iESS[SAS]: `C-c C-r' and `C-c C-b' once again work as intended and + documented. + + * ESS[S]: M-x ess-fix-EQ-assign is a bit more agressive. + + * ESS[S]: Imenu now also shows setAs(), etc. + + * ESS[R]: R function pattern enhanced with underlying code such that + `M-C-a' (`ess-beginning-of-function') etc now work for many more + cases, including S4 method definitions. + + * iESS[R]: myOwnhelp(1) no longer wrongly triggers help(1). + + * ESS[R]: Improved detection of bogus help buffers: valid help + buffers containing with the string "no documentation"(e.g. contour) + were being treated as bogus. + + * ESS[R]: In R help buffers, if `options("help.try.all.packages" = + TRUE)' then `?rlm' will list which packages rlm is defined in. + This help buffer is not bogus, but instead is now relabelled + "*help[R](rlm in packages)*". + + * ESS[STA]: add "//" as comment starting character to syntax-table. + + Changes/New Features in 5.2.8: + * iESS: [Tab] completes *file* names "inside string" as in earlier + (<= 5.2.3) ESS versions. + + Changes/New Features in 5.2.7: + * If you use Custom to change the variable ess-toolbar-items, the + new toolbar is used in all subsequent ESS buffers. + + * ESS[SAS]: new feature: if ess-sas-log-max >0 and your .log grows + to more than ess-sas-log-max bytes, just the first ess-sas-log-max + bytes are refreshed; this is helpful when your .sas program + generates lots of error messages and gets too big for emacs to + display + + * ESS[R/S]: `M-;' in R/S editing modes will now indent with either + one or two hashes depending on context. + + * ESS[R]: David Whiting's Sweave extensions (to 'noweb') are now + available (from ess-swv.el loaded by default). + + Changes/New Features in 5.2.6: + * Removed non-ASCII characters in a few files. + + * ESS[R]: now works better when UTF-8 locale is active; in + particular, you get correct directional quotes in R's startup + message for R-devel (unstable development version of R 2.1.0) + when using environment variables LANGUAGE=en@quot + LC_ALL=en_US.UTF-8 + + * ESS[SAS]: toggling of .log mode improved (`F10'); toggling of .lst + mode now also available (`C-F10'); killing all buffers associated + with .sas program no longer bound to `C-F10' since its a bit + overzealous. + + * S-Plus 7 for Windows is now recognized. + + * ESS[S] (incl. R): in auto-fill mode, strings are not wrapped + anymore. + + * ESS[S] (incl. R): font-lock now correctly differs between R and S, + e.g., for "_"; both now fontify warning(.) and S does terminate() + additionally. + + * Support for `bell' aka `beep' aka `ding' aka `alarm' in all + inferior modes: When \a is output "to the the console" at the + beginning of a line, the bell is rung. + + Changes/New Features in 5.2.5: + * ESS[R]: `C-c C-q' or `Quit S' from the menu now should work (again + and less klunkily) and do not append `-exited' to the buffer name. + Further, the behavior of `(ess-cleanup)', called from ess-quit, + now depends on the new customizable variable + `ess-S-quit-kill-buffers-p' which defaults to `nil'. + Consequently, the question _"Delete all buffers associated with + ..?"_ will not be asked anymore by default. + + * ESS[SAS] - ess-ebcdic-to-ascii-search-and-replace will now work + with the `recode' application as well which is available on many + platforms + + * ESS[S] (incl. R): Name completion for slots of S4 objects now + works! + + Changes/New Features in 5.2.4: + * The documentation now includes an overview of how to use the emacs + TAGS facility for S functions. (The distribution also used to + contain a directory `etc/other/Tags' where a ~1990 version of + `etags.c' was distributed; this is no longer relevant and so has + been deleted.) + + * ESS[SAS] - When you are working with EBCDIC files on an ASCII + platform, .log NOTEs may display as gibberish since the EBCDIC + characters are not converted to ASCII prior to their display. So, + the function ess-ebcdic-to-ascii-search-and-replace is provided for + convenience and is bound to `C-F11'. This function requires the + `dd' command (only available on unix or unix-like platforms). + + * ESS: Completion of object names is now always done dynamically + rather than allowing the option of using a pre-computed database + (by `ess-create-object-name-db') since modern computers seem fast + enough for dynamic completion. (We expect few users, if any, have + been using the pre-computed database method.) + + * ESS: object completion in iESS buffers running on Windows was very + slow (for GNU Emacs, but not XEmacs) and has now been fixed. + Further, it was more or less broken for all versions of S-plus 6.x, + and has been fixed to work everywhere but with the Windows' GUI of + S-plus. The list of objects now shows unique names also when an + object appears more than once in the search path. + + * ESS[R]: Completion of object names now also includes those + starting with ".". + + Changes/New Features in 5.2.3: + * ESS: When new inferior ESS processes are created, by default they + will replace the current buffer (this restores behavior from pre + 5.2.0). If you wish new ESS processes to start in another window + of the current frame, set inferior-ess-same-window to nil. + + * New variables inferior-Splus-args and inferior-R-args provide a + way to pass command line arguments to starting S and R processes. + + Changes/New Features in 5.2.2: + * bug-fixes for 5.2.1 (require 'executable), html docs, etc. + + * ess-lisp-directory/../doc/info added to Info-directory-list if + ess-info not found by info + + * ESS[R]: If you have other versions of R on your exec-path, such as + "R-1.8.1" with Unix or "rw1081" with Windows, ESS will find them + and create appropriate functions, such as `M-x R-1.8.1' or `M-x + rw1081', for calling them. By default only Unix programs + beginning "R-1" and "R-2" and Windows programs parallel to the + version of R in your exec-path will be found, but see + ess-r-versions and ess-rterm-versions for ways to find other + versions of R. + + * ESS[R]: Other versions of R, such as "R-1.8.1" on Unix and + "rw1081" on Windows, are added to the "ESS / Start Process / + Other" menu. + + * ESS[S]: If you have other versions of S-Plus on your Windows + computer, such as S-Plus 6.1 or S-Plus 4.5, ESS will find them and + create appropriate functions, such as `M-x splus61', for calling + the console version (Sqpe) inside an emacs buffer. By default only + programs installed in the default location will be found, but see + ess-SHOME-versions for ways to find other versions of S-Plus. + + * ESS[S]: Other versions of Sqpe on Windows, such as "splus61", are + added to the "ESS / Start Process / Other" menu. + + * ESS[R]: (bug fix) ess-quit (bound to `C-c C-q') should now quit the + inferior R process, when issued from either the inferior buffer, + or from a .R buffer. + + Changes/New Features in 5.2.1: + * ESS[S] (R and S-plus): now have toolbar support with icons to + evaluate code in the inferior process or to switch there. This + code is experimental and likely to change as XEmacs/Emacs issues + get resolved. The toolbar should be enabled if your Emacs displays + images, but can be disabled with the variable ess-use-toolbar. + Thanks to David Smith from Insightful for the S-plus logo. + + * ESS[SAS]: ess-sas-graph-view (`F12') enhanced; you can specify + external file viewers for each graphics file type via the alist + ess-sas-graph-view-viewer-alist; also .jpg/.gif are now handled by + image-mode on XEmacs, if available, otherwise by graphics + primitives as before + + Changes/New Features in 5.2.0: + * ESS[BUGS]: new info documentation! now supports interactive + processing thanks to Aki Vehtari (mailto:Aki.Vehtari@hut.fi); new + architecture-independent unix support as well as support for BUGS + v. 0.5 + + * ESS[SAS]: convert .log to .sas with ess-sas-transcript; info + documentation improved; Local Variable bug fixes; SAS/IML + statements/functions now highlighted; files edited remotely by + ange-ftp/EFS/tramp are recognized and pressing SUBMIT opens a + buffer on the remote host via the local variable + ess-sas-shell-buffer-remote-init which defaults to "ssh"; changed + the definition of the variable ess-sas-edit-keys-toggle to boolean + rather than 0/1; added the function ess-electric-run-semicolon + which automatically reverse indents lines containing only "run;"; + `C-F1' creates MS RTF portrait from the current buffer; `C-F2' + creates MS RTF landscape from the current buffer; `C-F9' opens a + SAS DATASET with PROC INSIGHT rather than PROC FSVIEW; "inferior" + aliases for SAS batch: `C-c C-r' for submit region, `C-c C-b' for + submit buffer, `C-c C-x' for goto .log; `C-c C-y' for goto .lst + + * ESS[S]: Pressing underscore ("_") once inserts " <- " (as before); + pressing underscore twice inserts a literal underscore. To stop + this smart behaviour, add "(ess-toggle-underscore nil)" to your + .emacs after ess-site has been loaded; + ess-dump-filename-template-proto (new name!) now can be customized + successfully (for S language dialects); Support for Imenu has been + improved; set ess-imenu-use-S to non-nil to get an "Imenu-S" item + on your menubar; ess-help: Now using nice underlines (instead of + `nuke-* ^H_') + + * ESS[R]: After (require 'essa-r), `M-x ess-r-var' allows to load + numbers from any Emacs buffer into an existing *R* process; `M-x + ess-rdired' gives a "directory editor" of R objects; fixed + ess-retr-lastvalue-command, i.e. .Last.value bug (thanks to David + Brahm) + + * ESS: Support for creating new window frames has been added to ESS. + Inferior ESS processes can be created in dedicated frames by + setting inferior-ess-own-frame to t. ESS help buffers can also + open in new frames; see the documentation for ess-help-own-frame + for details. (Thanks to Kevin Rodgers for contributing code.) + + Changes/New Features in 5.1.24: + * The version number is now correct even inside ESS/Emacs + + Changes/New Features in 5.1.23: + * Minor more Makefile clean up. + + Changes/New Features in 5.1.22: + * Besides info documentation, PDF and HTML documentation are also + provided (instead of built using "make") and available on the web + as well; see ESS web page (http://ess.r-project.org/) and StatLib + (http://lib.stat.cmu.edu/general/ESS/doc) + + * Now that info documentation is available, the README.* files are + no longer supported. However, they are still distributed for what + it's worth. + + * ESS is now an XEmacs package! See XEmacs Installation HOWTO + (http://www.xemacs.org/Install/index.html) for details + (specifically, items 10-15). + + * ESS[SAS]: more user-friendly enhancements for remote SAS batch + jobs with Kermit file transfers (LOG and OUTPUT function key + features now supported). Multiple shells now supported so you can + run SAS on different computers from different buffers by setting + the buffer-local variable ess-sas-shell-buffer to unique buffer + names. + + * Major re-vamping of Makefile/Makeconf. + + Changes/New Features in 5.1.21: + * ESS[SAS]: info documentation now available!, see ESS->Help for + SAS; `F12' opens GSASFILE nearest point for viewing either within + emacs, when available, or via an external viewer; more syntax + highlighting keywords; more enhancements for remote SAS batch jobs + with Kermit; new framework for remote SAS interactive jobs, see + ess-remote + + * ESS[S]: info documentation now available!, see ESS->Help for the S + family + + * Makefile: tag now independent of rel; info files made by + doc/Makefile and installed in new info sub-directory + + Changes/New Features in 5.1.20: + * New `options()$STERM' in the S dialects (S, S-Plus, R). The S + program can determine the environment in which it is currently + running. ESS sets the option to `iESS' or `ddeESS' when it starts + an S language process. We recommend other specific values for S + language processes that ESS does not start. + + * New `ess-mouse-me' function, assigned to S-mouse-3 by default. + User may click on a word or region and then choose from the menu + to display the item, or a summary, or a plot, etc. This feature + is still under development. + + * GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & BUGS), + (some from Stephen Eglen). + + * XEmacs 21.x is now supported (fixed w32-using-nt bug) + + * XEmacs on Win (NT) is better supported. + + * Workaround for bug in Sqpe+6 (S-PLUS 6 for Win). + + * should now work even when imenu is not available (for old + XEmacsen). + + * ESS[SAS]: XEmacs-Imenu fix; `C-TAB' is globalized along with your + function-key definitions, if specified; you can specify your SAS + library definitions outside of autoexec.sas for ess-sas-data-view + with SAS code placed in the variable ess-sas-data-view-libname, + also the dataset name is defaulted to the nearest permanent dataset + to point; Speedbar support now works for permanent datasets, please + ignore first./last.; new font-locking is now the default with more + improvements for font-locking PROCs, macro statements, * ; and %* ; + comments; you can toggle sas-log-mode with `F10' which will + font-lock your .log (if it isn't too big); submit remote .sas + files accessed with ange-ftp, EFS or Tramp (Kermit is + experimental) by setting ess-sas-submit-method to 'sh; + ess-sas-submit-command and ess-sas-submit-command-options are + buffer-local so you can have local file variable sections at the + end of your .sas files to request different executables or specify + special options and the local file variables are re-read at submit + instead of only at file open so that if you make a change it is + picked up immediately; - * for Rd mode: `C-c C-v' and `switch-process' in menu. - further, `C-c C-f' prefix (Rd-font) for inserting or - surrounding a word by things such as \code{.}, - \code{\link{.}}, \emph{.} etc. + * ESS[BUGS]: font-lock with `in' fixed. - * new functions (ess-directory-function) and - (ess-narrow-to-defun) ess-directory <-> default-directory - logic (Jeff Mincy). + * for STATA: font-lock bug fixed. - * Re-organized Makefile and fixed a few bugs. + * for Rd mode: `C-c C-v' and `switch-process' in menu. further, + `C-c C-f' prefix (Rd-font) for inserting or surrounding a word by + things such as \code{.}, \code{\link{.}}, \emph{.} etc. - Changes/New Features in 5.1.19: - * S+6 now supported (Tony Rossini (Unix) and Rich Heiberger - (Windows)) + * new functions (ess-directory-function) and (ess-narrow-to-defun) + ess-directory <-> default-directory logic (Jeff Mincy). - * New BUGS support through ESS[BUGS] mode (Rodney Sparapani) - Templates assist you in writing .bug and .cmd code (.cmd and - .log are replaced by .bmd and .bog to avoid emacs extension - collisions). Substitution" parameters facilitate "automagic" - generation of data...in" and "init...in" filenames, "const - N=" from your data file and "monitor()/stats()" commands. - Activated by pressing `F12'. + * Re-organized Makefile and fixed a few bugs. - * Fixes for `ess-smart-underscore' SAS breakage (Rich Heiberger) + Changes/New Features in 5.1.19: + * S+6 now supported (Tony Rossini (Unix) and Rich Heiberger + (Windows)) - * You can change between PC and Unix, local and global SAS - function-key definitions interactively (Rich Heiberger) + * New BUGS support through ESS[BUGS] mode (Rodney Sparapani) + Templates assist you in writing .bug and .cmd code (.cmd and .log + are replaced by .bmd and .bog to avoid emacs extension collisions). + Substitution" parameters facilitate "automagic" generation of + data...in" and "init...in" filenames, "const N=" from your data + file and "monitor()/stats()" commands. Activated by pressing + `F12'. - * `C-Submit' a highlighted region to SAS batch (Rodney - Sparapani) + * Fixes for `ess-smart-underscore' SAS breakage (Rich Heiberger) - * New and improved SAS syntax highlighting (Rodney Sparapani) - To get the new functionality, set ess-sas-run-make-regexp to - nil. Also available in .log files via `F10'. + * You can change between PC and Unix, local and global SAS + function-key definitions interactively (Rich Heiberger) - * Open a permanent SAS dataset for viewing via `F9' (Rodney - Sparapani) You must have the library defined in autoexec.sas - for it to work. + * `C-Submit' a highlighted region to SAS batch (Rodney Sparapani) - * User-friendly defaults for `sas-program', - `ess-sas-batch-pre-command' and `ess-sas-batch-post-command' - as well Customize support for these and other ESS[SAS] - variables (Rodney Sparapani) + * New and improved SAS syntax highlighting (Rodney Sparapani) To get + the new functionality, set ess-sas-run-make-regexp to nil. Also + available in .log files via `F10'. - * `ess-sas-suffix-2' now defaults to .dat via `F11' (Rodney - Sparapani) + * Open a permanent SAS dataset for viewing via `F9' (Rodney + Sparapani) You must have the library defined in autoexec.sas for + it to work. - * Emacs/XEmacs, Unix/Windows issues collectively handled in - ess-emcs.el + * User-friendly defaults for `sas-program', + `ess-sas-batch-pre-command' and `ess-sas-batch-post-command' as + well Customize support for these and other ESS[SAS] variables + (Rodney Sparapani) - * defadvice solves problem of missing *ESS* (thanks to Jeff - Mincy) + * `ess-sas-suffix-2' now defaults to .dat via `F11' (Rodney + Sparapani) - * Improved manual a bit by including things that were only in - `README'. + * Emacs/XEmacs, Unix/Windows issues collectively handled in + ess-emcs.el - Changes/New Features in 5.1.18: - * New `ess-smart-underscore' function, now assigned to "_" by - default. Inserts `ess-S-assign' (customizable " <- "), - unless inside string and comments where plain "_" is used - instead. (MM) + * defadvice solves problem of missing *ESS* (thanks to Jeff Mincy) - * Fixes for longstanding interactive SAS breakage (RMH) + * Improved manual a bit by including things that were only in + `README'. - Changes/New Features in 5.1.17: - * Documentation for Windows Installation (Rich Heiberger) + Changes/New Features in 5.1.18: + * New `ess-smart-underscore' function, now assigned to "_" by + default. Inserts `ess-S-assign' (customizable " <- "), unless + inside string and comments where plain "_" is used instead. (MM) - * removal of ess-vars, finalization of customize support (in the - sense that there is no more use of ess-vars, but that we need - to fix ess-cust) (AJ Rossini) + * Fixes for longstanding interactive SAS breakage (RMH) - * Many small (and large) fixes/contributions (MMaechler) + Changes/New Features in 5.1.17: + * Documentation for Windows Installation (Rich Heiberger) - * addition of the "S-equal" variable and provide `M-x - ess-add-MM-keys' a way to remap "_" to `ess-S-assign', - typically " <- ", but customizable. (MMaechler) + * removal of ess-vars, finalization of customize support (in the + sense that there is no more use of ess-vars, but that we need to + fix ess-cust) (AJ Rossini) - Changes/New Features in 5.1.16: - * BUG FIXES + * Many small (and large) fixes/contributions (MMaechler) - * Better SAS support + * addition of the "S-equal" variable and provide `M-x + ess-add-MM-keys' a way to remap "_" to `ess-S-assign', typically " + <- ", but customizable. (MMaechler) - Changes/New Features in 5.1.15: - * BUG FIXES + Changes/New Features in 5.1.16: + * BUG FIXES - Changes/New Features in 5.1.14: - * Yet more fixes to SAS mode, (Rich Heiberger and Rodney - Sparapani) + * Better SAS support - * Customize support (for most Emacsen which support it) - (AJRossini) + Changes/New Features in 5.1.15: + * BUG FIXES - * ARC and ViSta support out of the box, and fixes for XLispStat - (AJRossini) + Changes/New Features in 5.1.14: + * Yet more fixes to SAS mode, (Rich Heiberger and Rodney Sparapani) - Changes/New Features in 5.1.13: - * Version numbering finally all depending on the ./VERSION file, - thanks to Martin Maechler. + * Customize support (for most Emacsen which support it) (AJRossini) - * Yet more fixes to SAS mode, thanks to Rich Heiberger. + * ARC and ViSta support out of the box, and fixes for XLispStat + (AJRossini) - Changes/New Features in 5.1.12: - * Splus 5.1 stabilized, thanks to Martin Maechler, Bill - Venables, Chuck Taylor, and others. + Changes/New Features in 5.1.13: + * Version numbering finally all depending on the ./VERSION file, + thanks to Martin Maechler. - * More fixes to SAS mode, thanks to Rodney Sparapani and Rich - Heiberger. + * Yet more fixes to SAS mode, thanks to Rich Heiberger. - Changes/New Features in 5.1.11: - * More fixes to Stata mode, thanks to Brendan Halpin - (mailto:brendan@essex.ac.uk). + Changes/New Features in 5.1.12: + * Splus 5.1 stabilized, thanks to Martin Maechler, Bill Venables, + Chuck Taylor, and others. - * fixed bugs in ESS-elsewhere, thanks to many testers + * More fixes to SAS mode, thanks to Rodney Sparapani and Rich + Heiberger. - * README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, - thanks to David Brahm (mailto:brahm@alum.mit.edu). + Changes/New Features in 5.1.11: + * More fixes to Stata mode, thanks to Brendan Halpin + (mailto:brendan@essex.ac.uk). - * Fixes to SAS mode, thanks to Rodney Sparapani + * fixed bugs in ESS-elsewhere, thanks to many testers - Changes/New Features in 5.1.10: - * More fixes to Stata mode + * README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, thanks + to David Brahm (mailto:brahm@alum.mit.edu). - * primitive generic version of ESS-elsewhere + * Fixes to SAS mode, thanks to Rodney Sparapani - * Small fixes to SAS/Stata. + Changes/New Features in 5.1.10: + * More fixes to Stata mode - Changes/New Features in 5.1.9: - * Stata mode works + * primitive generic version of ESS-elsewhere - * Literate Data Analysis using Noweb works + * Small fixes to SAS/Stata. - Changes/New Features in 5.1.8: - * Bug fixes + Changes/New Features in 5.1.9: + * Stata mode works - * R documentation mode defaults changed + * Literate Data Analysis using Noweb works - Changes/New Features in 5.1.2: - * able to use inferior iESS mode to communicate directly with a - running S-Plus 4.x process using the Microsoft DDE protocol. - We use the familiar (from Unix ESS) `C-c C-n' and related key - sequences to send lines from the S-mode file to the inferior - S process. We continue to edit S input files in ESS[S] mode - and transcripts of previous S sessions in ESS Transcript - mode. All three modes know the S language, syntax, and - indentation patterns and provide the syntactic highlighting - that eases the programming tasks. + Changes/New Features in 5.1.8: + * Bug fixes + * R documentation mode defaults changed + + Changes/New Features in 5.1.2: + * able to use inferior iESS mode to communicate directly with a + running S-Plus 4.x process using the Microsoft DDE protocol. We + use the familiar (from Unix ESS) `C-c C-n' and related key + sequences to send lines from the S-mode file to the inferior S + process. We continue to edit S input files in ESS[S] mode and + transcripts of previous S sessions in ESS Transcript mode. All + three modes know the S language, syntax, and indentation patterns + and provide the syntactic highlighting that eases the programming + tasks.  File: ess.info, Node: Credits, Next: Latest version, Prev: New features, Up: Introduction @@ -1102,10 +903,6 @@ for Unix and Windows. * Stephen Eglen (mailto:stephen@gnu.org) - * Sebastian P. Luque (mailto:spluque@gmail.com) - - * Henning Redestig (mailto:henning.red@googlemail.com) -  File: ess.info, Node: Latest version, Next: Manual, Prev: Credits, Up: Introduction @@ -1152,7 +949,7 @@ File: ess.info, Node: Manual, Prev: Latest version, Up: Introduction 1.5 How to read this manual =========================== -If you need to install ESS, read *note Installation:: for details on +If you need to install ESS, read *Note Installation:: for details on what needs to be done before proceeding to the next chapter. In this manual we use the standard notation for describing the @@ -1190,7 +987,7 @@ from the flexible nature of lisp. In particular, many aspects of ESS behaviour can be changed by suitable customization of lisp variables. This manual mentions some of the most frequent variables. A full list of them however is available by using the Custom facility within emacs. -(Type `M-x customize-group RET ess RET' to get started.) *note +(Type `M-x customize-group RET ess RET' to get started.) *Note Customization:: provides details of common user variables you can change to customize ESS to your taste, but it is recommended that you defer this section until you are more familiar with ESS. @@ -1216,89 +1013,54 @@ File: ess.info, Node: Unix installation, Next: Microsoft Windows installation, 2.1 Unix installation ===================== -For a Unix or Unix-like installation, please follow the next steps. -Retrieve the latest tgz file (`ess-VERSION.tgz') from ESS downloads -area (http://ess.r-project.org/index.php?Section=download). - - _GNU Emacs Simple Instructions:_ for recent versions of Emacs (22.x -or higher) and ESS, the installation process is simple. - - 1. Extract all the files from `ess-VERSION.tgz' when you are in the - current working directory of `/usr/local/share/emacs/site-lisp' - which exists for packages like ESS (and for Mac OS X create a link - to it from the directory - `/Applications/Emacs.app/Contents/Resources/site-lisp'): - %prompt gtar zxf ess-VERSION.tgz # for GNU tar - %prompt gunzip < ess-VERSION.tgz | tar xf - # for Unix tar - - 2. Then, add the line - (require 'ess-site) - to `~/.emacs' and restart Emacs. - - 3. If you see a buffer named `*ESS*', then the simple instructions - were most likely successful. If not, then read further. - - 4. It could be that you have an older version of Emacs, some other - problem with your installation or you are not a sysadmin. - Whatever the case, you may need to edit `ess-site.el' manually. - If that is the case, then you should create a directory just for - ESS like `~/ess' or `/usr/local/ess' and unpack ESS there. That - way, your changes to `ess-site.el' will not be lost if you update - Emacs later. - - 5. Replace the line above with - (load "~/ess/ess-VERSION/lisp/ess-site") - in `~/.emacs' and restart Emacs. - - 6. If you see a buffer named `*ESS*', then the manual instructions - were most likely successful. If not, then send a query to - explicitly describing your problem - and your environment including operating system, Emacs version, - ESS version, etc. - - _XEmacs Simple Instructions:_ for recent versions of XEmacs (21.x or -higher) and ESS, the installation process is simple. - - 1. Extract all the files from `ess-VERSION.tgz' when you are in the - current working directory of - `/usr/local/LOCATION/xemacs/site-packages' which exists for - packages like ESS where `LOCATION' is `lib' for legacy - installations and `share' now (and for Mac OS X create a link to - it from the directory - `/Applications/XEmacs.app/Contents/Resources/site-lisp'): - %prompt gtar zxf ess-VERSION.tgz # for GNU tar - %prompt gunzip < ess-VERSION.tgz | tar xf - # for Unix tar - - 2. Then, add the line + 1. `cd' to a directory where you keep emacs lisp files, or create a + new directory (for example, `$HOME/emacs') to hold the + distribution. This directory will be referred to below as "the + ESS distribution directory". + + _Note for XEmacs packages:_ ESS is no longer available as an + XEmacs package. But, you can still install ESS into the XEmacs + package system by choosing + `ESSDIR'=`PREFIX/lib/xemacs/site-packages'. ESS requires that the + XEmacs sumo tarball (all XEmacs packages combined) also be + installed. For information on installing XEmacs packages, follow + this link: Quickstart Package Guide + (http://www.xemacs.org/Documentation/packageGuide.html). + + 2. Retrieve the latest version from ESS downloads area + (http://ess.r-project.org/downloads/ess) to `ESSDIR'. + + 3. Extract the files from the disribution. + If you are using GNU tar, `tar zxf ess-VERSION.tgz'. + Otherwise, `gunzip < ess-VERSION.tgz | tar xf -', + + The `tar' command will create the subdirectory `ess-VERSION' and + install the files there. + + 4. Edit the file `ESSDIR/ess-VERSION/lisp/ess-site.el' as explained + in the comments section of that file. + + 5. If you are using GNU Emacs add the line + (load "ESSDIR/ess-VERSION/lisp/ess-site") + to `$HOME/.emacs'. For XEmacs, if you followed the XEmacs package + system installation advice, add the line (require 'ess-site) - to `~/.xemacs/init.el' and restart XEmacs. + to `$HOME/.xemacs/init.el'. Otherwise, for XEmacs, add the line + (load "ESSDIR/ess-VERSION/lisp/ess-site") + to `$HOME/.xemacs/init.el'. - 3. If you see a buffer named `*ESS*', then the simple instructions - were most likely successful. If not, then read further. + 6. That's it! ESS is now ready to use. (The remaining step below is + only for a custom installation.) To edit statistical programs, + just open files with the requisite extensions (`.R' for R, `.sas' + for SAS, `.bug' for BUGS, etc.). To start a statistical process + within emacs, such as R, type `M-x R'. - 4. It could be that you have an older version of XEmacs, some other - problem with your installation or you are not a sysadmin. - Whatever the case, you may need to edit `ess-site.el' manually. - If that is the case, then you should create a directory just for - ESS like `~/ess' or `/usr/local/ess' and unpack ESS there. That - way, your changes to `ess-site.el' will not be lost if you update - XEmacs later. + 7. (OPTIONAL) READ THIS ITEM THOROUGHLY BEFORE STARTING: - 5. Replace the line above with - (load "~/ess/ess-VERSION/lisp/ess-site") - in `~/.xemacs/init.el' and restart XEmacs. - - 6. If you see a buffer named `*ESS*', then the manual instructions - were most likely successful. If not, then send a query to - explicitly describing your problem - and your environment including operating system, XEmacs version, - ESS version, etc. - - 1. (OPTIONAL) COMPILING E-LISP: - - Edit the default locations of `LISPDIR', `INFODIR' and `ETCDIR' in - Section 1 of `Makeconf' (if you are using XEmacs, then edit the - XEmacs subsection in Section 1). + If you want to place the compiled files in other locations edit the + `LISPDIR', `INFODIR' and `ETCDIR' entries in Section 1 of + `Makeconf' in the `ESSDIR/ess-VERSION' directory (if you are using + XEmacs, then uncomment the XEmacs subsection in Section 1). You can compile those files by: make all @@ -1314,196 +1076,158 @@ File: ess.info, Node: Microsoft Windows installation, Next: Requirements, Pre ================================== For Microsoft Windows installation, please follow the next steps. -Retrieve the latest zip file (`ess-VERSION.zip') from ESS downloads -area (http://ess.r-project.org/index.php?Section=download). - - _GNU Emacs Simple Instructions:_ for recent versions of Emacs (22.x -or higher) and ESS, the installation process is simple. - - 1. Extract all the files from `ess-VERSION.zip' (by double clicking - on it and selecting "Extract all files" which launches the Folders - Extraction Wizard) into the `site-lisp' directory that exists for - packages like ESS. If GNU Emacs was installed in the default - location, then this directory can be found somewhere like - `C:\Program Files\GNU Emacs\emacs-22.x\site-lisp'. - 2. Add the line + 1. `cd' to a directory where you keep emacs lisp files, or create a + new directory (for example, `c:\emacs\') to hold the distribution. + This directory will be referred to below as "the ESS distribution + directory". + + _Note for XEmacs packages:_ ESS is no longer available as an XEmacs + package. But, you can still install ESS into the XEmacs package + system by choosing `ESSDIR'=`PREFIX\XEmacs\site-packages'. ESS + requires that the XEmacs sumo tarball (all XEmacs packages + combined) also be installed. For information on installing XEmacs + packages, follow this link: Quickstart Package Guide + (http://www.xemacs.org/Documentation/packageGuide.html). + + 2. Retrieve the latest zip file (`ess-VERSION.zip') from ESS + downloads area (http://ess.r-project.org/downloads/ess) and store + it in the ESS distribution directory. Be aware that http browsers + on Windows frequently change the "." and "-" characters in + filenames to other punctuation. Please change the names back to + their original form. + + 3. Extract all the files from `ess-VERSION.zip' into the ESS + distribution directory as `c:\emacs\ess-VERSION\'. (It is possible + to unpack the zip archive in Windows Explorer by double clicking + on the folder; you should then see a new folder called + `ess-VERSION'. Drag that folder into your ESS distribution + directory.) + + 4. If you are using GNU Emacs add the line + (load "ESSDIR/ess-VERSION/lisp/ess-site") + to `%HOME%/.emacs'. For XEmacs, if you followed the XEmacs + package system installation advice, add the line (require 'ess-site) - to `~/.emacs' and restart Emacs. - - 3. If you see a buffer named `*ESS*', then the simple instructions - were most likely successful. If not, then read further. - - 4. It could be you have an older version of Emacs or some other - problem with your installation. Either way, you may need to edit - `C:\ess\ess-VERSION\lisp\ess-site.el' manually. If that is the - case, then you should create a directory just for ESS like - `C:\ess' and unpack ESS there. That way, your changes to - `C:\ess\ess-VERSION\lisp\ess-site.el' will not be lost if you - update Emacs later. - - 5. Replace the line above with - (load "C:/ess/ess-VERSION/lisp/ess-site") - in `~/.emacs' and restart Emacs. - - 6. If you see a buffer named `*ESS*', then the manual instructions - were most likely successful. If not, then send a query to - explicitly describing your problem - and your environment including operating system, Emacs version, - ESS version, etc. - - _XEmacs Simple Instructions:_ for recent versions of XEmacs (21.x or -higher), the installation process is much simpler. Hopefully, these -simple instructions will work for you. If not, then more detailed, -manual instructions follow. - - 1. Extract all the files from `ess-VERSION.zip' (by double clicking - on it and selecting "Extract all files" which launches the Folders - Extraction Wizard) into the `site-packages' directory that exists - for packages like ESS. If XEmacs was installed in the default - location, then this directory can be found at `C:\Program - Files\XEmacs\site-packages'. - - 2. XEmacs requires the `HOME' environment variable to be defined. - You can create it by visiting the following dialog: `My - Computer->Control Panel->System->Advanced->Environment Variables' - In the User variables window, press New. And create a variable - named `HOME' with a value something like (you must use forward - slashes `/' rather than backslashes `\') `c:/Documents and - Settings/%USERNAME%/Application Data'. Then press OK for that - window and press OK for the main window. _If you also have GNU - Emacs installed, GNU Emacs will recognize `HOME' and expand `~' - accordingly._ - - 3. Now launch XEmacs and do a `C-x C-f' followed by a `~'. From the - Subdir menu, select Create Directory, and enter `.xemacs' - - 4. Add the line - (require 'ess-site) - to `~/.xemacs/init.el' and restart XEmacs. - - 5. If you see a buffer named `*ESS*', then the simple instructions - were most likely successful. If not, then read further. - - 6. It could be you have an older version of XEmacs or some other - problem with your installation. Either way, you may need to edit - `C:\ess\ess-VERSION\lisp\ess-site.el' manually. If that is the - case, then you should create a directory just for ESS like - `C:\ess' and unpack ESS there. That way, your changes to - `C:\ess\ess-VERSION\lisp\ess-site.el' will not be lost if you - update XEmacs later. - - 7. Replace the line above with - (load "C:/ess/ess-VERSION/lisp/ess-site") - in `~/.xemacs/init.el' and restart XEmacs. - - 8. If you see a buffer named `*ESS*', then the manual instructions - were most likely successful. If not, then send a query to - explicitly describing your problem - and your environment including operating system, XEmacs version, - ESS version, etc. - - Now, you should be ready to use ESS. For example, to edit -statistical programs, load the files with the requisite extensions -(".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS, ".r" or ".R" for -R, and ".lsp" for XLispStat). One further step is needed if you wish to -run statistical processes, see below. - - To run statistical processes under ESS, Windows users will need to -make sure that the directories for the software they will be using is -in the PATH environment variable. - - On Windows NT/2000/XP, add the directories to the PATH using the `My -Computer->Control Panel->System->Advanced->Environment Variables' menu. -Note that the directory containing the program is added to the PATH, -not the program itself. One such line is needed for each software -program. Be sure to use the abbreviation `progra~1' and not the long -version with embedded blanks as this may cause problems. Also, make -sure to use backslashes `\' since Windows requires them. - - An alternative, for R users, is that rather than adjusting the PATH -variable, you can add the following to your emacs initialization file -(and restart emacs): - (setq inferior-R-program-name "c:/progra~1/R/R-2.2.1/bin/Rterm.exe") - This assumes that you have installed R-2.2.1 in the default location. -Change the path otherwise to point to other locations. - - Windows users who place S-PLUS anywhere other than the default -location will also need to add the following three lines (properly -adjusted for their location): - (setq-default inferior-S+6-program-name - "c:/progra~1/Insightful/SPLUS70/cmd/Splus") - (setq-default inferior-Sqpe+6-SHOME-name - "c:/progra~1/Insightful/SPLUS70") - (setq-default inferior-Sqpe+6-program-name - "c:/progra~1/Insightful/SPLUS70/cmd/Sqpe.exe") - The above example uses the default location of S-PLUS in -`c:\progra~1\Insightful'. Please note that ESS considers S-PLUS 6, 7, -and 8 to be variants of S+6. - - These users may also need to modify the emacs variable -`ess-SHOME-versions' to match their installation in order to get the -full set of S-PLUS versions on their machine into the ESS menu. - - To start the S-PLUS [678].x GUI from ESS under emacs: - 1. If you use Cygwin bash as your primary shell, then - M-x S - (or `M-x S+6'). - - 2. If you use the MSDOS prompt window as your primary shell, then - M-x S+6-msdos + to `%HOME%/.xemacs/init.el'. Otherwise, for XEmacs, add the line + (load "ESSDIR/ess-VERSION/lisp/ess-site") + to `%HOME%/.xemacs/init.el'. _Note:_ Both GNU Emacs and XEmacs + require that the HOME environment variable be set on your system, + otherwise, your initialization file will not be utilized, and + therefore, ESS will not work. + + After saving your initialization file, ESS is now installed. + Start a new emacs and you should be ready to use ESS. For + example, to edit statistical programs, load the files with the + requisite extensions (".sas" for SAS, ".S" or "s" or "q" or "Q" + for S-PLUS, ".r" or ".R" for R, and ".lsp" for XLispStat). One + further step is needed if you wish to run statistical processes, + see below. + + 5. To run statistical processes under ESS, Windows users will need to + make sure that the directories for the software they will be using + is in the PATH environment variable. On Windows 9x, add lines + similar to the following to your `c:\autoexec.bat' file: + path=%PATH%;c:\progra~1\insightful\splus70\cmd + On Windows NT/2000/XP, add the directories to the PATH using the + `My Computer/Control Panel/System/Advanced/Environment Variables' + menu. Note that the directory containing the program is added to + the PATH, not the program itself. One such line is needed for + each software program. Be sure to use the abbreviation `progra~1' + and not the long version with embedded blanks. Use backslashes + "`\'". + + An alternative, for R users, is that rather than adjusting the PATH + variable, you can add the following to your emacs initialization + file (and restart emacs): + (setq inferior-R-program-name "C:/progra~1/R/R-2.2.1/bin/Rterm.exe") + This assumes that you have installed R-2.2.1 in the default + location. Change the path otherwise to point to other locations. + + Windows users who place S-PLUS anywhere other than the default + location will also need to add the following three lines (properly + adjusted for their location) to their `%HOME%/.emacs' or + `%HOME%/.xemacs/init.el' file: + (setq-default inferior-S+6-program-name + "c:/progra~1/Insightful/SPLUS70/cmd/Splus") + (setq-default inferior-Sqpe+6-SHOME-name + "c:/progra~1/Insightful/SPLUS70") + (setq-default inferior-Sqpe+6-program-name + "c:/progra~1/Insightful/SPLUS70/cmd/Sqpe.exe") + The above example uses the default location of S-PLUS in + `c:/progra~1/Insightful'. Please note that ESS considers S-PLUS + 6, 7, and 8 to be variants of S+6. + + These users may also need to modify the emacs variable + `ess-SHOME-versions' to match their installation in order to get + the full set of S-PLUS versions on their machine into the `ESS' + menu. + + To start the S-PLUS [678].x GUI from ESS under emacs: + 1. If you use Cygwin bash as your primary shell, then + M-x S + (or `M-x S+6'). + + 2. If you use the MSDOS prompt window as your primary shell, then + M-x S+6-msdos + You will then be asked for a pathname ("S starting data + directory?"), from which to start the process. The prompt will + propose your current directory as the default. ESS will start the + S-PLUS GUI. There will be slight delay during which emacs is + temporarily frozen. ESS will arrange for communication with the + S-PLUS GUI using the DDE protocol. Send lines or regions from the + emacs buffer containing your S program (for example, `myfile.s') + to the S-PLUS Commands Window with the `C-c C-n' or `C-c C-r' keys. + (If you are still using S-PLUS 4.x or 2000,\ then use `M-x S+4' or + `M-x S+4-msdos'.) + + To start an S-PLUS [678].x session inside an emacs buffer--and + without the S-PLUS GUI: + M-x Sqpe + (or `M-x Sqpe+6'). + This works with both the bash and msdos shells. You will then be + asked for a pathname ("S starting data directory?"), from which to + start the process. The prompt will propose your current directory + as the default. You get Unix-like behavior, in particular the + entire transcript is available for emacs-style search commands. + Send lines or regions from the emacs buffer containing your S + program (for example, `myfile.s') to the *S+6* buffer with the + `C-c C-n' or `C-c C-r' keys. Interactive graphics are available + with Sqpe by using the java library supplied with S-PLUS 6.1 and + newer releases. Enter the commands: + library(winjava) + java.graph() + Graphs can be saved from the `java.graph' device in several + formats, but not PostScript. If you need a PostScript file you + will need to open a separate `postscript' device. (If you are + still using S-PLUS 4.x or 2000, then use `M-x Sqpe+4'.) + + To connect to an already running S-PLUS GUI (started, for example, + from the S-PLUS icon): + M-x S+6-existing + or + M-x S+6-msdos-existing You will then be asked for a pathname ("S starting data -directory?"), from which to start the process. The prompt will propose -your current directory as the default. ESS will start the S-PLUS GUI. -There will be slight delay during which emacs is temporarily frozen. -ESS will arrange for communication with the S-PLUS GUI using the DDE -protocol. Send lines or regions from the emacs buffer containing your -S program (for example, `myfile.s') to the S-PLUS Commands Window with -the `C-c C-n' or `C-c C-r' keys. (If you are still using S-PLUS 4.x or -2000,\ then use `M-x S+4' or `M-x S+4-msdos'.) - - To start an S-PLUS [678].x session inside an emacs buffer--and -without the S-PLUS GUI: - M-x Sqpe - (or `M-x Sqpe+6'). - This works with both the bash and msdos shells. You will then be -asked for a pathname ("S starting data directory?"), from which to -start the process. The prompt will propose your current directory as -the default. You get Unix-like behavior, in particular the entire -transcript is available for emacs-style search commands. Send lines or -regions from the emacs buffer containing your S program (for example, -`myfile.s') to the *S+6* buffer with the `C-c C-n' or `C-c C-r' keys. -Interactive graphics are available with Sqpe by using the java library -supplied with S-PLUS 6.1 and newer releases. Enter the commands: - library(winjava) - java.graph() - Graphs can be saved from the `java.graph' device in several formats, -but not PostScript. If you need a PostScript file you will need to -open a separate `postscript' device. (If you are still using S-PLUS -4.x or 2000, then use `M-x Sqpe+4'.) - - To connect to an already running S-PLUS GUI (started, for example, -from the S-PLUS icon): - M-x S+6-existing - or - M-x S+6-msdos-existing - You will then be asked for a pathname ("S starting data -directory?"), from which to start the process. The prompt will propose -your current directory as the default. ESS will arrange for -communication with the already running S-PLUS GUI using the DDE -protocol. Send lines or regions from the emacs buffer containing your -S program (for example, `myfile.s') to the S-PLUS Commands Window with -the `C-c C-n' or `C-c C-r' keys. (If you are still using S-PLUS 4.x or -2000, then use `M-x S+4-existing' or `M-x S+4-msdos-existing'.) - - If you wish to run R, you can start it with: - M-x R - - XLispStat can not currently be run with - M-x XLS - Hopefully, this will change. However, you can still edit with -emacs, and cut and paste the results into the XLispStat *Listener* -Window under Microsoft Windows. + directory?"), from which to start the process. The prompt will + propose your current directory as the default. ESS will arrange + for communication with the already running S-PLUS GUI using the + DDE protocol. Send lines or regions from the emacs buffer + containing your S program (for example, `myfile.s') to the S-PLUS + Commands Window with the `C-c C-n' or `C-c C-r' keys. (If you are + still using S-PLUS 4.x or 2000, then use `M-x S+4-existing' or + `M-x S+4-msdos-existing'.) + + If you wish to run R, you can start it with: + M-x R + + XLispStat can not currently be run with + M-x XLS + Hopefully, this will change. However, you can still edit with + emacs, and cut and paste the results into the XLispStat *Listener* + Window under Microsoft Windows. + + 6. That's it! +  File: ess.info, Node: Requirements, Prev: Microsoft Windows installation, Up: Installation @@ -1511,13 +1235,45 @@ File: ess.info, Node: Requirements, Prev: Microsoft Windows installation, Up: 2.3 Requirements ================ -ESS is most likely to work with current/recent versions of the following -statistical packages: R/S-PLUS, SAS, Stata and JAGS. The one exception -is BUGS which is quite old, but should still work. +ESS has been tested with + + * R >=0.49 + + * S-PLUS 3.3-4, 4.5, 2000, 5.0-1, 6.0-2, 7.0, 8.0 + + * S4 + + * SAS >=6.12 + + * BUGS 0.5, 0.6 + + * JAGS 0.9 + + * Stata >=6.0 + + * XLispStat >=3.50 + + on the following platforms + + * GNU Linux (all) + + * Sun Solaris (all) + + * Microsoft Windows 98/NT/2000/XP (R, SPLUS 4.5/2000/6.0-2/7.0/8.0, + SAS, and BUGS 0.6) + + * Apple Mac OS X 10.3-4 (R, JAGS) + + with the following versions of emacs + + * GNU Emacs 20.3-7, 21.1, 21.3-4, 22.1 + + * XEmacs 21.4.0-8, 21.4.9-13(1), 21.4.14-15, 21.4.17-19, 21.5.23 + + ---------- Footnotes ---------- - ESS supports current/recent versions of GNU Emacs and XEmacs. Most -notably, the GNU Emacs 22 series and XEmacs 21.4.14 or higher -(beta/pre-release versions are NOT SUPPORTED). + (1) require the files.el patch to revert-buffer for the Local +Variables updating problem  File: ess.info, Node: Interactive ESS, Next: Entering commands, Prev: Installation, Up: Top @@ -2004,7 +1760,7 @@ Note that these two commands are analogous to `C-p' and `C-n' but apply to command lines rather than text lines. And just like `C-p' and `C-n', passing a prefix argument to these commands means to move to the ARG'th next (or previous) command. (These commands are also discussed -in *note Shell History Copying: (emacs)Shell History Copying.) +in *Note Shell History Copying: (emacs)Shell History Copying.) There are also two similar commands (not bound to any keys by default) which move to preceding or succeeding commands, but which @@ -2067,7 +1823,7 @@ go). If the current line does not begin with a prompt, an error is signalled. This feature, coupled with the command-based motion commands described above, could be used as a primitive history mechanism. ESS provides a more sophisticated mechanism, however, which -is described in *note Command History::. +is described in *Note Command History::.  File: ess.info, Node: Saving transcripts, Prev: Transcript resubmit, Up: Transcript @@ -2082,7 +1838,7 @@ name of the file, but this is not a problem. You can still use S as usual; just remember to save the file before you quit Emacs with `C-x C-s'. You can make ESS prompt you for a filename in which to save the transcript every time you start S by setting the variable `ess-ask-about-transfile' -to `t'; see *note Customizing startup::. We recommend you save your +to `t'; see *Note Customizing startup::. We recommend you save your transcripts with filenames that end in `.St'. There is a special mode (ESS transcript mode -- *note Transcript Mode::) for editing transcript files which is automatically selected for files with this suffix. @@ -2308,7 +2064,7 @@ process buffer or in a separate buffer, as indicated: Checking::, for more details. * `C-c C-v' (`ess-display-help-on-object') - Pops up a help buffer for an S object or function. See *note + Pops up a help buffer for an S object or function. See *Note Help:: for more details. * `C-c C-q' (`ess-quit') @@ -2398,7 +2154,7 @@ The following commands are also provided in the process buffer: Prompts for an object to be edited in an edit buffer. *Note Editing::. - Other commands available in Inferior S mode are discussed in *note + Other commands available in Inferior S mode are discussed in *Note Shell Mode: (emacs)Shell Mode.  @@ -2533,7 +2289,8 @@ processes (programs). This mode handles: executing process with a single keystroke [RET]. - The ability to request help from the current process for variables - and functions, and to have the results sent into a separate buffer. + and functions, and to have the results sent into a separate + buffer. - completion of object names and file names. @@ -2573,45 +2330,43 @@ wish to always call R with certain arguments, set the variable `inferior-R-args' accordingly. If you have other versions of R or S-Plus available on the system, -ESS is also able to start those versions. How this exactly works -depend on which OS you are using, as described in the following -paragraphs. The general principle, regardless of OS, is that ESS -searches the paths listed in the variable `exec-path' for R binaries. -If ESS cannot find your R binaries, on Unix you can change the unix -environment variable `PATH', as this variable is used to set -`exec-path'. +ESS is also able to start those versions. How this works depend on +which OS you are using: R on Unix systems: If you have "R-1.8.1" on your `exec-path', it can be started using `M-x R-1.8.1'. By default, ESS will find versions of R beginning "R-1" or "R-2". If your versions of R are called other names, consider renaming them with a symbolic link or change the -variable `ess-r-versions'. To see which functions have been created -for starting different versions of R, type `M-x R-' and then hit [Tab]. -These other versions of R can also be started from the "ESS->Start -Process->Other" menu. +variable `ess-r-versions'. To see which defuns have been created for +starting different versions of R, type `M-x R-' and then hit [Tab]. +You will then see if any defuns for particular versions of R have been +created. These other versions of R can also be started from the +"ESS->Start Process->Other" menu. R on Windows systems: If you have "rw1081" on your `exec-path', it can be started using `M-x rw1081'. By default, ESS will find versions of R located in directories parallel to the version of R in your `PATH'. If your versions of R are called other names, you will need to -change the variable `ess-rterm-versions'. To see which functions have +change the variable `ess-rterm-versions'. To see which defuns have been created for starting different versions of R, type `M-x rw' and -then hit [Tab]. These other versions of R can also be started from the -"ESS->Start Process->Other" menu. +then hit [Tab]. You will then see if any defuns for particular +versions of R have been created. These other versions of R can also be +started from the "ESS->Start Process->Other" menu. Once ESS has found these extra versions of R, it will then create a -new function, called `M-x R-newest', which will call the newest version -of R that it found. (ESS examines the date in the first line of +new defun, called `M-x R-newest', which will call the newest version of +R that it found. (ESS examines the date in the first line of information from `R --version' to determine which is newest.) S on Unix systems: If you have "Splus7" on your `exec-path', it can be started using `M-x Splus7'. By default, ESS will find all executables beginning "Splus" on your path. If your versions of S are called other names, consider renaming them with a symbolic link or -change the variable `ess-s-versions'. To see which functions have been +change the variable `ess-s-versions'. To see which defuns have been created for starting different versions of Splus, type `M-x Splus' and -then hit [Tab]. These other versions of Splus can also be started from -the "ESS->Start Process->Other" menu. +then hit [Tab]. You will then see if any defuns for particular +versions of Splus have been created. These other versions of Splus can +also be started from the "ESS->Start Process->Other" menu. A second mechanim is also available for running other versions of Splus. The variable `ess-s-versions-list' is a list of lists; each @@ -2635,12 +2390,13 @@ is loaded. you have an older version of S-Plus (S-Plus 6.1 for example) on your system, ir can be started inside an emacs buffer with `M-x splus61'. By default, ESS will find versions of S-Plus located in the installation -directories that Insightful uses by default. If your versions of S-Plus -are anywhere else, you will need to change the variable -`ess-SHOME-versions'. To see which functions have been created for +directories that Insightful uses by default. If your versions of +S-Plus are anywhere else, you will need to change the variable +`ess-SHOME-versions'. To see which defuns have been created for starting different versions of S-Plus, type `M-x spl' and then hit -[Tab]. These other versions of S-Plus can also be started from the -"ESS->Start Process->Other" menu. +[Tab]. You will then see if any defuns for particular versions of +S-Plus have been created. These other versions of S-Plus can also be +started from the "ESS->Start Process->Other" menu.  File: ess.info, Node: ESS-help--assistance with viewing help, Next: Philosophies for using ESS(S), Prev: iESS(S)--Inferior ESS processes, Up: ESS for the S family @@ -2821,20 +2577,12 @@ in your .emacs file, the line: ) 3. Fontlocking sometimes fails to behave nicely upon errors. When -Splus dumps, a mis-matched " (double-quote) can result in the wrong -font-lock face being used for the remainder of the buffer. +Splus dumps, a mis-matched " (double-quote) can result in the +wrong font-lock face being used for the remainder of the buffer. Solution: add a " at the end of the "Dumped..." statement, to revert the font-lock face back to normal. - 4. When you change directory within a *R* or *S* session using the -setwd() command, emacs does not recognise that you have changed the -current directory. - - Solution: Use `M-x ess-change-directory'. This will ensure that -Emacs will know that you have changed the directory, and update the -emacs variable `default-directory'. -  File: ess.info, Node: Editing, Next: Editing R documentation files, Prev: ESS for the S family, Up: Top @@ -3051,11 +2799,6 @@ after the expression on the line containing the comment if it extends beyond the indentation column. You turn off the default behavior by adding the line `(setq ess-fancy-comments nil)' to your `.emacs' file. - ESS now has preliminary support for editing roxygen tags within R -mode buffers. In particular, when the function `ess-roxygen-fn' (bound -to `C-c C-o') is called with point inside a R function, the roxygen -template for the function is added just above the function. - The indentation commands provided by ESS are: * `TAB' (`ess-indent-command') @@ -3824,7 +3567,7 @@ UNIX PC Nickname `SUBMIT' save the current `.sas' file (which is either the `.sas' file in the current buffer or the `.sas' file associated - with the `.lst' or `.log' file in the current buffer) + with the `.lst' or `.log' file in the current buffer) and submit the file as a batch SAS job `PROGRAM' switch buffer to `.sas' file @@ -4100,7 +3843,7 @@ File: ess.info, Node: ESS(SAS)--Windows, Prev: ESS(SAS)--Graphics, Up: ESS fo  -File: ess.info, Node: ESS for BUGS, Next: ESS for JAGS, Prev: ESS for SAS, Up: Top +File: ess.info, Node: ESS for BUGS, Next: Miscellaneous, Prev: ESS for SAS, Up: Top 11 ESS for BUGS *************** @@ -4111,18 +3854,20 @@ File: ess.info, Node: ESS for BUGS, Next: ESS for JAGS, Prev: ESS for SAS, U * ESS(BUGS)--Command files:: * ESS(BUGS)--Log files:: - ESS[BUGS] was originally designed for use with BUGS software. -Later, it evolved to support JAGS as a dialect of the BUGS language via -ESS[JAGS], however, ESS[JAGS] is documented in the section Help for -JAGS. ESS[BUGS] provides 5 features. First, BUGS syntax is described -to allow for proper fontification of statements, distributions, -functions, commands and comments in BUGS model files, command files and -log files. Second, ESS creates templates for the command file from the -model file so that a BUGS batch process can be defined by a single -file. Third, ESS provides a BUGS batch script that allows ESS to set -BUGS batch parameters. Fourth, key sequences are defined to create a -command file and submit a BUGS batch process. Lastly, interactive -submission of BUGS commands is also supported. + ESS[BUGS] was originally designed for use with BUGS software. It +was developed by Rodney A. Sparapani and has some similarities with +ESS[SAS]. Later, it evolved to support JAGS as a dialect of the BUGS +language via ESS[JAGS]. Unless otherwise noted, whenever this +documentation says BUGS, you can assume that it applies to JAGS as +well. ESS provides 5 features. First, BUGS syntax is described to +allow for proper fontification of statements, distributions, functions, +commands and comments in BUGS model files, command files and log files. +Second, ESS creates templates for the command file from the model file +so that a BUGS batch process can be defined by a single file. Third, +ESS provides a BUGS batch script that allows ESS to set BUGS batch +parameters. Fourth, key sequences are defined to create a command file +and submit a BUGS batch process. Lastly, interactive submission of +BUGS commands is also supported.  File: ess.info, Node: ESS(BUGS)--Model files, Next: ESS(BUGS)--Command files, Prev: ESS for BUGS, Up: ESS for BUGS @@ -4132,20 +3877,21 @@ File: ess.info, Node: ESS(BUGS)--Model files, Next: ESS(BUGS)--Command files, Model files with the `.bug' extension are edited in ESS[BUGS] mode if `(require 'essd-bugs)' was performed or edited in ESS[JAGS] mode if -`(require 'essd-jags)'. Three keys are bound for your use in -ESS[BUGS], `F2', `C-c C-c' and `='. `F2' performs the same action as -it does in ESS[SAS], *Note ESS(SAS)--Function keys for batch -processing::. `C-c C-c' performs the function `ess-bugs-next-action' -which you will use a lot. Pressing it in an empty buffer for a model -file will produce a template for you. `=' inserts the set operator, -`<-'. +`(require 'essd-jags)'. Two keys are bound for your use in ESS[BUGS], +`F2' and `C-c C-c'. `F2' performs the same action as it does in +ESS[SAS], *Note ESS(SAS)--Function keys for batch processing::. `C-c +C-c' performs the function `ess-bugs-next-action' which you will use a +lot. Pressing it in an empty buffer for a model file will produce a +template for you. ESS[BUGS] supports "replacement" variables. These variables are created as part of the template, i.e. with the first press of `C-c C-c' in an empty buffer. They are named by all capitals and start with `%': `%N', `%DATA', `%INIT', `%MONITOR' and `%STATS'. When you are finished editing your model file, pressing `C-c C-c' will perform the necessary -replacements and build your command file for you. +replacements and build your command file for you. Note that ESS[JAGS] +only supports `%MONITOR' since none of the other variables are +compatible with the JAGS dialect. The `%DATA' variable appears in the line `data in "%DATA";'. On the second press of `C-c C-c', `%DATA' will be replaced by the model file @@ -4225,104 +3971,9 @@ appear in ESS[BUGS] mode. You may find `F2' useful to refresh the `.log' if the batch process over-writes or appends it.  -File: ess.info, Node: ESS for JAGS, Next: Miscellaneous, Prev: ESS for BUGS, Up: Top - -12 ESS for JAGS -*************** - -* Menu: - -* ESS(JAGS)--Model files:: -* ESS(JAGS)--Command files:: -* ESS(JAGS)--Log files:: - - ESS[BUGS] was originally designed for use with BUGS software. -Later, it evolved to support JAGS as a dialect of the BUGS language via -ESS[JAGS]. Since BUGS and JAGS are quite similar, ESS[BUGS] and -ESS[JAGS] are necessarily similar. ESS[JAGS] provides 4 features. -First, JAGS syntax is described to allow for proper fontification of -statements, distributions, functions, commands and comments in JAGS -model files, command files and log files. Second, ESS creates -templates for the command file from the model file so that a JAGS batch -process can be defined by a single file. Third, ESS provides a JAGS -batch script that allows ESS to set JAGS batch parameters. Fourth, key -sequences are defined to create a command file and submit a JAGS batch -process. - - -File: ess.info, Node: ESS(JAGS)--Model files, Next: ESS(JAGS)--Command files, Prev: ESS for JAGS, Up: ESS for JAGS - -12.1 ESS[JAGS]-Model files -========================== - -Model files with the `.bug' extension are edited in ESS[BUGS] mode if -`(require 'essd-bugs)' was performed or edited in ESS[JAGS] mode if -`(require 'essd-jags)'. Three keys are bound for your use in -ESS[BUGS], `F2', `C-c C-c' and `='. `F2' performs the same action as -it does in ESS[SAS], *Note ESS(SAS)--Function keys for batch -processing::. `C-c C-c' performs the function `ess-bugs-next-action' -which you will use a lot. Pressing it in an empty buffer for a model -file will produce a template for you. `=' inserts the set operator, -`<-'. - - ESS[JAGS] does not support "replacement" variables which were part of -ESS[BUGS]. Although, "replacement" variables are an extremely -convenient feature, creating the elisp code for their operation was -challenging. So, a more elisp-ish approach was adopted for ESS[JAGS]: -elisp local variables. These variables are created as part of the -template, i.e. with the first press of `C-c C-c' in an empty buffer. -For your `.bug' file, they are named `ess-jags-chains', -`ess-jags-monitor', `ess-jags-thin', `ess-jags-burnin' and -`ess-jags-update'; they appear in the `Local Variables' section. When -you are finished editing your model file, pressing `C-c C-c' will -perform the necessary actions to build your command file for you. - - The `ess-jags-chains' variable is the number of chains that you want -to initialize and sample from; defaults to 1. The `ess-jags-monitor' -variable is a list of variables that you want monitored: encase each -variable in double quotes. When you press `C-c C-c', the appropriate -statements are created in the command file to monitor the list of -variables. By default, no variables are explicitly monitored which -means JAGS will implicitly monitor all "default" variables. The -`ess-jags-thin' variable is the thinning parameter. By default, the -thinning parameter is set to 1, i.e. no thinning. The -`ess-jags-burnin' variable is the number of initial samples to discard. -By default, the burnin parameter is set to 10000. The -`ess-jags-update' variable is the number of post-burnin samples to -keep. By default, the update parameter is set to 10000. Both -`ess-jags-burnin' and `ess-jags-update' are multiplied by -`ess-jags-thin' since JAGS does not do it automatically. +File: ess.info, Node: Miscellaneous, Next: Mailing lists/bug reports, Prev: ESS for BUGS, Up: Top - -File: ess.info, Node: ESS(JAGS)--Command files, Next: ESS(JAGS)--Log files, Prev: ESS(JAGS)--Model files, Up: ESS for JAGS - -12.2 ESS[JAGS]-Command files -============================ - -To avoid extension name collision, `.bmd' is used for BUGS command -files and `.jmd' for JAGS command files. For your `.jmd' file, there -is only one variable, `ess-jags-command', in the `Local Variables' -section. When you have finished editing your model file and press `C-c -C-c', a command file is created if one does not already exist. When -you are finished editing your command file, pressing `C-c C-c' again -will submit your command file as a batch job. The `ess-jags-command' -variable allows you to specify a different JAGS program to use to run -your model; defaults to "jags". - - -File: ess.info, Node: ESS(JAGS)--Log files, Prev: ESS(JAGS)--Command files, Up: ESS for JAGS - -12.3 ESS[JAGS]-Log files -======================== - -The `.jog' extension is used for JAGS log files. You may find `F2' -useful to refresh the `.jog' if the batch process over-writes or -appends it. - - -File: ess.info, Node: Miscellaneous, Next: Mailing lists/bug reports, Prev: ESS for JAGS, Up: Top - -13 Other features of ESS +12 Other features of ESS ************************ ESS has a few miscellaneous features, which didn't fit anywhere else. @@ -4340,39 +3991,40 @@ ESS has a few miscellaneous features, which didn't fit anywhere else.  File: ess.info, Node: Highlighting, Next: Parens, Prev: Miscellaneous, Up: Miscellaneous -13.1 Syntactic highlighting of buffers +12.1 Syntactic highlighting of buffers ====================================== ESS provides Font-Lock (*note Using Multiple Typefaces: (emacs)Faces.) patterns for Inferior S Mode, S Mode, and S Transcript Mode buffers. - Syntax highlighting within ESS buffers is controlled by the variable -`ess-font-lock-mode', which by default is true. Input to inferior ESS -processes is also highlighted syntactically if -`inferior-ess-font-lock-input' is non-nil (the default). If you change -the value of either of these varibles, you need to restart emacs for -your changes to take effect. - - The font-lock patterns are defined in the following variables, which -you may modify if desired: - - -- Variable: inferior-ess-R-font-lock-keywords - Font-lock patterns for inferior *R* processes. (There is a - corresponding `inferior-ess-S-font-lock-keywords' for *S* - processes.) The default value highlights prompts, inputs, - assignments, output messages, vector and matrix labels, and - literals such as `NA' and `TRUE'. - - -- Variable: ess-R-mode-font-lock-keywords - Font-lock patterns for ESS R programming mode. (There is a - corresponding `ess-S-mode-font-lock-keywords' for S buffers.) The - default value highlights function names, literals, assignments, - source functions and reserved words. + To activate highlighting, you need to turn on Font Lock mode in the +appropriate buffers. This can be done on a per-buffer basis with `M-x +font-lock-mode', or may be done by adding `turn-on-font-lock' to +`inferior-ess-mode-hook', `ess-mode-hook' and +`ess-transcript-mode-hook'. Your systems administrator may have done +this for you in `ess-site.el' (*note Customization::). + + The font-lock patterns are defined in three variables, which you may +modify if desired: + + -- Variable: inferior-ess-font-lock-keywords + Font-lock patterns for Inferior ESS Mode. The default value + highlights prompts, inputs, assignments, output messages, vector + and matrix labels, and literals such as `NA' and `TRUE'. + + -- Variable: ess-mode-font-lock-keywords + Font-lock patterns for ESS programming mode. The default value + highlights function names, literals, assignments, source functions + and reserved words. + + -- Variable: ess-trans-font-lock-keywords + Font-lock patterns for ESS Transcript Mode. The default value + highlights the same patterns as in Inferior ESS Mode.  File: ess.info, Node: Parens, Next: Graphics, Prev: Highlighting, Up: Miscellaneous -13.2 Parenthesis matching +12.2 Parenthesis matching ========================= Emacs and XEmacs have facilities for highlighting the parenthesis @@ -4388,7 +4040,7 @@ initialisation file:  File: ess.info, Node: Graphics, Next: Imenu, Prev: Parens, Up: Miscellaneous -13.3 Using graphics with ESS +12.3 Using graphics with ESS ============================ One of the main features of the `S' package is its ability to generate @@ -4404,7 +4056,7 @@ for dealing with such plots.  File: ess.info, Node: printer, Next: X11, Prev: Graphics, Up: Graphics -13.3.1 Using ESS with the `printer()' driver +12.3.1 Using ESS with the `printer()' driver -------------------------------------------- This is the simplest (and least desirable) method of using graphics @@ -4421,7 +4073,7 @@ issued, which displays the current figure.  File: ess.info, Node: X11, Next: winjava, Prev: printer, Up: Graphics -13.3.2 Using ESS with windowing devices +12.3.2 Using ESS with windowing devices --------------------------------------- Of course, the ideal way to use graphics with ESS is to use a windowing @@ -4434,7 +4086,7 @@ DISPLAY before the ESS process is started if the variable  File: ess.info, Node: winjava, Prev: X11, Up: Graphics -13.3.3 Java Graphics Device +12.3.3 Java Graphics Device --------------------------- S+6.1 and newer on Windows contains a java library that supports @@ -4450,7 +4102,7 @@ this information.)  File: ess.info, Node: Imenu, Next: Toolbar, Prev: Graphics, Up: Miscellaneous -13.4 Imenu +12.4 Imenu ========== Imenu is an Emacs tool for providing mode-specific buffer indexes. In @@ -4469,7 +4121,7 @@ various ESS variables such as `ess-imenu-S-generic-expression'.  File: ess.info, Node: Toolbar, Next: TAGS, Prev: Imenu, Up: Miscellaneous -13.5 Toolbar +12.5 Toolbar ============ The R and S editing modes have support for a toolbar. This toolbar @@ -4481,7 +4133,7 @@ ways to change the toolbar.  File: ess.info, Node: TAGS, Next: Rdired, Prev: Toolbar, Up: Miscellaneous -13.6 TAGS +12.6 TAGS ========= The Emacs tags facility can be used to navigate around your files @@ -4506,18 +4158,10 @@ should be appropriate. with the function name starting in column 0. Windows users may need to change the single quotes to double quotes. - R version 2.9.0 introduced a front-end script for finding R tags, -which calls the `rtags()' function). By default, this script will -recursively search the directories for relevant tags in R/C/Rd files. -To use this script from the command line, try the following to get -started: - - R CMD rtags --help -  File: ess.info, Node: Rdired, Prev: TAGS, Up: Miscellaneous -13.7 Rdired +12.7 Rdired =========== Ess-rdired provides a dired-like buffer for viewing, editing and @@ -4554,7 +4198,7 @@ the object, `v' will view it, and `d' will mark the object for deletion  File: ess.info, Node: Mailing lists/bug reports, Next: Customization, Prev: Miscellaneous, Up: Top -14 Bugs and Bug Reporting, Mailing Lists +13 Bugs and Bug Reporting, Mailing Lists **************************************** * Menu: @@ -4567,7 +4211,7 @@ File: ess.info, Node: Mailing lists/bug reports, Next: Customization, Prev: M  File: ess.info, Node: Bugs, Next: Reporting Bugs, Prev: Mailing lists/bug reports, Up: Mailing lists/bug reports -14.1 Bugs +13.1 Bugs ========= * Commands like `ess-display-help-on-object' and list completion @@ -4608,7 +4252,7 @@ File: ess.info, Node: Bugs, Next: Reporting Bugs, Prev: Mailing lists/bug rep  File: ess.info, Node: Reporting Bugs, Next: Mailing Lists, Prev: Bugs, Up: Mailing lists/bug reports -14.2 Reporting Bugs +13.2 Reporting Bugs =================== Please send bug reports, suggestions etc. to @@ -4632,7 +4276,7 @@ donations are also more than welcome.  File: ess.info, Node: Mailing Lists, Next: Help with emacs, Prev: Reporting Bugs, Up: Mailing lists/bug reports -14.3 Mailing Lists +13.3 Mailing Lists ================== There is a mailing list for discussions and announcements relating to @@ -4657,7 +4301,7 @@ low-volume mailing list.  File: ess.info, Node: Help with emacs, Prev: Mailing Lists, Up: Mailing lists/bug reports -14.4 Help with emacs +13.4 Help with emacs ==================== Emacs is a complex editor with many abilities that we do not have space @@ -4702,7 +4346,7 @@ Concept Index * Menu: * .emacs file <1>: Source Directories. (line 30) -* .emacs file: Indenting. (line 64) +* .emacs file: Indenting. (line 59) * aborting S commands: Other. (line 10) * aborting the ESS process: Other. (line 18) * arguments to S program: Customizing startup. (line 47) @@ -4713,8 +4357,6 @@ Concept Index * cleaning up: Hot keys. (line 66) * comint: Credits. (line 6) * command history: Command History. (line 6) -* command line arguments: iESS(S)--Inferior ESS processes. - (line 38) * command-line completion: Completion. (line 6) * command-line editing: Command-line editing. (line 6) @@ -4751,13 +4393,13 @@ Concept Index * evaluating code with echoed commands: Evaluating code. (line 18) * evaluating S expressions: Evaluating code. (line 24) * Font-lock mode: Highlighting. (line 7) -* formatting source code: Indenting. (line 35) +* formatting source code: Indenting. (line 30) * graphics: Graphics. (line 6) * help files: Help. (line 6) * highlighting: Highlighting. (line 7) * historic backups: Source Files. (line 40) * hot keys: Hot keys. (line 37) -* indenting: Indenting. (line 35) +* indenting: Indenting. (line 30) * installation: Installation. (line 6) * interactive use of S: Introduction. (line 31) * interrupting S commands: Other. (line 10) @@ -4787,7 +4429,6 @@ Concept Index * Remote Computers: ESS processes on Remote Computers. (line 6) * reverting function definitions: Edit buffer. (line 27) -* roxygen: Indenting. (line 30) * running S: Starting up. (line 6) * search list <1>: Source Directories. (line 55) * search list: Hot keys. (line 27) @@ -4896,11 +4537,11 @@ Variable and command index * ess-list-object-completions: Completion. (line 36) * ess-load-file <1>: Loading. (line 13) * ess-load-file: Hot keys. (line 51) +* ess-mode-font-lock-keywords: Highlighting. (line 25) * ess-parse-errors <1>: Error Checking. (line 9) * ess-parse-errors: Hot keys. (line 53) * ess-quit <1>: Help. (line 150) * ess-quit: Other. (line 18) -* ess-R-mode-font-lock-keywords: Highlighting. (line 27) * ess-remote: ESS processes on Remote Computers. (line 6) * ess-request-a-process: Multiple ESS processes. @@ -4917,13 +4558,14 @@ Variable and command index (line 32) * ess-switch-to-ESS: Other edit buffer commands. (line 36) +* ess-trans-font-lock-keywords: Highlighting. (line 30) * ess-transcript-clean-region: Saving transcripts. (line 31) * ess-transcript-copy-command: Resubmit. (line 14) * ess-transcript-send-command: Resubmit. (line 10) * ess-transcript-send-command-and-move: Transcript resubmit. (line 22) * exit(): Hot keys. (line 61) +* inferior-ess-font-lock-keywords: Highlighting. (line 20) * inferior-ess-program: Customizing startup. (line 44) -* inferior-ess-R-font-lock-keywords: Highlighting. (line 20) * inferior-ess-send-input <1>: Transcript resubmit. (line 13) * inferior-ess-send-input: Command-line editing. (line 10) @@ -4943,97 +4585,94 @@ Variable and command index  Tag Table: -Node: Top278 -Node: Introduction2145 -Node: Features5127 -Node: New features8548 -Node: Credits45099 -Node: Latest version48591 -Node: Manual50375 -Node: Installation52917 -Node: Unix installation53395 -Node: Microsoft Windows installation57496 -Node: Requirements66937 -Node: Interactive ESS67446 -Node: Starting up68300 -Node: Multiple ESS processes69111 -Node: ESS processes on Remote Computers70146 -Node: S+elsewhere and ESS-elsewhere73296 -Node: Customizing startup76059 -Node: Entering commands78739 -Node: Command-line editing80038 -Node: Completion81322 -Node: Completion details84091 -Ref: Completion details-Footnote-185497 -Node: Transcript85777 -Node: Last command87552 -Node: Process buffer motion89042 -Node: Transcript resubmit90563 -Node: Saving transcripts93172 -Node: Command History95218 -Node: History expansion97842 -Node: Hot keys101050 -Node: Statistical Process running in ESS?104517 -Node: Emacsclient105822 -Node: Other106629 -Node: Transcript Mode107675 -Node: Resubmit108831 -Node: Clean109915 -Node: ESS for the S family110634 -Node: ESS(S)--Editing files111041 -Node: iESS(S)--Inferior ESS processes112093 -Node: ESS-help--assistance with viewing help117784 -Node: Philosophies for using ESS(S)118114 -Node: Scenarios for use (possibilities--based on actual usage)119250 -Node: Customization Examples and Solutions to Problems123941 -Node: Editing125561 -Node: Edit buffer126748 -Node: Loading128782 -Node: Error Checking129833 -Node: Evaluating code130879 -Node: Indenting134314 -Node: Other edit buffer commands137565 -Node: Source Files139482 -Node: Source Directories144012 -Node: Editing R documentation files147151 -Node: Help151000 -Node: ESS for SAS155330 -Node: ESS(SAS)--Design philosophy156052 -Node: ESS(SAS)--Editing files157006 -Node: ESS(SAS)--TAB key158866 -Node: ESS(SAS)--Batch SAS processes160164 -Node: ESS(SAS)--Function keys for batch processing165188 -Node: iESS(SAS)--Interactive SAS processes174779 -Node: iESS(SAS)--Common problems178529 -Node: ESS(SAS)--Graphics180061 -Node: ESS(SAS)--Windows180844 -Node: ESS for BUGS181423 -Node: ESS(BUGS)--Model files182443 -Node: ESS(BUGS)--Command files185613 -Node: ESS(BUGS)--Log files186929 -Node: ESS for JAGS187479 -Node: ESS(JAGS)--Model files188458 -Node: ESS(JAGS)--Command files190889 -Node: ESS(JAGS)--Log files191665 -Node: Miscellaneous191961 -Node: Highlighting192607 -Node: Parens194022 -Node: Graphics194610 -Node: printer195126 -Node: X11195899 -Node: winjava196430 -Node: Imenu196843 -Node: Toolbar197691 -Node: TAGS198106 -Node: Rdired199393 -Node: Mailing lists/bug reports200649 -Node: Bugs200914 -Node: Reporting Bugs202577 -Node: Mailing Lists203390 -Node: Help with emacs204155 -Node: Customization204709 -Node: Key Index205474 -Node: Concept Index205629 -Node: Variable and command index213719 +Node: Top272 +Node: Introduction2076 +Node: Features5053 +Node: New features8474 +Node: Credits35194 +Node: Latest version38575 +Node: Manual40359 +Node: Installation42901 +Node: Unix installation43379 +Node: Microsoft Windows installation45951 +Node: Requirements53891 +Ref: Requirements-Footnote-154620 +Node: Interactive ESS54713 +Node: Starting up55567 +Node: Multiple ESS processes56378 +Node: ESS processes on Remote Computers57413 +Node: S+elsewhere and ESS-elsewhere60563 +Node: Customizing startup63326 +Node: Entering commands66006 +Node: Command-line editing67305 +Node: Completion68589 +Node: Completion details71358 +Ref: Completion details-Footnote-172764 +Node: Transcript73044 +Node: Last command74819 +Node: Process buffer motion76309 +Node: Transcript resubmit77830 +Node: Saving transcripts80439 +Node: Command History82485 +Node: History expansion85109 +Node: Hot keys88317 +Node: Statistical Process running in ESS?91784 +Node: Emacsclient93089 +Node: Other93896 +Node: Transcript Mode94942 +Node: Resubmit96098 +Node: Clean97182 +Node: ESS for the S family97901 +Node: ESS(S)--Editing files98308 +Node: iESS(S)--Inferior ESS processes99360 +Node: ESS-help--assistance with viewing help105058 +Node: Philosophies for using ESS(S)105388 +Node: Scenarios for use (possibilities--based on actual usage)106524 +Node: Customization Examples and Solutions to Problems111215 +Node: Editing112501 +Node: Edit buffer113688 +Node: Loading115722 +Node: Error Checking116773 +Node: Evaluating code117819 +Node: Indenting121254 +Node: Other edit buffer commands124235 +Node: Source Files126152 +Node: Source Directories130682 +Node: Editing R documentation files133821 +Node: Help137670 +Node: ESS for SAS142000 +Node: ESS(SAS)--Design philosophy142722 +Node: ESS(SAS)--Editing files143676 +Node: ESS(SAS)--TAB key145536 +Node: ESS(SAS)--Batch SAS processes146834 +Node: ESS(SAS)--Function keys for batch processing151858 +Node: iESS(SAS)--Interactive SAS processes161450 +Node: iESS(SAS)--Common problems165200 +Node: ESS(SAS)--Graphics166732 +Node: ESS(SAS)--Windows167515 +Node: ESS for BUGS168094 +Node: ESS(BUGS)--Model files169240 +Node: ESS(BUGS)--Command files172484 +Node: ESS(BUGS)--Log files173800 +Node: Miscellaneous174350 +Node: Highlighting174996 +Node: Parens176410 +Node: Graphics176998 +Node: printer177514 +Node: X11178287 +Node: winjava178818 +Node: Imenu179231 +Node: Toolbar180079 +Node: TAGS180494 +Node: Rdired181473 +Node: Mailing lists/bug reports182729 +Node: Bugs182994 +Node: Reporting Bugs184657 +Node: Mailing Lists185470 +Node: Help with emacs186235 +Node: Customization186789 +Node: Key Index187554 +Node: Concept Index187709 +Node: Variable and command index195579  End Tag Table diff --git a/aquamacs/src/site-lisp/edit-modes/info/preview-latex.info b/aquamacs/src/site-lisp/edit-modes/info/preview-latex.info index 62e08334d8ad..db6780b0bfd0 100644 --- a/aquamacs/src/site-lisp/edit-modes/info/preview-latex.info +++ b/aquamacs/src/site-lisp/edit-modes/info/preview-latex.info @@ -1,20 +1,24 @@ -This is preview-latex.info, produced by makeinfo version 4.11 from +This is preview-latex.info, produced by makeinfo version 4.13 from preview-latex.texi. This manual is for preview-latex, a LaTeX preview mode for AUCTeX -(version 11.85 from 2008-02-10). +(version 11.86 from 2010-02-21). Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, - Version 1.2 or any later version published by the Free Software + Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License." -INFO-DIR-SECTION EmacsINFO-DIR-SECTION TeX +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs +END-INFO-DIR-ENTRY +INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY * preview-latex: (preview-latex). Preview LaTeX fragments in Emacs END-INFO-DIR-ENTRY @@ -797,7 +801,7 @@ File: preview-latex.info, Node: The LaTeX style file, Next: The Emacs interfac The main purpose of this package is the extraction of certain environments (most notably displayed formulas) from LaTeX sources as graphics. This works with DVI files postprocessed by either Dvips and -Ghostscript or dvipng, but it also works when you are using PDFTeXfor +Ghostscript or dvipng, but it also works when you are using PDFTeX for generating PDF files (usually also postprocessed by Ghostscript). Current uses of the package include the preview-latex package for @@ -906,6 +910,10 @@ redefines several things that other packages may also provide. If this option is set, PDFTeX is assumed as the output driver. This mainly affects the `tightpage' option. +`xetex' + If this option is set, XeTeX is assumed as the output driver. + This mainly affects the `tightpage' option. + `displaymath' will make all displayed math environments subject to preview processing. This will typically be the most desired option. @@ -1687,6 +1695,8 @@ Appendix B Frequently Asked Questions * Requirements:: * Installation Trouble:: * Customization:: +* Troubleshooting:: +* Other formats::  File: preview-latex.info, Node: Introduction to FAQ, Next: Requirements, Prev: Frequently Asked Questions, Up: Frequently Asked Questions @@ -1828,7 +1838,7 @@ a package system that gets used here. Please make sure that you read and follow the installation instructions for XEmacs.  -File: preview-latex.info, Node: Customization, Prev: Installation Trouble, Up: Frequently Asked Questions +File: preview-latex.info, Node: Customization, Next: Troubleshooting, Prev: Installation Trouble, Up: Frequently Asked Questions B.4 Customization ================= @@ -1912,6 +1922,9 @@ facilities of `preview.sty' to tell it how to resolve this, whether you want no previews, previews of whole slides or previews of inner material. + +File: preview-latex.info, Node: Troubleshooting, Next: Other formats, Prev: Customization, Up: Frequently Asked Questions + B.5 Troubleshooting =================== @@ -1946,6 +1959,29 @@ preview-latex is operating. There might be also real errors, so in case of doubt, look for them explicitly in either run buffer or the resulting `.log' file. +B.5.2 Why do my DVI and PDF output files vanish? +------------------------------------------------ + +In order to produce the preview images preview-latex runs LaTeX on the +master or region file. The resulting DVI or PDF file can happen to +have the same name as the output file of a regular LaTeX run. So the +regular output file gets overwritten and is subsequently deleted by +preview-latex. + +B.5.3 My output file suddenly only contains preview images?! +------------------------------------------------------------ + +As mentioned in the previews FAQ entry, preview-latex might use the +file name of the original output file for the creation of preview +images. If the original output file is being displayed with a viewer +when this happens, you might see strange effects depending on the +viewer, e.g. a message about the file being corrupted or the display of +all the preview images instead of your typeset document. (Also *Note +Customization::.) + + +File: preview-latex.info, Node: Other formats, Prev: Troubleshooting, Up: Frequently Asked Questions + B.6 preview-latex when not using LaTeX ====================================== @@ -1994,14 +2030,14 @@ Appendix C Copying this Manual The copyright notice for this manual is: This manual is for preview-latex, a LaTeX preview mode for AUCTeX -(version 11.85 from 2008-02-10). +(version 11.86 from 2010-02-21). Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, - Version 1.2 or any later version published by the Free Software + Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License." @@ -2018,10 +2054,10 @@ File: preview-latex.info, Node: GNU Free Documentation License, Up: Copying th C.1 GNU Free Documentation License ================================== - Version 1.2, November 2002 + Version 1.3, 3 November 2008 - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software + Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -2123,6 +2159,9 @@ C.1 GNU Free Documentation License Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + The "publisher" means any person or entity that distributes copies + of the Document to the public. + A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ @@ -2388,12 +2427,29 @@ C.1 GNU Free Documentation License 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, receipt of a copy of some or all of + the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE @@ -2411,7 +2467,41 @@ C.1 GNU Free Documentation License published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the - Free Software Foundation. + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + ADDENDUM: How to use this License for your documents ==================================================== @@ -2422,7 +2512,7 @@ notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 + under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU @@ -2568,41 +2658,43 @@ Index  Tag Table: -Node: Top828 -Node: Copying2100 -Node: Introduction2561 -Node: What use is it?3234 -Node: Activating preview-latex4626 -Node: Getting started5441 -Node: Basic modes of operation7528 -Node: More documentation8732 -Node: Availability9620 -Node: Contacts10225 -Node: Installation11497 -Node: Keys and lisp11710 -Node: Simple customization18378 -Node: Known problems24139 -Node: Problems with Ghostscript24960 -Node: Font problems with Dvips27153 -Node: Emacs problems28356 -Node: Too small bounding boxes30093 -Node: x-symbol interoperation31477 -Node: Middle-clicks paste instead of toggling32859 -Node: For advanced users33675 -Node: The LaTeX style file34134 -Node: Package options36694 -Node: Provided commands47504 -Node: The Emacs interface54859 -Node: The preview images64039 -Node: Misplaced previews67511 -Node: ToDo70954 -Node: Frequently Asked Questions75739 -Node: Introduction to FAQ76024 -Node: Requirements76363 -Node: Installation Trouble79327 -Node: Customization81889 -Node: Copying this Manual88065 -Node: GNU Free Documentation License88990 -Node: Index111395 +Node: Top942 +Node: Copying2214 +Node: Introduction2675 +Node: What use is it?3348 +Node: Activating preview-latex4740 +Node: Getting started5555 +Node: Basic modes of operation7642 +Node: More documentation8846 +Node: Availability9734 +Node: Contacts10339 +Node: Installation11611 +Node: Keys and lisp11824 +Node: Simple customization18492 +Node: Known problems24253 +Node: Problems with Ghostscript25074 +Node: Font problems with Dvips27267 +Node: Emacs problems28470 +Node: Too small bounding boxes30207 +Node: x-symbol interoperation31591 +Node: Middle-clicks paste instead of toggling32973 +Node: For advanced users33789 +Node: The LaTeX style file34248 +Node: Package options36809 +Node: Provided commands47744 +Node: The Emacs interface55099 +Node: The preview images64279 +Node: Misplaced previews67751 +Node: ToDo71194 +Node: Frequently Asked Questions75979 +Node: Introduction to FAQ76302 +Node: Requirements76641 +Node: Installation Trouble79605 +Node: Customization82167 +Node: Troubleshooting85715 +Node: Other formats88232 +Node: Copying this Manual89549 +Node: GNU Free Documentation License90474 +Node: Index115615  End Tag Table diff --git a/aquamacs/src/site-lisp/edit-modes/tex-site.el b/aquamacs/src/site-lisp/edit-modes/tex-site.el index 1c1f36b0eb4d..48d4903d6773 100644 --- a/aquamacs/src/site-lisp/edit-modes/tex-site.el +++ b/aquamacs/src/site-lisp/edit-modes/tex-site.el @@ -41,6 +41,17 @@ (if (< emacs-major-version 21) (error "AUCTeX requires Emacs 21 or later")) +;; Define here in order for `M-x customize-group AUCTeX ' +;; to work if the main AUCTeX files are not loaded yet. +(defgroup AUCTeX nil + "A (La)TeX environment." + :tag "AUCTeX" + :link '(custom-manual "(auctex)Top") + :link '(url-link :tag "Home Page" "http://www.gnu.org/software/auctex/") + :prefix "TeX-" + :group 'tex + :load "tex" :load "latex" :load "tex-style") + (defvar TeX-lisp-directory (expand-file-name "auctex" (file-name-directory load-file-name)) "The directory where most of the AUCTeX lisp files are located. @@ -131,13 +142,16 @@ set it with `TeX-modes-set'." `(TeX-modes-set ',var ,var t)) (setq list (cdr list)))))) -(defconst AUCTeX-version "11.85" +(defconst AUCTeX-version "11.86" "AUCTeX version. If not a regular release, the date of the last change.") -(defconst AUCTeX-date "2008-02-10" +(defconst AUCTeX-date "2010-02-21" "AUCTeX release date using the ISO 8601 format, yyyy-mm-dd.") +;; Store bibitems when saving a BibTeX buffer +(add-hook 'bibtex-mode-hook 'BibTeX-auto-store) + ;;; auto-loads.el --- automatically extracted autoloads ;; ;;; Code: @@ -162,7 +176,7 @@ Unconditionally turn on Bib Cite mode. ;;;*** -;;;### (autoloads (context-mode) "context" "context.el" (18341 54637)) +;;;### (autoloads (context-mode) "context" "context.el" (19318 46167)) ;;; Generated autoloads from context.el (defalias (quote ConTeXt-mode) (quote context-mode)) @@ -182,7 +196,7 @@ of context-mode-hook. ;;;*** ;;;### (autoloads (context-en-mode) "context-en" "context-en.el" -;;;;;; (18341 54637)) +;;;;;; (18541 18440)) ;;; Generated autoloads from context-en.el (autoload (quote context-en-mode) "context-en" "\ @@ -200,7 +214,7 @@ of context-mode-hook. ;;;*** ;;;### (autoloads (context-nl-mode) "context-nl" "context-nl.el" -;;;;;; (18341 54637)) +;;;;;; (18489 3127)) ;;; Generated autoloads from context-nl.el (autoload (quote context-nl-mode) "context-nl" "\ @@ -218,7 +232,7 @@ of context-mode-hook. ;;;*** ;;;### (autoloads (font-latex-setup) "font-latex" "font-latex.el" -;;;;;; (18344 55640)) +;;;;;; (19254 11585)) ;;; Generated autoloads from font-latex.el (autoload (quote font-latex-setup) "font-latex" "\ @@ -229,7 +243,7 @@ Setup this buffer for LaTeX font-lock. Usually called from a hook. ;;;*** ;;;### (autoloads (docTeX-mode TeX-latex-mode BibTeX-auto-store) -;;;;;; "latex" "latex.el" (18341 54637)) +;;;;;; "latex" "latex.el" (19180 28128)) ;;; Generated autoloads from latex.el (autoload (quote BibTeX-auto-store) "latex" "\ @@ -266,8 +280,8 @@ runs the hooks in `docTeX-mode-hook'. ;;;*** -;;;### (autoloads (multi-prompt) "multi-prompt" "multi-prompt.el" -;;;;;; (18341 54637)) +;;;### (autoloads (multi-prompt-key-value multi-prompt) "multi-prompt" +;;;;;; "multi-prompt.el" (18915 28236)) ;;; Generated autoloads from multi-prompt.el (autoload (quote multi-prompt) "multi-prompt" "\ @@ -279,28 +293,28 @@ are the arguments to `completing-read'. See that. \(fn SEPARATOR UNIQUE PROMPT TABLE &optional MP-PREDICATE REQUIRE-MATCH INITIAL HISTORY)" nil nil) -;;;*** - -;;;### (autoloads (TeX-submit-bug-report ams-tex-mode TeX-auto-generate-global -;;;;;; TeX-auto-generate TeX-plain-tex-mode TeX-tex-mode) "tex" -;;;;;; "tex.el" (18349 63029)) -;;; Generated autoloads from tex.el +(autoload (quote multi-prompt-key-value) "multi-prompt" "\ +Read multiple strings, with completion and key=value support. +PROMPT is a string to prompt with, usually ending with a colon +and a space. TABLE is an alist. The car of each element should +be a string representing a key and the optional cdr should be a +list with strings to be used as values for the key. -(autoload (quote TeX-tex-mode) "tex" "\ -Major mode in AUCTeX for editing TeX or LaTeX files. -Tries to guess whether this file is for plain TeX or LaTeX. +See the documentation for `completing-read' for details on the +other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, +DEF, and INHERIT-INPUT-METHOD. -The algorithm is as follows: +The return value is the string as entered in the minibuffer. - 1) if the file is empty or `TeX-force-default-mode' is not set to nil, - `TeX-default-mode' is chosen - 2) If \\documentstyle or \\begin{, \\section{, \\part{ or \\chapter{ is - found, `latex-mode' is selected. - 3) Otherwise, use `plain-tex-mode' +\(fn PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)" nil nil) -\(fn)" t nil) +;;;*** + +;;;### (autoloads (ams-tex-mode TeX-plain-tex-mode) "plain-tex" "plain-tex.el" +;;;;;; (19406 6283)) +;;; Generated autoloads from plain-tex.el -(autoload (quote TeX-plain-tex-mode) "tex" "\ +(autoload (quote TeX-plain-tex-mode) "plain-tex" "\ Major mode in AUCTeX for editing plain TeX files. See info under AUCTeX for documentation. @@ -313,18 +327,7 @@ of plain-TeX-mode-hook. \(fn)" t nil) -(autoload (quote TeX-auto-generate) "tex" "\ -Generate style file for TEX and store it in AUTO. -If TEX is a directory, generate style files for all files in the directory. - -\(fn TEX AUTO)" t nil) - -(autoload (quote TeX-auto-generate-global) "tex" "\ -Create global auto directory for global TeX macro definitions. - -\(fn)" t nil) - -(autoload (quote ams-tex-mode) "tex" "\ +(autoload (quote ams-tex-mode) "plain-tex" "\ Major mode in AUCTeX for editing AmS-TeX files. See info under AUCTeX for documentation. @@ -337,6 +340,37 @@ of `AmS-TeX-mode-hook'. \(fn)" t nil) +;;;*** + +;;;### (autoloads (TeX-submit-bug-report TeX-auto-generate-global +;;;;;; TeX-auto-generate TeX-tex-mode) "tex" "tex.el" (19399 29115)) +;;; Generated autoloads from tex.el + +(autoload (quote TeX-tex-mode) "tex" "\ +Major mode in AUCTeX for editing TeX or LaTeX files. +Tries to guess whether this file is for plain TeX or LaTeX. + +The algorithm is as follows: + + 1) if the file is empty or `TeX-force-default-mode' is not set to nil, + `TeX-default-mode' is chosen + 2) If \\documentstyle or \\begin{, \\section{, \\part{ or \\chapter{ is + found, `latex-mode' is selected. + 3) Otherwise, use `plain-tex-mode' + +\(fn)" t nil) + +(autoload (quote TeX-auto-generate) "tex" "\ +Generate style file for TEX and store it in AUTO. +If TEX is a directory, generate style files for all files in the directory. + +\(fn TEX AUTO)" t nil) + +(autoload (quote TeX-auto-generate-global) "tex" "\ +Create global auto directory for global TeX macro definitions. + +\(fn)" t nil) + (autoload (quote TeX-submit-bug-report) "tex" "\ Submit a bug report on AUCTeX via mail. @@ -351,7 +385,7 @@ information about your AUCTeX version and AUCTeX configuration. ;;;*** ;;;### (autoloads (LaTeX-install-toolbar TeX-install-toolbar) "tex-bar" -;;;;;; "tex-bar.el" (18348 43827)) +;;;;;; "tex-bar.el" (18580 49499)) ;;; Generated autoloads from tex-bar.el (autoload (quote TeX-install-toolbar) "tex-bar" "\ @@ -366,7 +400,7 @@ Install toolbar buttons for LaTeX mode. ;;;*** -;;;### (autoloads nil "tex-fold" "tex-fold.el" (18341 54637)) +;;;### (autoloads nil "tex-fold" "tex-fold.el" (19227 40177)) ;;; Generated autoloads from tex-fold.el (autoload 'TeX-fold-mode "tex-fold" "Minor mode for hiding and revealing macros and environments." t) @@ -385,8 +419,8 @@ Setup font lock support for TeX. ;;;*** -;;;### (autoloads (TeX-texinfo-mode) "tex-info" "tex-info.el" (18341 -;;;;;; 54636)) +;;;### (autoloads (TeX-texinfo-mode) "tex-info" "tex-info.el" (18903 +;;;;;; 48810)) ;;; Generated autoloads from tex-info.el (defalias (quote Texinfo-mode) (quote texinfo-mode)) @@ -405,7 +439,7 @@ value of `Texinfo-mode-hook'. ;;;*** ;;;### (autoloads (japanese-latex-mode japanese-plain-tex-mode) "tex-jp" -;;;;;; "tex-jp.el" (18341 54636)) +;;;;;; "tex-jp.el" (18768 5174)) ;;; Generated autoloads from tex-jp.el (autoload (quote japanese-plain-tex-mode) "tex-jp" "\ @@ -423,7 +457,7 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'. ;;;*** ;;;### (autoloads (texmathp-match-switch texmathp) "texmathp" "texmathp.el" -;;;;;; (18341 54636)) +;;;;;; (18489 3128)) ;;; Generated autoloads from texmathp.el (autoload (quote texmathp) "texmathp" "\ @@ -443,7 +477,7 @@ Limit searched to BOUND. ;;;*** -;;;### (autoloads nil "toolbar-x" "toolbar-x.el" (18348 43827)) +;;;### (autoloads nil "toolbar-x" "toolbar-x.el" (18580 49487)) ;;; Generated autoloads from toolbar-x.el (autoload 'toolbarx-install-toolbar "toolbar-x")