[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ae2922ce76 14/23: Update style/amsart.el
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex ae2922ce76 14/23: Update style/amsart.el |
Date: |
Thu, 20 Oct 2022 14:53:22 -0400 (EDT) |
branch: externals/auctex
commit ae2922ce76f8b068e8d036117094bc07ed95674a
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Update style/amsart.el
* style/amsart.el: Add missing header.
(LaTeX-amsart-class-options): New variable.
("amsart"): Update the style hook for the macros provided by the
class.
---
style/amsart.el | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 105 insertions(+), 4 deletions(-)
diff --git a/style/amsart.el b/style/amsart.el
index 7f93f1af3f..67a587a49e 100644
--- a/style/amsart.el
+++ b/style/amsart.el
@@ -1,16 +1,117 @@
;;; amsart.el --- Style hook for the AMS-LaTeX article document class. -*-
lexical-binding: t; -*-
+;; Copyright (C) 1994-2022 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 1994-01-05
+;; 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.
+
;;; Code:
(require 'tex)
(require 'latex)
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+(declare-function font-latex-set-syntactic-keywords
+ "font-latex")
+
+(defvar LaTeX-amsart-class-options
+ '("a4paper" "letterpaper" "landscape" "portrait"
+ "twoside" "oneside" "draft" "final"
+ "8pt" "9pt" "10pt" "11pt" "12pt"
+ "titlepage" "notitlepage" "onecolumn" "twocolumn"
+ "leqno" "reqno" "centertags" "tbtags" "fleqn"
+ "nomath" "noamsfonts" "psamsfonts")
+ "Class options for the amsart class.")
+
(TeX-add-style-hook
"amsart"
- (function
- (lambda ()
- (TeX-run-style-hooks "amsmath" "amsthm")
- (LaTeX-add-environments "abstract")))
+ (lambda ()
+
+ ;; Load amsmath.el if the option nomath isn't given:
+ (unless (LaTeX-provided-class-options-member "amsart" "nomath")
+ (TeX-run-style-hooks "amsmath"))
+ ;; Same for amsfonts.el:
+ (unless (LaTeX-provided-class-options-member "amsart" "noamsfonts")
+ (TeX-run-style-hooks "amsfonts"))
+ ;; amsthm is built-in:
+ (TeX-run-style-hooks "amsthm")
+
+ (TeX-add-symbols
+ '("address" 1)
+ '("author" ["Short author(s)"] (LaTeX-arg-author "Long author(s)"))
+ '("curraddr" 1)
+ '("dedicatory" 1)
+ '("email" 1)
+ '("keywords" 1)
+ '("subjclass" ["Year"] "List of subjects")
+ '("title" ["Short Title"] "Title")
+ '("urladdr" 1))
+
+ (LaTeX-add-environments "abstract")
+
+ (LaTeX-largest-level-set "section")
+ (LaTeX-add-counters "part" "section" "subsection" "subsubsection"
+ "paragraph" "subparagraph"
+ "figure" "table")
+ (LaTeX-add-pagestyles "headings" "myheadings")
+
+ ;; Tell AUCTeX about \specialsection:
+ (LaTeX-section-list-add-locally '("specialsection" 2))
+ (LaTeX-paragraph-commands-add-locally "specialsection")
+ (add-to-list (make-local-variable 'LaTeX-section-label)
+ '("specialsection" . "sec:")
+ t)
+
+ ;; Tell RefTeX about \specialsection and append the entry to
+ ;; `reftex-section-levels':
+ (when (boundp 'reftex-section-levels)
+ (add-to-list (make-local-variable 'reftex-section-levels)
+ '("specialsection" . 2)
+ t))
+
+ ;; These macros will contain links etc., so treat the argument
+ ;; verbatim:
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "email")
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "urladdr")
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("author" "[{")
+ ("contrib" "[{")
+ ("curraddr" "{")
+ ("dedicatory" "{")
+ ("keywords" "{")
+ ("subjclass" "[{")
+ ("title" "[{")
+ ("email" "")
+ ("urladdr" ""))
+ 'textual)
+ (font-latex-add-keywords '(("specialsection" "{"))
+ 'sectioning-2)
+ (font-latex-set-syntactic-keywords)))
TeX-dialect)
;;; amsart.el ends here.
- [elpa] externals/auctex 567458f54f 07/23: Silence byte-compiler., (continued)
- [elpa] externals/auctex 567458f54f 07/23: Silence byte-compiler., Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 6b5f00bfac 01/23: Unquote lambdas in font-latex.el & tex-bar.el; add some FIXMEs, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 99470f080d 06/23: Close over list-strings from outer scope., Tassilo Horn, 2022/10/20
- [elpa] externals/auctex d22387d0d2 23/23: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 4a843073c5 22/23: Don't use `eval' on code, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 1e2e097106 12/23: * style/l3doc.el ("l3doc"): Fix entry for the "env" macro., Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 9fc41106dc 17/23: Add new style/parskip.el, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 4c26ef9b0b 21/23: ; Delete ineffective string escapes, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 07a8a3cf98 13/23: ; Use `TeX-dialect' in style/tcolorboxlib-theorems.el, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 1e59481512 18/23: Improve interaction between fancyvrb.el and fvextra.el, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex ae2922ce76 14/23: Update style/amsart.el,
Tassilo Horn <=
- [elpa] externals/auctex b302fdce1d 20/23: Add missing argument for `TeX-argument-prompt', Tassilo Horn, 2022/10/20
- [elpa] externals/auctex 4004dc6b8f 09/23: Simplify the function `LaTeX-array-update-column-letters', Tassilo Horn, 2022/10/20
- [elpa] externals/auctex e2ce8ae4db 19/23: Improve style/fvextra.el, Tassilo Horn, 2022/10/20
- [elpa] externals/auctex d58f4fdd7e 05/23: Don't use RESULT arg of dolist., Tassilo Horn, 2022/10/20