diff options
author | Norbert Preining <norbert@preining.info> | 2022-01-25 03:01:54 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-01-25 03:01:54 +0000 |
commit | 54e627ff3ae26ebf28688e2cf04b2ed9fb3a393b (patch) | |
tree | 5a2f425ce86bd69fad53eebbef6ad56bff1fc9de /macros/latex/contrib/altsubsup/altsubsup.el | |
parent | 17f5b660e0ce0c5c1b1dc095df8213e078963809 (diff) |
CTAN sync 202201250301
Diffstat (limited to 'macros/latex/contrib/altsubsup/altsubsup.el')
-rw-r--r-- | macros/latex/contrib/altsubsup/altsubsup.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/macros/latex/contrib/altsubsup/altsubsup.el b/macros/latex/contrib/altsubsup/altsubsup.el new file mode 100644 index 0000000000..8d2346bec6 --- /dev/null +++ b/macros/latex/contrib/altsubsup/altsubsup.el @@ -0,0 +1,43 @@ +;;; altsubsup.el --- AUCTeX style for `altsubsup.sty' + +;; Copyright (C) 2022 by Julien Labbé <Julien.Labbe@univ-grenoble-alpes.fr> + +;; This file may be distributed and/or modified under the conditions of the LaTeX +;; Project Public License, either version 1.3 of this license or (at your option) +;; any later version. The latest version of this license is in: +;; http://www.latex-project.org/lppl.txt +;; and version 1.3 or later is part of all distributions of LaTeX version +;; 2005/12/01 or later. + +;;; Commentary: + +;; This file adds support for `altsubsup.sty'. + +;;; Code: + +;; Silence the compiler: + +(TeX-add-style-hook + "altsubsup" + (lambda () + + ;; New symbols + (TeX-add-symbols + "SetAltSubscriptCommand" + "SetAltSuperscriptCommand" + "SetAltSubSupCommands") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (add-hook 'TeX-update-style-hook + (lambda () + (font-lock-add-keywords + nil + (list + '("\\^\\(\\[[^]]*\\]\\)" (1 'font-latex-superscript-face)) + '("_\\(\\[[^]]*\\]\\)" (1 'font-latex-subscript-face)))))))) + +LaTeX-dialect) + +;;; altsubsup.el ends here |