Extend prettify-symbols-alist in TeX mode

* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
further math symbols, quotes and fractions.  (Bug#77381)
This commit is contained in:
Paul Nelson 2025-03-30 13:31:58 +02:00 committed by Eli Zaretskii
parent d6f1b25d2e
commit ef6203b64a

View file

@ -3185,9 +3185,14 @@ There might be text before point."
("\\bigcap" . ?⋂)
("\\bigcirc" . ?◯)
("\\bigcup" . ?)
("\\bigodot" . ?⨀)
("\\bigoplus" . ?⨁)
("\\bigotimes" . ?⨂)
("\\bigsqcup" . ?⨆)
("\\bigstar" . ?★)
("\\bigtriangledown" . ?▽)
("\\bigtriangleup" . ?△)
("\\biguplus" . ?⨄)
("\\bigvee" . ?)
("\\bigwedge" . ?⋀)
("\\blacklozenge" . ?✦)
@ -3204,12 +3209,11 @@ There might be text before point."
("\\bullet" . ?•)
("\\bumpeq" . ?≏)
("\\cap" . ?∩)
("\\cdot" . ?⋅)
("\\cdots" . ?⋯)
("\\centerdot" . )
("\\checkmark" . ?✓)
("\\chi" . )
("\\cdot" . ?⋅)
("\\cdots" . ?⋯)
("\\circ" . ?∘)
("\\circeq" . ?≗)
("\\circlearrowleft" . ?↺)
@ -3286,11 +3290,15 @@ There might be text before point."
("\\hookleftarrow" . ?↩)
("\\hookrightarrow" . ?↪)
("\\iff" . ?⇔)
("\\iiiint" . ?⨌)
("\\iiint" . ?∭)
("\\iint" . ?∬)
("\\imath" . ?ı)
("\\in" . ?∈)
("\\infty" . ?∞)
("\\int" . ?∫)
("\\intercal" . ?⊺)
("\\jmath" . )
("\\langle" . 10216) ; Literal ?⟨ breaks indentation.
("\\lbrace" . ?{)
("\\lbrack" . ?\[)
@ -3323,6 +3331,7 @@ There might be text before point."
("\\rhd" . ?▷)
("\\ll" . ?≪)
("\\llcorner" . ?⌞)
("\\lll" . ?⋘)
("\\lnapprox" . ?⋦)
("\\lneq" . ?≨)
("\\lneqq" . ?≨)
@ -3400,6 +3409,8 @@ There might be text before point."
("\\nvdash" . ?⊬)
("\\nwarrow" . ?↖)
("\\odot" . ?⊙)
("\\oiiint" . ?∰)
("\\oiint" . ?∯)
("\\oint" . ?∮)
("\\ominus" . ?⊖)
("\\oplus" . ?⊕)
@ -3508,10 +3519,12 @@ There might be text before point."
("\\vDash" . ?⊨)
("\\varepsilon" . )
("\\varphi" . )
("\\varpi" . )
("\\varprime" . ?)
("\\varpropto" . ?∝)
("\\varrho" . ?ϱ)
("\\varsigma" . )
("\\vartheta" . )
("\\vartriangleleft" . ?⊲)
("\\vartriangleright" . ?⊳)
("\\vdash" . ?⊢)
@ -3522,19 +3535,60 @@ There might be text before point."
("\\wedge" . ?∧)
("\\wp" . ?℘)
("\\wr" . ?≀)
("\\Bbb{N}" . ?) ; AMS commands for blackboard bold
("\\Bbb{P}" . ?) ; Also sometimes \mathbb.
("\\Bbb{A}" . ?𝔸) ; AMS commands for blackboard bold
("\\Bbb{B}" . ?𝔹) ; Also sometimes \mathbb.
("\\Bbb{C}" . ?)
("\\Bbb{D}" . ?𝔻)
("\\Bbb{E}" . ?𝔼)
("\\Bbb{F}" . ?𝔽)
("\\Bbb{G}" . ?𝔾)
("\\Bbb{H}" . ?)
("\\Bbb{I}" . ?𝕀)
("\\Bbb{J}" . ?𝕁)
("\\Bbb{K}" . ?𝕂)
("\\Bbb{L}" . ?𝕃)
("\\Bbb{M}" . ?𝕄)
("\\Bbb{N}" . ?)
("\\Bbb{O}" . ?𝕆)
("\\Bbb{P}" . ?)
("\\Bbb{Q}" . ?)
("\\Bbb{R}" . ?)
("\\Bbb{S}" . ?𝕊)
("\\Bbb{T}" . ?𝕋)
("\\Bbb{U}" . ?𝕌)
("\\Bbb{V}" . ?𝕍)
("\\Bbb{W}" . ?𝕎)
("\\Bbb{X}" . ?𝕏)
("\\Bbb{Y}" . ?𝕐)
("\\Bbb{Z}" . ?)
("\\mathbb{N}" . ?) ; AMS commands for blackboard bold
("\\mathbb{P}" . ?) ; Also sometimes \mathbb.
("\\mathbb{A}" . ?𝔸) ; AMS commands for blackboard bold
("\\mathbb{B}" . ?𝔹) ; Also sometimes \mathbb.
("\\mathbb{C}" . ?)
("\\mathbb{D}" . ?𝔻)
("\\mathbb{E}" . ?𝔼)
("\\mathbb{F}" . ?𝔽)
("\\mathbb{G}" . ?𝔾)
("\\mathbb{H}" . ?)
("\\mathbb{I}" . ?𝕀)
("\\mathbb{J}" . ?𝕁)
("\\mathbb{K}" . ?𝕂)
("\\mathbb{L}" . ?𝕃)
("\\mathbb{M}" . ?𝕄)
("\\mathbb{N}" . ?)
("\\mathbb{O}" . ?𝕆)
("\\mathbb{P}" . ?)
("\\mathbb{Q}" . ?)
("\\mathbb{R}" . ?)
("\\mathbb{S}" . ?𝕊)
("\\mathbb{T}" . ?𝕋)
("\\mathbb{U}" . ?𝕌)
("\\mathbb{V}" . ?𝕍)
("\\mathbb{W}" . ?𝕎)
("\\mathbb{X}" . ?𝕏)
("\\mathbb{Y}" . ?𝕐)
("\\mathbb{Z}" . ?)
("\\pm" . )
("\\pounds" . )
("\\|" . ?‖)
("\\varkappa" . )
;; caligraphic
@ -3738,7 +3792,59 @@ There might be text before point."
("\\textdivorced" . ?⚮)
("\\textlbrackdbl" . 10214) ; Literal ?⟦ breaks indentation
("\\textrbrackdbl" . 10215) ; Literal ?⟧ breaks indentation
("\\textinterrobangdown" . ?⸘))
("\\textinterrobangdown" . ?⸘)
;; TeX quotes
("``" . ?“)
("''" . ?”)
;; Unicode Fractions
("\\frac{1}{2}" . "½")
("\\frac{1}{3}" . "")
("\\frac{2}{3}" . "")
("\\frac{1}{4}" . "¼")
("\\frac{3}{4}" . "¾")
("\\frac{1}{5}" . "")
("\\frac{2}{5}" . "")
("\\frac{3}{5}" . "")
("\\frac{4}{5}" . "")
("\\frac{1}{6}" . "")
("\\frac{5}{6}" . "")
("\\frac{1}{7}" . "")
("\\frac{1}{8}" . "")
("\\frac{3}{8}" . "")
("\\frac{5}{8}" . "")
("\\frac{7}{8}" . "")
("\\frac{1}{9}" . "")
("\\frac{1}{10}" . "")
("\\tfrac{1}{2}" . "½")
("\\tfrac{1}{3}" . "")
("\\tfrac{2}{3}" . "")
("\\tfrac{1}{4}" . "¼")
("\\tfrac{3}{4}" . "¾")
("\\tfrac{1}{5}" . "")
("\\tfrac{2}{5}" . "")
("\\tfrac{3}{5}" . "")
("\\tfrac{4}{5}" . "")
("\\tfrac{1}{6}" . "")
("\\tfrac{5}{6}" . "")
("\\tfrac{1}{7}" . "")
("\\tfrac{1}{8}" . "")
("\\tfrac{3}{8}" . "")
("\\tfrac{5}{8}" . "")
("\\tfrac{7}{8}" . "")
("\\tfrac{1}{9}" . "")
("\\tfrac{1}{10}" . "")
;; Other symbols
("\\S" . )
("\\Finv" . ?Ⅎ)
("\\Game" . ?⅁)
("\\ " . 9141) ; Literal ?⎵ breaks indentation
("\\lvert" . ?|)
("\\rvert" . ?|)
("\\lVert" . ?‖)
("\\rVert" . ?‖))
"A `prettify-symbols-alist' usable for (La)TeX modes.")
(defun tex--prettify-symbols-compose-p (_start end _match)