branch: main
commit 2ea05e53a992b87f129810c4fd1132a46f497ec2
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Add new style/lua-unicode-math.el
* NEWS.org (Added): Announce the new style.
* style/lua-unicode-math.el: New file.
---
NEWS.org | 4 +++
style/lua-unicode-math.el | 76 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+)
diff --git a/NEWS.org b/NEWS.org
index 43c96f65..37fa1d09 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -9,6 +9,10 @@
* [Unreleased]
+** Added
+
+- Add new support file =style/lua-unicode-math.el=.
+
** Changed
- Support new language names provided by babel-german v2.99.
diff --git a/style/lua-unicode-math.el b/style/lua-unicode-math.el
new file mode 100644
index 00000000..bb4b3010
--- /dev/null
+++ b/style/lua-unicode-math.el
@@ -0,0 +1,76 @@
+;;; lua-unicode-math.el --- AUCTeX style for `lua-unicode-math' v0.7 -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2026 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <[email protected]>
+;; Maintainer: [email protected]
+;; Created: 2026-02-04
+;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file adds support for `lua-unicode-math.sty' (v0.7) from
+;; 2026-02-03. `lua-unicode-math.sty' is part of TeXlive.
+
+;;; Code:
+
+(require 'tex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords "font-latex" (keywords class))
+
+(TeX-add-style-hook
+ "lua-unicode-math"
+ (lambda ()
+
+ ;; Run only with luatex:
+ (TeX-check-engine-add-engines 'luatex)
+
+ (TeX-add-symbols
+ '("setmathfont"
+ (TeX-arg-completing-read ("Latin Modern Math"
+ "New Computer Modern Math"
+ "New Computer Modern Sans Math"
+ "STIX2"
+ "XITS"
+ "TeX Gyre Pagella Math"
+ "TeX Gyre DejaVu Math"
+ "TeX Gyre Bonum Math"
+ "TeX Gyre Schola Math"
+ "TeX Gyre Termes Math"
+ "Fira Math"
+ "GFS Neohellenic Math"
+ "Erewhon Math"
+ "XCharter Math"
+ "Concrete Math")
+ "Math font name")
+ (TeX-arg-conditional (member "fontspec" (TeX-style-list))
+ ([TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"])
+ (["Font features"]))))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("setmathfont" "[{["))
+ 'function)))
+ TeX-dialect)
+
+(defvar LaTeX-lua-unicode-math-package-options nil
+ "Package options for the lua-unicode-math package.")
+
+;;; lua-unicode-math.el ends here