2022-08-25 17:42:37 +00:00
|
|
|
|
;;; fontaxes.el --- AUCTeX style for `fontaxes.sty' version v1.0d -*- lexical-binding: t; -*-
|
|
|
|
|
|
2023-07-27 19:52:58 +00:00
|
|
|
|
;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
|
2022-08-25 17:42:37 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Arash Esbati <arash@gnu.org>
|
|
|
|
|
;; Maintainer: auctex-devel@gnu.org
|
|
|
|
|
;; Created: 2014-10-12
|
|
|
|
|
;; 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 `fontaxes.sty' version v1.0d from
|
|
|
|
|
;; 2014/03/23. `fontaxes.sty' is part of TeXLive.
|
|
|
|
|
|
|
|
|
|
;; Thanks to Mos<6F> Giordano for his perceptive comments on
|
|
|
|
|
;; implementation of "figureversion".
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(require 'tex)
|
|
|
|
|
|
|
|
|
|
;; Silence the compiler:
|
|
|
|
|
(declare-function font-latex-add-keywords
|
|
|
|
|
"font-latex"
|
|
|
|
|
(keywords class))
|
|
|
|
|
|
|
|
|
|
(TeX-add-style-hook
|
|
|
|
|
"fontaxes"
|
|
|
|
|
(lambda ()
|
|
|
|
|
(TeX-add-symbols
|
|
|
|
|
;; Various font shapes:
|
|
|
|
|
;; These macros are now part of LaTeX kernel 2020-02-02
|
|
|
|
|
;; '("swshape" -1) ; swash shape
|
|
|
|
|
;; '("sscshape" -1) ; spaced small caps
|
|
|
|
|
;; '("swdefault" 0)
|
|
|
|
|
;; '("sscdefault" 0)
|
|
|
|
|
;; '("ulcdefault" 0)
|
|
|
|
|
'("fontprimaryshape" t)
|
|
|
|
|
'("fontsecondaryshape" t)
|
|
|
|
|
|
|
|
|
|
;; Figure versions
|
|
|
|
|
'("figureversion"
|
2023-07-27 19:52:58 +00:00
|
|
|
|
(TeX-arg-completing-read-multiple ("text" "osf"
|
|
|
|
|
"lining" "lf"
|
|
|
|
|
"tabular" "tab"
|
|
|
|
|
"proportional" "prop")
|
|
|
|
|
"Style, alignment"))
|
2022-08-25 17:42:37 +00:00
|
|
|
|
'("txfigures" -1) ; style: text figures (osf)
|
|
|
|
|
'("lnfigures" -1) ; style: lining figures
|
|
|
|
|
'("tbfigures" -1) ; alignment: tabular figures
|
|
|
|
|
'("prfigures" -1) ; alignment: proportional figures
|
|
|
|
|
'("fontfigurestyle"
|
2023-07-27 19:52:58 +00:00
|
|
|
|
(TeX-arg-completing-read ("text" "lining") "Style"))
|
2022-08-25 17:42:37 +00:00
|
|
|
|
'("fontfigurealignment"
|
2023-07-27 19:52:58 +00:00
|
|
|
|
(TeX-arg-completing-read ("tabular" "proportional") "Alignment"))
|
2022-08-25 17:42:37 +00:00
|
|
|
|
'("fontbasefamily" t)
|
|
|
|
|
|
|
|
|
|
;; Math versions
|
|
|
|
|
'("boldmath" -1) ; math weight
|
|
|
|
|
'("unboldmath" -1) ;
|
|
|
|
|
'("tabularmath" -1) ; math figure alignment
|
|
|
|
|
'("proportionalmath" -1) ;
|
|
|
|
|
'("mathweight"
|
2023-07-27 19:52:58 +00:00
|
|
|
|
(TeX-arg-completing-read ("bold" "normal") "Math weight"))
|
2022-08-25 17:42:37 +00:00
|
|
|
|
'("mathfigurealignment"
|
2023-07-27 19:52:58 +00:00
|
|
|
|
(TeX-arg-completing-read ("tabular" "proportional") "Math figure alignment"))
|
2022-08-25 17:42:37 +00:00
|
|
|
|
|
|
|
|
|
;; Additional commands
|
|
|
|
|
;; These macros are now part of LaTeX kernel 2020-02-02
|
|
|
|
|
;; '("textsw" t)
|
|
|
|
|
;; '("textssc" t)
|
|
|
|
|
;; '("textulc" t)
|
|
|
|
|
'("textfigures" t)
|
|
|
|
|
'("liningfigures" t)
|
|
|
|
|
'("tabularfigures" t)
|
|
|
|
|
'("proportionalfigures" t))
|
|
|
|
|
|
|
|
|
|
;; Fontification
|
|
|
|
|
(when (and (featurep 'font-latex)
|
|
|
|
|
(eq TeX-install-font-lock 'font-latex-setup))
|
|
|
|
|
(font-latex-add-keywords '(("textfigures" "{")
|
|
|
|
|
("liningfigures" "{")
|
|
|
|
|
("tabularfigures" "{")
|
|
|
|
|
("proportionalfigures" "{"))
|
|
|
|
|
'type-command)
|
|
|
|
|
(font-latex-add-keywords '(("figureversion" "{"))
|
|
|
|
|
'variable)))
|
|
|
|
|
TeX-dialect)
|
|
|
|
|
|
|
|
|
|
(defvar LaTeX-fontaxes-package-options nil
|
|
|
|
|
"Package options for the fontaxes package.")
|
|
|
|
|
|
|
|
|
|
;;; fontaxes.el ends here
|