branch: master commit c64c8a26eb45414f2774d8c3b63bd320564c75a0 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Add support for wasysym package * latex.el (LaTeX-math-menu): Add "Wasysym" to the list. (LaTeX-math-default): Support math symbols provided by the wasysym package. * Makefile.in (STYLESRC): Add new style. * style/wasysym.el: New file containing only text symbols. --- Makefile.in | 1 + latex.el | 23 ++++++- style/wasysym.el | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0ffc9dc8..ef64fff5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -197,6 +197,7 @@ STYLESRC = style/prosper.el \ style/proc.el style/microtype.el style/tcolorboxlib-theorems.el \ style/amsaddr.el style/parskip.el style/catchfilebetweentags.el \ style/physics.el style/soul.el style/algpseudocodex.el + style/wasysym.el STYLEELC = $(STYLESRC:.el=.elc) diff --git a/latex.el b/latex.el index 8d95440a..cf2518b2 100644 --- a/latex.el +++ b/latex.el @@ -5696,7 +5696,7 @@ use \\[customize]." '("Math" ("Greek Uppercase") ("Greek Lowercase") ("Binary Op") ("Relational") ("Arrows") ("Punctuation") ("Misc Symbol") ("Var Symbol") ("Log-like") - ("Delimiters") ("Constructs") ("Accents") ("AMS")) + ("Delimiters") ("Constructs") ("Accents") ("AMS") ("Wasysym")) "Menu containing LaTeX math commands. The menu entries will be generated dynamically, but you can specify the sequence by initializing this variable.") @@ -6223,7 +6223,26 @@ the sequence by initializing this variable.") (nil "intertext" ("AMS" "Special")) (nil "substack" ("AMS" "Special")) (nil "subarray" ("AMS" "Special")) - (nil "sideset" ("AMS" "Special"))) + (nil "sideset" ("AMS" "Special")) + ;; Wasysym symbols: + (nil "lhd" ("Wasysym" "Binary Op") 9665) ;; #X22C1 + (nil "LHD" ("Wasysym" "Binary Op") 9664) ;; #X25C0 + (nil "ocircle" ("Wasysym" "Binary Op") 9675) ;; #X25CB + (nil "rhd" ("Wasysym" "Binary Op") 9655) ;; #X25B7 + (nil "RHD" ("Wasysym" "Binary Op") 9654) ;; #X25B6 + (nil "unlhd" ("Wasysym" "Binary Op") 8884) ;; #X22B4 + (nil "unrhd" ("Wasysym" "Binary Op") 8885) ;; #X22B5 + (nil "apprle" ("Wasysym" "Relational") 8818) ;; #X2272 + (nil "apprge" ("Wasysym" "Relational") 8819) ;; #X2273 + (nil "invneg" ("Wasysym" "Relational") 8976) ;; #X2310 + (nil "Join" ("Wasysym" "Relational") 10781) ;; #X2A1D + (nil "leadsto" ("Wasysym" "Relational") 10547) ;; #X2933 + (nil "sqsubset" ("Wasysym" "Relational") 8847) ;; #X228f + (nil "sqsupset" ("Wasysym" "Relational") 8848) ;; #X2290 + (nil "wasypropto" ("Wasysym" "Relational") 8733) ;; #X221D + (nil "Box" ("Wasysym" "Misc Symbol") 9633) ;; #X25A1 + (nil "Diamond" ("Wasysym" "Misc Symbol") 9671) ;; #X25C7 + (nil "logof" ("Wasysym" "Misc Symbol"))) "Alist of LaTeX math symbols. Each entry should be a list with upto four elements, KEY, VALUE, diff --git a/style/wasysym.el b/style/wasysym.el new file mode 100644 index 00000000..8ac47d9d --- /dev/null +++ b/style/wasysym.el @@ -0,0 +1,184 @@ +;;; wasysym.el --- AUCTeX style for `wasysym.sty' (v2.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; Author: Arash Esbati <ar...@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2023-05-02 +;; 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 `wasysym.sty' (v2.4) from 2020/01/19. + +;;; Code: + +(TeX-add-style-hook + "wasysym" + (lambda () + (TeX-add-symbols + ;; General symbols + "male" + "female" + "cent" + "wasyeuro" + "currency" + "phone" + "recorder" + "clock" + "lightning" + "diameter" + "invdiameter" + "varangle" + "wasylozenge" + "kreuz" + "smiley" + "frownie" + "blacksmiley" + "sun" + "checked" + "bell" + "ataribox" + "permil" + "brokenvert" + "wasytherefore" + "Bowtie" + "agemO" + "wasyparagraph" + "Paragraph" + "wasycmd" + "applecmd" + + ;; Electrical and physical symbols + "AC" + "HF" + "VHF" + "photon" + "gluon" + + ;; Polygons and stars + "Square" + "XBox" + "CheckedBox" + "hexagon" + "varhexagon" + "pentagon" + "octagon" + "hexstar" + "varhexstar" + "davidsstar" + + ;; Music notes + "eighthnote" + "quarternote" + "halfnote" + "fullnote" + "twonotes" + + ;; Various circles + "Circle" + "CIRCLE" + "Leftcircle" + "LEFTCIRCLE" + "Rightcircle" + "RIGHTCIRCLE" + "LEFTcircle" + "RIGHTcircle" + "leftturn" + "rightturn" + + ;; Arrows + "pointer" + "RIGHTarrow" + "LEFTarrow" + "UParrow" + "DOWNarrow" + + ;; Phonetic symbols + "thorn" + "Thorn" + "openo" + "inve" + + ;; Astronomical symbols + "vernal" + "ascnode" + "descnode" + "fullmoon" + "newmoon" + "leftmoon" + "rightmoon" + "astrosun" + "mercury" + "venus" + "earth" + "mars" + "jupiter" + "saturn" + "uranus" + "neptune" + "pluto" + + ;; Astrological symbols and the zodiacal symbols + "aries" + "taurus" + "gemini" + "cancer" + "leo" + "virgo" + "libra" + "scorpio" + "sagittarius" + "capricornus" + "aquarius" + "pisces" + "conjunction" + "opposition" + + ;; APL symbols + "APLstar" + "APLlog" + "APLbox" + "APLup" + "APLdown" + "APLinput" + "APLcomment" + "APLinv" + "APLuparrowbox" + "APLdownarrowbox" + "APLleftarrowbox" + "APLrightarrowbox" + "notbackslash" + "notslash" + "APLnot" + "APLvert" + "APLcirc" + "APLminus") + + ;; \euro is available unless `noeuro' option is specified: + (unless (LaTeX-provided-package-options-member "wasysym" "noeuro") + (TeX-add-symbols "euro"))) + TeX-dialect) + +(defvar LaTeX-wasysym-package-options + '("integrals" "nointegrals" "compat1" "noeuro") + "Package options for the wasysym package.") + +;;; wasysym.el ends here