"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "latex.el" between
auctex-12.2.tar.gz and auctex-12.3.tar.gz

About: AUCTEX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs.

latex.el  (auctex-12.2):latex.el  (auctex-12.3)
;;; latex.el --- Support for LaTeX documents. ;;; latex.el --- Support for LaTeX documents.
;; Copyright (C) 1991, 1993-2019 Free Software Foundation, Inc. ;; Copyright (C) 1991, 1993-2020 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org ;; Maintainer: auctex-devel@gnu.org
;; Keywords: tex ;; Keywords: tex
;; This file is part of AUCTeX. ;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it ;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by ;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option) ;; the Free Software Foundation; either version 3, or (at your option)
;; any later version. ;; any later version.
skipping to change at line 40 skipping to change at line 40
(require 'tex) (require 'tex)
(require 'tex-style) (require 'tex-style)
(require 'tex-ispell) (require 'tex-ispell)
(when (<= 26 emacs-major-version) (when (<= 26 emacs-major-version)
;; latex-flymake requires Emacs 26. ;; latex-flymake requires Emacs 26.
(require 'latex-flymake)) (require 'latex-flymake))
(eval-when-compile (eval-when-compile
(require 'cl-lib)) (require 'cl-lib))
;; Silence the compiler for functions:
(declare-function outline-level "ext:outline"
nil)
(declare-function outline-mark-subtree "ext:outline"
nil)
(declare-function turn-off-filladapt-mode "ext:filladapt"
nil)
;; Silence the compiler for variables:
(defvar outline-heading-alist)
(defvar TeX-auto-file)
(defvar LaTeX-section-list-changed)
;;; Syntax ;;; Syntax
(defvar LaTeX-optop "[" (defvar LaTeX-optop "["
"The LaTeX optional argument opening character.") "The LaTeX optional argument opening character.")
(defvar LaTeX-optcl "]" (defvar LaTeX-optcl "]"
"The LaTeX optional argument closeing character.") "The LaTeX optional argument closeing character.")
;;; Style ;;; Style
skipping to change at line 116 skipping to change at line 129
(modify-syntax-entry (string-to-char LaTeX-optop) (modify-syntax-entry (string-to-char LaTeX-optop)
(concat "(" LaTeX-optcl) (concat "(" LaTeX-optcl)
LaTeX-mode-syntax-table) LaTeX-mode-syntax-table)
(modify-syntax-entry (string-to-char LaTeX-optcl) (modify-syntax-entry (string-to-char LaTeX-optcl)
(concat ")" LaTeX-optop) (concat ")" LaTeX-optop)
LaTeX-mode-syntax-table)) LaTeX-mode-syntax-table))
;;; Sections ;;; Sections
;; Declare dynamically scoped vars. ;; Declare dynamically scoped vars.
(defvar title) ;; N.B.: These forms are commented out since they produce a "lack of
(defvar name) ;; prefix" warning during byte-compilation. This way they produce
(defvar level) ;; only a "reference to free variable" one.
(defvar done-mark) ;; (defvar title)
(defvar toc) ;; (defvar name)
;; (defvar level)
;; (defvar done-mark)
;; (defvar toc)
(defun LaTeX-section (arg) (defun LaTeX-section (arg)
"Insert a template for a LaTeX section. "Insert a template for a LaTeX section.
Determine the type of section to be inserted, by the argument ARG. 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 nil or missing, use the current level.
If ARG is a list (selected by \\[universal-argument]), go downward one level. If ARG is a list (selected by \\[universal-argument]), go downward one level.
If ARG is negative, go up that many levels. If ARG is negative, go up that many levels.
If ARG is positive or zero, use absolute level: If ARG is positive or zero, use absolute level:
skipping to change at line 669 skipping to change at line 685
prefix content-start env-start env-end) prefix content-start env-start env-end)
(when (and active-mark (< (mark) (point))) (exchange-point-and-mark)) (when (and active-mark (< (mark) (point))) (exchange-point-and-mark))
;; Compute the prefix. ;; Compute the prefix.
(when (and LaTeX-insert-into-comments (TeX-in-commented-line)) (when (and LaTeX-insert-into-comments (TeX-in-commented-line))
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(looking-at (looking-at
(concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*")) (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*"))
(setq prefix (match-string 0)))) (setq prefix (match-string 0))))
;; What to do with the line containing point. ;; What to do with the line containing point.
(cond ((save-excursion (beginning-of-line) ;; - Open a new empty line for later insertion of "\begin{foo}" and
;; put the point there.
;; - If there were at first any non-whitespace texts between the
;; point and EOL, send them into their new own line with possible
;; comment prefix.
(cond (;; When the entire line consists of whitespaces except
;; possible prefix...
(save-excursion (beginning-of-line)
(looking-at (concat prefix "[ \t]*$"))) (looking-at (concat prefix "[ \t]*$")))
;; ...make the line empty and put the point there.
(delete-region (match-beginning 0) (match-end 0))) (delete-region (match-beginning 0) (match-end 0)))
((TeX-looking-at-backward (concat "^" prefix "[ \t]*") (;; When there are only whitespaces except possible prefix
;; between the point and BOL (including the case the point
;; is at BOL)...
(TeX-looking-at-backward (if prefix
(concat "^\\(" prefix "\\)?[ \t]*")
"^[ \t]*")
(line-beginning-position)) (line-beginning-position))
;; ...in this case, we have non-whitespace texts between
;; the point and EOL, so send the entire line into a new
;; next line and put the point on the empty line just
;; created.
(beginning-of-line) (beginning-of-line)
(newline) (newline)
(beginning-of-line 0)) (beginning-of-line 0))
((bolp) (;; In all other cases...
(delete-horizontal-space) t
(newline) ;; ...insert a new empty line after deleting all
(beginning-of-line 0)) ;; whitespaces around the point, put the point there...
(t
(delete-horizontal-space) (delete-horizontal-space)
(newline 2) (if (eolp)
(when prefix (insert prefix)) (newline)
(beginning-of-line 0))) ;; ...and if there were at first any non-whitespace texts
;; between (the original position of) the point and EOL,
;; send them into a new next line with possible comment
;; prefix.
(newline 2)
(when prefix (insert prefix))
(beginning-of-line 0))))
;; What to do with the line containing mark. ;; What to do with the line containing mark.
;; If there is active region...
(when active-mark (when active-mark
;; - Open a new empty line for later insertion of "\end{foo}"
;; and put the mark there.
;; - If there were at first any non-whitespace texts between the
;; mark and EOL, pass them over the empty line and put them on
;; their own line with possible comment prefix.
(save-excursion (save-excursion
(goto-char (mark)) (goto-char (mark))
(cond ((save-excursion (beginning-of-line) (cond (;; When the entire line consists of whitespaces except
(or (looking-at (concat prefix "[ \t]*$")) ;; possible prefix...
(looking-at "[ \t]*$"))) (save-excursion (beginning-of-line)
(looking-at
(if prefix
(concat "\\(" prefix "\\)?[ \t]*$")
"[ \t]*$")))
;; ...make the line empty and put the mark there.
(delete-region (match-beginning 0) (match-end 0))) (delete-region (match-beginning 0) (match-end 0)))
((TeX-looking-at-backward (concat "^" prefix "[ \t]*") (;; When there are only whitespaces except possible prefix
;; between the mark and BOL (including the case the mark
;; is at BOL)...
(TeX-looking-at-backward (if prefix
(concat "^\\(" prefix "\\)?[ \t]*")
"^[ \t]*")
(line-beginning-position)) (line-beginning-position))
;; ...in this case, we have non-whitespace texts
;; between the mark and EOL, so send the entire line
;; into a new next line and put the mark on the empty
;; line just created.
(beginning-of-line) (beginning-of-line)
(newline) (set-mark (point))
(beginning-of-line 0)) (newline))
(t (;; In all other cases...
t
;; ...make a new empty line after deleting all
;; whitespaces around the mark, put the mark there...
(delete-horizontal-space) (delete-horizontal-space)
(insert-before-markers "\n") (insert-before-markers "\n")
(newline) ;; ...and if there were at first any non-whitespace
(when prefix (insert prefix)))))) ;; texts between (the original position of) the mark
;; and EOL, send them into a new next line with
;; possible comment prefix.
(unless (eolp)
(newline)
(when prefix (insert prefix)))))))
;; Now insert the environment. ;; Now insert the environment.
(when prefix (insert prefix)) (when prefix (insert prefix))
(setq env-start (point)) (setq env-start (point))
(insert TeX-esc "begin" TeX-grop environment TeX-grcl) (insert TeX-esc "begin" TeX-grop environment TeX-grcl)
(indent-according-to-mode) (indent-according-to-mode)
(when extra (insert extra)) (when extra (insert extra))
(setq content-start (line-beginning-position 2)) (setq content-start (line-beginning-position 2))
(unless active-mark (unless active-mark
(newline) (newline)
(when prefix (insert prefix)) (when prefix (insert prefix))
skipping to change at line 1520 skipping to change at line 1586
(TeX-auto-add-type "pagestyle" "LaTeX") (TeX-auto-add-type "pagestyle" "LaTeX")
(TeX-auto-add-type "counter" "LaTeX") (TeX-auto-add-type "counter" "LaTeX")
(TeX-auto-add-type "length" "LaTeX") (TeX-auto-add-type "length" "LaTeX")
(TeX-auto-add-type "savebox" "LaTeX" "saveboxes") (TeX-auto-add-type "savebox" "LaTeX" "saveboxes")
(defvar LaTeX-auto-minimal-regexp-list (defvar LaTeX-auto-minimal-regexp-list
'(("\\\\document\\(style\\|class\\)\ '(("\\\\document\\(style\\|class\\)\
\\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\ \\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}" {\\([^#\\.\n\r]+?\\)}"
(3 5 1) LaTeX-auto-style) (3 5 1) LaTeX-auto-style)
("\\\\use\\(package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\ ("\\\\use\\(package\\)\\(\\[\\([^]]*\\)\\]\\)?\
{\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}" {\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}"
(3 4 1) LaTeX-auto-style)) (3 4 1) LaTeX-auto-style))
"Minimal list of regular expressions matching LaTeX macro definitions.") "Minimal list of regular expressions matching LaTeX macro definitions.")
(defvar LaTeX-auto-label-regexp-list (defvar LaTeX-auto-label-regexp-list
'(("\\\\label{\\([^\n\r%\\{}]+\\)}" 1 LaTeX-auto-label)) '(("\\\\label{\\([^\n\r%\\{}]+\\)}" 1 LaTeX-auto-label))
"List of regular expression matching LaTeX labels only.") "List of regular expression matching LaTeX labels only.")
(defvar LaTeX-auto-index-regexp-list (defvar LaTeX-auto-index-regexp-list
'(("\\\\\\(index\\|glossary\\){\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]* \\)*}[^}{]*\\)*}[^}{]*\\)*\\)}" '(("\\\\\\(index\\|glossary\\){\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]* \\)*}[^}{]*\\)*}[^}{]*\\)*\\)}"
2 LaTeX-auto-index-entry)) 2 LaTeX-auto-index-entry))
"List of regular expression matching LaTeX index/glossary entries only. "List of regular expression matching LaTeX index/glossary entries only.
Regexp allows for up to 3 levels of parenthesis inside the index argument. Regexp allows for up to 3 levels of parenthesis inside the index argument.
This is necessary since index entries may contain commands and stuff.") This is necessary since index entries may contain commands and stuff.")
(defvar LaTeX-auto-class-regexp-list (defvar LaTeX-auto-class-regexp-list
'(;; \RequirePackage[<options>]{<package>}[<date>] '(;; \RequirePackage[<options>]{<package>}[<date>]
("\\\\Require\\(Package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\ ("\\\\Require\\(Package\\)\\(\\[\\([^]]*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}" {\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style) (3 4 1) LaTeX-auto-style)
;; \RequirePackageWithOptions{<package>}[<date>], ;; \RequirePackageWithOptions{<package>}[<date>],
("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}" ("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style) (2 3 1) LaTeX-auto-style)
;; \LoadClass[<options>]{<package>}[<date>] ;; \LoadClass[<options>]{<package>}[<date>]
("\\\\Load\\(Class\\)\\(\\[\\([^\]\\]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}" ("\\\\Load\\(Class\\)\\(\\[\\([^]]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style) (3 4 1) LaTeX-auto-style)
;; \LoadClassWithOptions{<package>}[<date>] ;; \LoadClassWithOptions{<package>}[<date>]
("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}" ("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style) (2 3 1) LaTeX-auto-style)
;; \DeclareRobustCommand{<cmd>}[<num>][<default>]{<definition>}, ;; \DeclareRobustCommand{<cmd>}[<num>][<default>]{<definition>},
;; \DeclareRobustCommand*{<cmd>}[<num>][<default>]{<definition>} ;; \DeclareRobustCommand*{<cmd>}[<num>][<default>]{<definition>}
("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\ ("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\
\\[\\([0-9]+\\)\\]\\[\\([^\n\r]*?\\)\\]" \\[\\([0-9]+\\)\\]\\[\\([^\n\r]*?\\)\\]"
(1 2 3) LaTeX-auto-optional) (1 2 3) LaTeX-auto-optional)
("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\\[\\([0-9]+\\)\\]" ("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\\[\\([0-9]+\\)\\]"
skipping to change at line 2253 skipping to change at line 2319
OPTIONAL and IGNORE are ignored." OPTIONAL and IGNORE are ignored."
(let* ((TeX-file-extensions '("cls")) (let* ((TeX-file-extensions '("cls"))
(crm-separator ",") (crm-separator ",")
style var options defopt optprmpt) style var options defopt optprmpt)
(unless LaTeX-global-class-files (unless LaTeX-global-class-files
(setq LaTeX-global-class-files (setq LaTeX-global-class-files
(if (if (eq TeX-arg-input-file-search 'ask) (if (if (eq TeX-arg-input-file-search 'ask)
(not (y-or-n-p "Find class yourself? ")) (not (y-or-n-p "Find class yourself? "))
TeX-arg-input-file-search) TeX-arg-input-file-search)
(prog2 (prog2
(message "Searching for LaTeX classes...") (message "Searching for LaTeX classes...")
(TeX-search-files-by-type 'texinputs 'global t t) (TeX-search-files-by-type 'texinputs 'global t t)
(message "Searching for LaTeX classes...done")) (message "Searching for LaTeX classes...done"))
LaTeX-style-list))) LaTeX-style-list)))
(setq style (completing-read (setq style (completing-read
(concat "Document class (default " LaTeX-default-style "): ") (concat "Document class (default " LaTeX-default-style "): ")
LaTeX-global-class-files nil nil nil nil LaTeX-default-style)) LaTeX-global-class-files nil nil nil nil LaTeX-default-style))
;; Clean up hook before use. ;; Clean up hook before use.
(setq TeX-after-document-hook nil) (setq TeX-after-document-hook nil)
(TeX-load-style style) (TeX-load-style style)
(setq var (intern (format "LaTeX-%s-class-options" style))) (setq var (intern (format "LaTeX-%s-class-options" style)))
(setq defopt (if (stringp LaTeX-default-options) (setq defopt (if (stringp LaTeX-default-options)
skipping to change at line 2290 skipping to change at line 2356
nil nil defopt) nil nil defopt)
",")))) ","))))
(setq options (TeX-read-string optprmpt nil nil defopt))) (setq options (TeX-read-string optprmpt nil nil defopt)))
(unless (zerop (length options)) (unless (zerop (length options))
(insert LaTeX-optop options LaTeX-optcl) (insert LaTeX-optop options LaTeX-optcl)
(let ((opts (LaTeX-listify-package-options options))) (let ((opts (LaTeX-listify-package-options options)))
(TeX-add-to-alist 'LaTeX-provided-class-options (TeX-add-to-alist 'LaTeX-provided-class-options
(list (cons style opts))))) (list (cons style opts)))))
(insert TeX-grop style TeX-grcl)) (insert TeX-grop style TeX-grcl))
;; remove old information (TeX-update-style t)
(TeX-remove-style)
;; defined in individual style hooks
(TeX-update-style)
(run-hooks 'TeX-after-document-hook)) (run-hooks 'TeX-after-document-hook))
(defvar LaTeX-after-usepackage-hook nil (defvar LaTeX-after-usepackage-hook nil
"List of functions to be run at the end of `LaTeX-arg-usepackage'. "List of functions to be run at the end of `LaTeX-arg-usepackage'.
To insert a hook here, you must insert it in the appropiate style file.") To insert a hook here, you must insert it in the appropiate style file.")
(defun LaTeX-arg-usepackage-read-packages-with-options () (defun LaTeX-arg-usepackage-read-packages-with-options ()
"Read the packages and the options for the usepackage macro. "Read the packages and the options for the usepackage macro.
skipping to change at line 4482 skipping to change at line 4544
(point-min) (point-min)
(point-max) (point-max)
justify justify
(concat " buffer " (buffer-name))))) (concat " buffer " (buffer-name)))))
;;; Navigation ;;; Navigation
(defvar LaTeX-paragraph-commands-internal (defvar LaTeX-paragraph-commands-internal
'("[" "]" ; display math '("[" "]" ; display math
"appendix" "begin" "caption" "chapter" "end" "include" "includeonly" "appendix" "begin" "caption" "chapter" "end" "include" "includeonly"
"label" "maketitle" "noindent" "par" "paragraph" "part" "section" "label" "maketitle" "newblock" "noindent" "par" "paragraph" "part"
"subsection" "subsubsection" "tableofcontents" "newpage" "clearpage") "section" "subsection" "subsubsection" "tableofcontents"
"newpage" "clearpage")
"Internal list of LaTeX macros that should have their own line.") "Internal list of LaTeX macros that should have their own line.")
(defun LaTeX-paragraph-commands-regexp-make () (defun LaTeX-paragraph-commands-regexp-make ()
"Return a regular expression matching defined paragraph commands. "Return a regular expression matching defined paragraph commands.
Regexp part containing TeX control words is postfixed with `\\b' Regexp part containing TeX control words is postfixed with `\\b'
to avoid ambiguities (e.g. \\par vs. \\parencite)." to avoid ambiguities (e.g. \\par vs. \\parencite)."
(let (cmds symbs) (let (cmds symbs)
(dolist (mac (append LaTeX-paragraph-commands (dolist (mac (append LaTeX-paragraph-commands
LaTeX-paragraph-commands-internal)) LaTeX-paragraph-commands-internal))
(if (string-match "[^a-zA-Z]" mac) (if (string-match "[^a-zA-Z]" mac)
skipping to change at line 5698 skipping to change at line 5761
LaTeX-environment-menu-name))) LaTeX-environment-menu-name)))
,(list LaTeX-environment-modify-menu-name ,(list LaTeX-environment-modify-menu-name
:filter (lambda (ignored) (LaTeX-environment-menu-filter :filter (lambda (ignored) (LaTeX-environment-menu-filter
LaTeX-environment-modify-menu-name))) LaTeX-environment-modify-menu-name)))
["Close Environment" LaTeX-close-environment ["Close Environment" LaTeX-close-environment
:help "Insert the \\end part of the current environment"] :help "Insert the \\end part of the current environment"]
["Item" LaTeX-insert-item ["Item" LaTeX-insert-item
:help "Insert a new \\item into current environment"] :help "Insert a new \\item into current environment"]
"-" "-"
("Insert Font" ("Insert Font"
["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] ["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"] ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"]
["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"]
["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"]
["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"] ["Medium" (TeX-font nil ?\C-m) :keys "C-c C-f C-m"]
["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"]
["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]) "-"
["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"]
["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"]
["Swash" (TeX-font nil ?\C-w) :keys "C-c C-f C-w"]
["Upper Lower" (TeX-font nil ?\C-l) :keys "C-c C-f C-l"]
"-"
["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]
["Normal" (TeX-font nil ?\C-n) :keys "C-c C-f C-n"])
("Replace Font" ("Replace Font"
["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] ["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"] ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"]
["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"]
["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"]
["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"] ["Medium" (TeX-font t ?\C-m) :keys "C-u C-c C-f C-m"]
["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"]
["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]) "-"
["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"]
["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"]
["Swash" (TeX-font t ?\C-w) :keys "C-u C-c C-f C-w"]
["Upper Lower" (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"]
"-"
["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]
["Normal" (TeX-font t ?\C-n) :keys "C-u C-c C-f C-n"])
["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"]
"-" "-"
["Comment or Uncomment Region" ["Comment or Uncomment Region"
comment-or-uncomment-region comment-or-uncomment-region
:help "Make the selected region outcommented or active again"] :help "Make the selected region outcommented or active again"]
["Comment or Uncomment Paragraph" ["Comment or Uncomment Paragraph"
TeX-comment-or-uncomment-paragraph TeX-comment-or-uncomment-paragraph
:help "Make the current paragraph outcommented or active again"] :help "Make the current paragraph outcommented or active again"]
("Formatting and Marking" ("Formatting and Marking"
["Format Environment" LaTeX-fill-environment ["Format Environment" LaTeX-fill-environment
skipping to change at line 5760 skipping to change at line 5839
:visible (member "latex2" (TeX-style-list)) ] :visible (member "latex2" (TeX-style-list)) ]
. ,TeX-common-menu-entries)) . ,TeX-common-menu-entries))
(defcustom LaTeX-font-list (defcustom LaTeX-font-list
'((?\C-a "" "" "\\mathcal{" "}") '((?\C-a "" "" "\\mathcal{" "}")
(?\C-b "\\textbf{" "}" "\\mathbf{" "}") (?\C-b "\\textbf{" "}" "\\mathbf{" "}")
(?\C-c "\\textsc{" "}") (?\C-c "\\textsc{" "}")
(?\C-e "\\emph{" "}") (?\C-e "\\emph{" "}")
(?\C-f "\\textsf{" "}" "\\mathsf{" "}") (?\C-f "\\textsf{" "}" "\\mathsf{" "}")
(?\C-i "\\textit{" "}" "\\mathit{" "}") (?\C-i "\\textit{" "}" "\\mathit{" "}")
(?\C-l "\\textulc{" "}")
(?\C-m "\\textmd{" "}") (?\C-m "\\textmd{" "}")
(?\C-n "\\textnormal{" "}" "\\mathnormal{" "}") (?\C-n "\\textnormal{" "}" "\\mathnormal{" "}")
(?\C-r "\\textrm{" "}" "\\mathrm{" "}") (?\C-r "\\textrm{" "}" "\\mathrm{" "}")
(?\C-s "\\textsl{" "}" "\\mathbb{" "}") (?\C-s "\\textsl{" "}" "\\mathbb{" "}")
(?\C-t "\\texttt{" "}" "\\mathtt{" "}") (?\C-t "\\texttt{" "}" "\\mathtt{" "}")
(?\C-u "\\textup{" "}") (?\C-u "\\textup{" "}")
(?\C-w "\\textsw{" "}")
(?\C-d "" "" t)) (?\C-d "" "" t))
"Font commands used with LaTeX2e. See `TeX-font-list'." "Font commands used with LaTeX2e. See `TeX-font-list'."
:group 'LaTeX-macro :group 'LaTeX-macro
:type '(repeat :type '(repeat
(group (group
:value (?\C-a "" "") :value (?\C-a "" "")
(character :tag "Key") (character :tag "Key")
(string :tag "Prefix") (string :tag "Prefix")
(string :tag "Suffix") (string :tag "Suffix")
(option (group (option (group
:inline t :inline t
(string :tag "Math Prefix") (string :tag "Math Prefix")
(string :tag "Math Suffix"))) (string :tag "Math Suffix")))
(option (sexp :format "Replace\n" :value t))))) (option (sexp :format "Replace\n" :value t)))))
;;; Simple Commands ;;; Simple Commands
(defcustom LaTeX-babel-hyphen "\"=" (defcustom LaTeX-babel-hyphen "\"="
"String to be used when typing `-'. "String to be used when typing `-'.
This usually is a hyphen alternative or hyphenation aid, like This usually is a hyphen alternative or hyphenation aid, like
\"=, \"~ or \"-, provided by babel and the related language style \"=, \"~ or \"-, provided by babel and the related language style
files. files.
Set it to an empty string or nil in order to disable this Set it to an empty string or nil in order to disable this
skipping to change at line 6174 skipping to change at line 6255
'("tabular" LaTeX-env-array) '("tabular" LaTeX-env-array)
'("tabular*" LaTeX-env-tabular*) '("tabular*" LaTeX-env-tabular*)
'("array" LaTeX-env-array) '("array" LaTeX-env-array)
'("eqnarray" LaTeX-env-label) '("eqnarray" LaTeX-env-label)
'("equation" LaTeX-env-label) '("equation" LaTeX-env-label)
'("minipage" LaTeX-env-minipage) '("minipage" LaTeX-env-minipage)
;; The following have no special support, but are included in ;; The following have no special support, but are included in
;; case the auto files are missing. ;; case the auto files are missing.
"sloppypar" "picture" "tabbing" "verbatim" "verbatim*" "sloppypar" "tabbing" "verbatim" "verbatim*"
"flushright" "flushleft" "displaymath" "math" "quote" "quotation" "flushright" "flushleft" "displaymath" "math" "quote" "quotation"
"center" "titlepage" "verse" "eqnarray*" "center" "titlepage" "verse" "eqnarray*"
;; The following are not defined in latex.el, but in a number of ;; The following are not defined in latex.el, but in a number of
;; other style files. I'm to lazy to copy them to all the ;; other style files. I'm to lazy to copy them to all the
;; corresponding .el files right now. ;; corresponding .el files right now.
;; This means that AUCTeX will complete e.g. ;; This means that AUCTeX will complete e.g.
;; ``thebibliography'' in a letter, but I guess we can live with ;; ``thebibliography'' in a letter, but I guess we can live with
;; that. ;; that.
skipping to change at line 6202 skipping to change at line 6283
'("theindex" LaTeX-env-item)) '("theindex" LaTeX-env-item))
;; `latex.ltx' defines `plain' and `empty' pagestyles ;; `latex.ltx' defines `plain' and `empty' pagestyles
(LaTeX-add-pagestyles "plain" "empty") (LaTeX-add-pagestyles "plain" "empty")
;; `latex.ltx' defines the following counters ;; `latex.ltx' defines the following counters
(LaTeX-add-counters "page" "equation" "enumi" "enumii" "enumiii" (LaTeX-add-counters "page" "equation" "enumi" "enumii" "enumiii"
"enumiv" "footnote" "mpfootnote") "enumiv" "footnote" "mpfootnote")
(LaTeX-add-lengths "arraycolsep" "arrayrulewidth" "baselineskip" "baselinestre tch" (LaTeX-add-lengths "arraycolsep" "arrayrulewidth" "baselineskip" "baselinestre tch"
"columnsep" "columnwidth" "doublerulesep" "evensidemargin" "bibindent" "columnsep" "columnwidth" "doublerulesep"
"linewidth" "oddsidemargin" "paperwidth" "paperheight" "evensidemargin" "linewidth" "oddsidemargin" "paperwidth"
"parindent" "parskip" "tabcolsep" "textheight" "textwidth" "paperheight" "parindent" "parskip" "tabcolsep"
"topmargin" "unitlength") "textheight" "textwidth" "topmargin" "unitlength")
(TeX-add-symbols (TeX-add-symbols
'("addtocounter" TeX-arg-counter "Value") '("addtocounter" TeX-arg-counter "Value")
'("alph" TeX-arg-counter) '("alph" TeX-arg-counter)
'("arabic" TeX-arg-counter) '("arabic" TeX-arg-counter)
'("fnsymbol" TeX-arg-counter) '("fnsymbol" TeX-arg-counter)
'("newcounter" TeX-arg-define-counter '("newcounter" TeX-arg-define-counter
[ TeX-arg-counter "Within counter" ]) [ TeX-arg-counter "Within counter" ])
'("roman" TeX-arg-counter) '("roman" TeX-arg-counter)
'("setcounter" TeX-arg-counter "Value") '("setcounter" TeX-arg-counter "Value")
skipping to change at line 6294 skipping to change at line 6375
([ "Item label" ]) ([ "Item label" ])
()) ())
(TeX-arg-literal " ")) (TeX-arg-literal " "))
'("bibitem" [ "Bibitem label" ] TeX-arg-define-cite) '("bibitem" [ "Bibitem label" ] TeX-arg-define-cite)
'("cite" '("cite"
(TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) ()) (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) ())
TeX-arg-cite) TeX-arg-cite)
'("nocite" TeX-arg-cite) '("nocite" TeX-arg-cite)
'("bibliographystyle" TeX-arg-bibstyle) '("bibliographystyle" TeX-arg-bibstyle)
'("bibliography" TeX-arg-bibliography) '("bibliography" TeX-arg-bibliography)
'("newblock" (TeX-arg-literal " "))
'("footnote" '("footnote"
(TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
t) t)
'("footnotetext" '("footnotetext"
(TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)
t) t)
'("footnotemark" '("footnotemark"
(TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)) (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil))
'("newlength" (TeX-arg-define-length "Length macro")) '("newlength" (TeX-arg-define-length "Length macro"))
'("setlength" (TeX-arg-length "Length macro" "\\") '("setlength" (TeX-arg-length "Length macro" "\\")
skipping to change at line 6404 skipping to change at line 6486
"hline" "vline" "cline" "thinlines" "thicklines" "and" "makeindex" "hline" "vline" "cline" "thinlines" "thicklines" "and" "makeindex"
"makeglossary" "reversemarginpar" "normalmarginpar" "makeglossary" "reversemarginpar" "normalmarginpar"
"raggedbottom" "flushbottom" "sloppy" "fussy" "newpage" "raggedbottom" "flushbottom" "sloppy" "fussy" "newpage"
"clearpage" "cleardoublepage" "twocolumn" "onecolumn" "clearpage" "cleardoublepage" "twocolumn" "onecolumn"
"maketitle" "tableofcontents" "listoffigures" "listoftables" "maketitle" "tableofcontents" "listoffigures" "listoftables"
'("tiny" -1) '("scriptsize" -1) '("footnotesize" -1) '("small" -1) '("tiny" -1) '("scriptsize" -1) '("footnotesize" -1) '("small" -1)
'("normalsize" -1) '("large" -1) '("Large" -1) '("LARGE" -1) '("huge" -1) '("normalsize" -1) '("large" -1) '("Large" -1) '("LARGE" -1) '("huge" -1)
'("Huge" -1) '("Huge" -1)
'("oldstylenums" "Numbers") '("oldstylenums" "Numbers")
;; The next macro is provided by LaTeX2e 2020-02-02 release:
'("legacyoldstylenums" "Numbers")
"pounds" "copyright" "pounds" "copyright"
"hfil" "hfill" "vfil" "vfill" "hrulefill" "dotfill" "hfil" "hfill" "vfil" "vfill" "hrulefill" "dotfill"
"indent" "noindent" "today" "indent" "noindent" "today"
"appendix" "appendix"
"dots" "dots"
"makeatletter" "makeatother" "jobname") "makeatletter" "makeatother" "jobname")
(when (string-equal LaTeX-version "2e") (when (string-equal LaTeX-version "2e")
(LaTeX-add-environments (LaTeX-add-environments
'("filecontents" LaTeX-env-contents) '("filecontents" LaTeX-env-contents)
skipping to change at line 6432 skipping to change at line 6516
'("textsuperscript" "Text") '("textsuperscript" "Text")
'("textsubscript" "Text") '("textsubscript" "Text")
'("textcircled" "Text") '("textcircled" "Text")
'("mathring" t) '("mathring" t)
"LaTeXe" "LaTeXe"
"listfiles" "frontmatter" "mainmatter" "backmatter" "listfiles" "frontmatter" "mainmatter" "backmatter"
"textcompwordmark" "textvisiblespace" "textemdash" "textendash" "textcompwordmark" "textvisiblespace" "textemdash" "textendash"
"textexclamdown" "textquestiondown" "textquotedblleft" "textexclamdown" "textquestiondown" "textquotedblleft"
"textquotedblright" "textquoteleft" "textquoteright" "textquotedblright" "textquoteleft" "textquoteright"
"textbullet" "textperiodcentered" "textasteriskcentered"
"textbackslash" "textbar" "textless" "textgreater" "textbackslash" "textbar" "textless" "textgreater"
"textasciicircum" "textasciitilde" "textasciicircum" "textasciitilde"
"textregistered" "texttrademark"
"rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries" ;; With the advent of LaTeX2e release 2020-02-02, all symbols
"itshape" "slshape" "upshape" "scshape" ;; provided by textcomp.sty are available out of the box by the
"eminnershape")) ;; kernel. The next block is moved here from textcomp.el:
'("capitalgrave" 0) ; Type: Accent -- Slot: 0
'("capitalacute" 0) ; Type: Accent -- Slot: 1
'("capitalcircumflex" 0) ; Type: Accent -- Slot: 2
'("capitaltilde" 0) ; Type: Accent -- Slot: 3
'("capitaldieresis" 0) ; Type: Accent -- Slot: 4
'("capitalhungarumlaut" 0) ; Type: Accent -- Slot: 5
'("capitalring" 0) ; Type: Accent -- Slot: 6
'("capitalcaron" 0) ; Type: Accent -- Slot: 7
'("capitalbreve" 0) ; Type: Accent -- Slot: 8
'("capitalmacron" 0) ; Type: Accent -- Slot: 9
'("capitaldotaccent" 0) ; Type: Accent -- Slot: 10
'("textquotestraightbase" 0) ; Type: Symbol -- Slot: 13
'("textquotestraightdblbase" 0) ; Type: Symbol -- Slot: 18
'("texttwelveudash" 0) ; Type: Symbol -- Slot: 21
'("textthreequartersemdash" 0) ; Type: Symbol -- Slot: 22
'("textcapitalcompwordmark" 0) ; Type: Symbol -- Slot: 23
'("textleftarrow" 0) ; Type: Symbol -- Slot: 24
'("textrightarrow" 0) ; Type: Symbol -- Slot: 25
'("t" 0) ; Type: Accent -- Slot: 26
'("capitaltie" 0) ; Type: Accent -- Slot: 27
'("newtie" 0) ; Type: Accent -- Slot: 28
'("capitalnewtie" 0) ; Type: Accent -- Slot: 29
'("textascendercompwordmark" 0) ; Type: Symbol -- Slot: 31
'("textblank" 0) ; Type: Symbol -- Slot: 32
'("textdollar" 0) ; Type: Symbol -- Slot: 36
'("textquotesingle" 0) ; Type: Symbol -- Slot: 39
'("textasteriskcentered" 0) ; Type: Symbol -- Slot: 42
'("textdblhyphen" 0) ; Type: Symbol -- Slot: 45
'("textfractionsolidus" 0) ; Type: Symbol -- Slot: 47
'("textzerooldstyle" 0) ; Type: Symbol -- Slot: 48
'("textoneoldstyle" 0) ; Type: Symbol -- Slot: 49
'("texttwooldstyle" 0) ; Type: Symbol -- Slot: 50
'("textthreeoldstyle" 0) ; Type: Symbol -- Slot: 51
'("textfouroldstyle" 0) ; Type: Symbol -- Slot: 52
'("textfiveoldstyle" 0) ; Type: Symbol -- Slot: 53
'("textsixoldstyle" 0) ; Type: Symbol -- Slot: 54
'("textsevenoldstyle" 0) ; Type: Symbol -- Slot: 55
'("texteightoldstyle" 0) ; Type: Symbol -- Slot: 56
'("textnineoldstyle" 0) ; Type: Symbol -- Slot: 57
'("textlangle" 0) ; Type: Symbol -- Slot: 60
'("textminus" 0) ; Type: Symbol -- Slot: 61
'("textrangle" 0) ; Type: Symbol -- Slot: 62
'("textmho" 0) ; Type: Symbol -- Slot: 77
'("textbigcircle" 0) ; Type: Symbol -- Slot: 79
'("textohm" 0) ; Type: Symbol -- Slot: 87
'("textlbrackdbl" 0) ; Type: Symbol -- Slot: 91
'("textrbrackdbl" 0) ; Type: Symbol -- Slot: 93
'("textuparrow" 0) ; Type: Symbol -- Slot: 94
'("textdownarrow" 0) ; Type: Symbol -- Slot: 95
'("textasciigrave" 0) ; Type: Symbol -- Slot: 96
'("textborn" 0) ; Type: Symbol -- Slot: 98
'("textdivorced" 0) ; Type: Symbol -- Slot: 99
'("textdied" 0) ; Type: Symbol -- Slot: 100
'("textleaf" 0) ; Type: Symbol -- Slot: 108
'("textmarried" 0) ; Type: Symbol -- Slot: 109
'("textmusicalnote" 0) ; Type: Symbol -- Slot: 110
'("texttildelow" 0) ; Type: Symbol -- Slot: 126
'("textdblhyphenchar" 0) ; Type: Symbol -- Slot: 127
'("textasciibreve" 0) ; Type: Symbol -- Slot: 128
'("textasciicaron" 0) ; Type: Symbol -- Slot: 129
'("textacutedbl" 0) ; Type: Symbol -- Slot: 130
'("textgravedbl" 0) ; Type: Symbol -- Slot: 131
'("textdagger" 0) ; Type: Symbol -- Slot: 132
'("textdaggerdbl" 0) ; Type: Symbol -- Slot: 133
'("textbardbl" 0) ; Type: Symbol -- Slot: 134
'("textperthousand" 0) ; Type: Symbol -- Slot: 135
'("textbullet" 0) ; Type: Symbol -- Slot: 136
'("textcelsius" 0) ; Type: Symbol -- Slot: 137
'("textdollaroldstyle" 0) ; Type: Symbol -- Slot: 138
'("textcentoldstyle" 0) ; Type: Symbol -- Slot: 139
'("textflorin" 0) ; Type: Symbol -- Slot: 140
'("textcolonmonetary" 0) ; Type: Symbol -- Slot: 141
'("textwon" 0) ; Type: Symbol -- Slot: 142
'("textnaira" 0) ; Type: Symbol -- Slot: 143
'("textguarani" 0) ; Type: Symbol -- Slot: 144
'("textpeso" 0) ; Type: Symbol -- Slot: 145
'("textlira" 0) ; Type: Symbol -- Slot: 146
'("textrecipe" 0) ; Type: Symbol -- Slot: 147
'("textinterrobang" 0) ; Type: Symbol -- Slot: 148
'("textinterrobangdown" 0) ; Type: Symbol -- Slot: 149
'("textdong" 0) ; Type: Symbol -- Slot: 150
'("texttrademark" 0) ; Type: Symbol -- Slot: 151
'("textpertenthousand" 0) ; Type: Symbol -- Slot: 152
'("textpilcrow" 0) ; Type: Symbol -- Slot: 153
'("textbaht" 0) ; Type: Symbol -- Slot: 154
'("textnumero" 0) ; Type: Symbol -- Slot: 155
'("textdiscount" 0) ; Type: Symbol -- Slot: 156
'("textestimated" 0) ; Type: Symbol -- Slot: 157
'("textopenbullet" 0) ; Type: Symbol -- Slot: 158
'("textservicemark" 0) ; Type: Symbol -- Slot: 159
'("textlquill" 0) ; Type: Symbol -- Slot: 160
'("textrquill" 0) ; Type: Symbol -- Slot: 161
'("textcent" 0) ; Type: Symbol -- Slot: 162
'("textsterling" 0) ; Type: Symbol -- Slot: 163
'("textcurrency" 0) ; Type: Symbol -- Slot: 164
'("textyen" 0) ; Type: Symbol -- Slot: 165
'("textbrokenbar" 0) ; Type: Symbol -- Slot: 166
'("textsection" 0) ; Type: Symbol -- Slot: 167
'("textasciidieresis" 0) ; Type: Symbol -- Slot: 168
'("textcopyright" 0) ; Type: Symbol -- Slot: 169
'("textordfeminine" 0) ; Type: Symbol -- Slot: 170
'("textcopyleft" 0) ; Type: Symbol -- Slot: 171
'("textlnot" 0) ; Type: Symbol -- Slot: 172
'("textcircledP" 0) ; Type: Symbol -- Slot: 173
'("textregistered" 0) ; Type: Symbol -- Slot: 174
'("textasciimacron" 0) ; Type: Symbol -- Slot: 175
'("textdegree" 0) ; Type: Symbol -- Slot: 176
'("textpm" 0) ; Type: Symbol -- Slot: 177
'("texttwosuperior" 0) ; Type: Symbol -- Slot: 178
'("textthreesuperior" 0) ; Type: Symbol -- Slot: 179
'("textasciiacute" 0) ; Type: Symbol -- Slot: 180
'("textmu" 0) ; Type: Symbol -- Slot: 181
'("textparagraph" 0) ; Type: Symbol -- Slot: 182
'("textperiodcentered" 0) ; Type: Symbol -- Slot: 183
'("textreferencemark" 0) ; Type: Symbol -- Slot: 184
'("textonesuperior" 0) ; Type: Symbol -- Slot: 185
'("textordmasculine" 0) ; Type: Symbol -- Slot: 186
'("textsurd" 0) ; Type: Symbol -- Slot: 187
'("textonequarter" 0) ; Type: Symbol -- Slot: 188
'("textonehalf" 0) ; Type: Symbol -- Slot: 189
'("textthreequarters" 0) ; Type: Symbol -- Slot: 190
'("texteuro" 0) ; Type: Symbol -- Slot: 191
'("texttimes" 0) ; Type: Symbol -- Slot: 214
'("textdiv" 0) ; Type: Symbol -- Slot: 246
'("textcircled" 1) ; Type: Command -- Slot: N/A
'("capitalcedilla" 1) ; Type: Command -- Slot: N/A
'("capitalogonek" 1) ; Type: Command -- Slot: N/A
"rmfamily" "sffamily" "ttfamily"
'("mdseries" -1) '("bfseries" -1)
'("itshape" -1) '("slshape" -1)
'("upshape" -1) '("scshape" -1)
'("eminnershape" -1)
;; The next 3 were added to LaTeX kernel with 2020-02-02 release:
'("sscshape" -1) '("swshape" -1) '("ulcshape" -1)
;; These are for the default settings:
"sscdefault" "swdefault" "ulcdefault"
;; This macro is for `spaced small caps'. Currently, only some
;; commercial fonts offer this. It should be moved into
;; `LaTeX-font-list' once it is needed more frequently.
'("textssc" t)
;; User level reset macros:
'("normalfont" -1) '("normalshape" -1)))
(TeX-run-style-hooks "LATEX") (TeX-run-style-hooks "LATEX")
(make-local-variable 'TeX-font-list) (make-local-variable 'TeX-font-list)
(make-local-variable 'TeX-font-replace-function) (make-local-variable 'TeX-font-replace-function)
(if (string-equal LaTeX-version "2") (if (string-equal LaTeX-version "2")
() ()
(setq TeX-font-list LaTeX-font-list) (setq TeX-font-list LaTeX-font-list)
(setq TeX-font-replace-function 'TeX-font-replace-macro) (setq TeX-font-replace-function 'TeX-font-replace-macro)
(TeX-add-symbols (TeX-add-symbols
skipping to change at line 6584 skipping to change at line 6810
"Built in options for LaTeX standard styles.") "Built in options for LaTeX standard styles.")
(defun LaTeX-209-to-2e () (defun LaTeX-209-to-2e ()
"Make a stab at changing 2.09 doc header to 2e style." "Make a stab at changing 2.09 doc header to 2e style."
(interactive) (interactive)
(TeX-home-buffer) (TeX-home-buffer)
(let (optstr optlist 2eoptlist 2epackages docline docstyle) (let (optstr optlist 2eoptlist 2epackages docline docstyle)
(goto-char (point-min)) (goto-char (point-min))
(if (if
(search-forward-regexp (search-forward-regexp
"\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}" "\\\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}"
(point-max) t) (point-max) t)
(setq optstr (TeX-match-buffer 1) (setq optstr (TeX-match-buffer 1)
docstyle (TeX-match-buffer 2) docstyle (TeX-match-buffer 2)
optlist (TeX-split-string "," optstr)) optlist (TeX-split-string "," optstr))
(if (search-forward-regexp (if (search-forward-regexp
"\\documentstyle{\\([^}]*\\)}" "\\\\documentstyle{\\([^}]*\\)}"
(point-max) t) (point-max) t)
(setq docstyle (TeX-match-buffer 1)) (setq docstyle (TeX-match-buffer 1))
(error "No documentstyle defined"))) (error "No documentstyle defined")))
(beginning-of-line 1) (beginning-of-line 1)
(setq docline (point)) (setq docline (point))
(insert "%%%") (insert "%%%")
(while optlist (while optlist
(if (member (car optlist) LaTeX-builtin-opts) (if (member (car optlist) LaTeX-builtin-opts)
(setq 2eoptlist (cons (car optlist) 2eoptlist)) (setq 2eoptlist (cons (car optlist) 2eoptlist))
(setq 2epackages (cons (car optlist) 2epackages))) (setq 2epackages (cons (car optlist) 2epackages)))
skipping to change at line 6616 skipping to change at line 6842
(if 2eoptlist (if 2eoptlist
(insert "[" (insert "["
(mapconcat (lambda (x) x) (mapconcat (lambda (x) x)
(nreverse 2eoptlist) ",") "]")) (nreverse 2eoptlist) ",") "]"))
(insert "{" docstyle "}\n") (insert "{" docstyle "}\n")
(if 2epackages (if 2epackages
(insert "\\usepackage{" (insert "\\usepackage{"
(mapconcat (lambda (x) x) (mapconcat (lambda (x) x)
(nreverse 2epackages) "}\n\\usepackage{") "}\n")) (nreverse 2epackages) "}\n\\usepackage{") "}\n"))
(if (equal docstyle "slides") (if (equal docstyle "slides")
(progn (progn
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "\\\\blackandwhite{" nil t) (while (re-search-forward "\\\\blackandwhite{" nil t)
(replace-match "\\\\input{" nil nil))))) (replace-match "\\\\input{" nil nil)))))
(TeX-normal-mode nil)) (TeX-normal-mode nil))
(defun LaTeX-env-beginning-pos-col () (defun LaTeX-env-beginning-pos-col ()
"Return a cons: (POINT . COLUMN) for current environment's beginning." "Return a cons: (POINT . COLUMN) for current environment's beginning."
(save-excursion (save-excursion
(LaTeX-find-matching-begin) (LaTeX-find-matching-begin)
(cons (point) (current-column)))) (cons (point) (current-column))))
(defun LaTeX-hanging-ampersand-position () (defun LaTeX-hanging-ampersand-position ()
"Return indent column for a hanging ampersand (i.e. ^\\s-*&)." "Return indent column for a hanging ampersand (i.e. ^\\s-*&)."
 End of changes. 36 change blocks. 
81 lines changed or deleted 307 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)