Debian Codegraph @

texmf-dist/doc/latex/altsubsup/altsubsup.el

raw
1 ;;; altsubsup.el --- AUCTeX style for `altsubsup.sty'
2
3 ;; Copyright (C) 2022 by Julien LabbĂ© <[email protected]>
4
5 ;; This file may be distributed and/or modified under the conditions of the LaTeX
6 ;; Project Public License, either version 1.3 of this license or (at your option)
7 ;; any later version. The latest version of this license is in:
8 ;; http://www.latex-project.org/lppl.txt
9 ;; and version 1.3 or later is part of all distributions of LaTeX version
10 ;; 2005/12/01 or later.
11
12 ;;; Commentary:
13
14 ;; This file adds support for `altsubsup.sty'.
15
16 ;;; Code:
17
18 ;; Silence the compiler:
19
20 (TeX-add-style-hook
21 "altsubsup"
22 (lambda ()
23
24 ;; New symbols
25 (TeX-add-symbols
26 "SetAltSubscriptCommand"
27 "SetAltSuperscriptCommand"
28 "SetAltSubSupCommands")
29
30 ;; Fontification
31 (when (and (featurep 'font-latex)
32 (eq TeX-install-font-lock 'font-latex-setup))
33 (add-hook 'TeX-update-style-hook
34 (lambda ()
35 (font-lock-add-keywords
36 nil
37 (list
38 '("\\^\\(\\[[^]]*\\]\\)" (1 'font-latex-superscript-face))
39 '("_\\(\\[[^]]*\\]\\)" (1 'font-latex-subscript-face))))))))
40
41 LaTeX-dialect)
42
43 ;;; altsubsup.el ends here