Commit | Line | Data |
---|---|---|
e7cc1c83 | 1 | ;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*- |
44a7591e | 2 | |
ab422c4d | 3 | ;; Copyright (C) 2001-2013 Free Software Foundation, Inc. |
95df8112 GM |
4 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
5 | ;; 2010, 2011 | |
698218a2 KH |
6 | ;; National Institute of Advanced Industrial Science and Technology (AIST) |
7 | ;; Registration Number H14PRO021 | |
44a7591e | 8 | |
804c0109 DL |
9 | ;; Author: TAKAHASHI Naoto <ntakahas@m17n.org> |
10 | ;; Dave Love <fx@gnu.org> | |
f042e7b9 | 11 | ;; Keywords: multilingual, input, Greek, i18n |
44a7591e KH |
12 | |
13 | ;; This file is part of GNU Emacs. | |
14 | ||
3d544458 | 15 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
44a7591e | 16 | ;; it under the terms of the GNU General Public License as published by |
3d544458 GM |
17 | ;; the Free Software Foundation, either version 3 of the License, or |
18 | ;; (at your option) any later version. | |
44a7591e KH |
19 | |
20 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
21 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;; GNU General Public License for more details. | |
24 | ||
25 | ;; You should have received a copy of the GNU General Public License | |
3d544458 | 26 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
44a7591e | 27 | |
be567141 PJ |
28 | ;;; Commentary: |
29 | ||
44a7591e KH |
30 | ;;; Code: |
31 | ||
32 | (require 'quail) | |
33 | ||
34 | (quail-define-package | |
f042e7b9 DL |
35 | "TeX" "UTF-8" "\\" t |
36 | "LaTeX-like input method for many characters. | |
37 | These characters are from the charsets used by the `utf-8' coding | |
38 | system, including many technical ones. Examples: | |
e7cc1c83 SM |
39 | \\'a -> á \\`{a} -> à |
40 | \\pi -> π \\int -> ∫ ^1 -> ¹" | |
f042e7b9 | 41 | |
eebfcf8e KH |
42 | '(("\t" . quail-completion)) |
43 | t t nil nil nil nil nil nil nil t) | |
44a7591e | 44 | |
f8f2e1d8 | 45 | (eval-when-compile |
c8cefd6a SM |
46 | (require 'cl-lib) |
47 | ||
48 | (defconst latin-ltx--mark-map | |
49 | '(("DOT BELOW" . "d") | |
50 | ("DOT ABOVE" . ".") | |
51 | ("OGONEK" . "k") | |
52 | ("CEDILLA" . "c") | |
53 | ("CARON" . "v") | |
54 | ;; ("HOOK ABOVE" . ??) | |
55 | ("MACRON" . "=") | |
56 | ("BREVE" . "u") | |
57 | ("TILDE" . "~") | |
58 | ("GRAVE" . "`") | |
59 | ("CIRCUMFLEX" . "^") | |
60 | ("DIAERESIS" . "\"") | |
61 | ("DOUBLE ACUTE" . "H") | |
62 | ("ACUTE" . "'"))) | |
63 | ||
64 | (defconst latin-ltx--mark-re (regexp-opt (mapcar #'car latin-ltx--mark-map))) | |
65 | ||
f8f2e1d8 SM |
66 | (defun latin-ltx--ascii-p (char) |
67 | (and (characterp char) (< char 128))) | |
68 | ||
69 | (defmacro latin-ltx--define-rules (&rest rules) | |
70 | (load "uni-name") | |
71 | (let ((newrules ())) | |
72 | (dolist (rule rules) | |
73 | (pcase rule | |
74 | (`(,_ ,(pred characterp)) (push rule newrules)) ;; Normal quail rule. | |
75 | (`(,seq ,re) | |
c8cefd6a SM |
76 | (let ((count 0) |
77 | (re (eval re t))) | |
f8f2e1d8 SM |
78 | (dolist (pair (ucs-names)) |
79 | (let ((name (car pair)) | |
80 | (char (cdr pair))) | |
81 | (when (and (characterp char) ;; Ignore char-ranges. | |
82 | (string-match re name)) | |
83 | (let ((keys (if (stringp seq) | |
84 | (replace-match seq nil nil name) | |
85 | (funcall seq name char)))) | |
86 | (if (listp keys) | |
87 | (dolist (x keys) | |
88 | (setq count (1+ count)) | |
89 | (push (list x char) newrules)) | |
90 | (setq count (1+ count)) | |
91 | (push (list keys char) newrules)))))) | |
c8cefd6a | 92 | ;; (message "latin-ltx: %d mappings for %S" count re) |
a130c2af | 93 | )))) |
c8cefd6a SM |
94 | (setq newrules (delete-dups newrules)) |
95 | (let ((rules (copy-sequence newrules))) | |
96 | (while rules | |
97 | (let ((rule (pop rules))) | |
98 | (when (assoc (car rule) rules) | |
99 | (let ((conflicts (list (cadr rule))) | |
100 | (tail rules) | |
101 | c) | |
102 | (while (setq c (assoc (car rule) tail)) | |
103 | (push (cadr c) conflicts) | |
104 | (setq tail (cdr (memq c tail))) | |
105 | (setq rules (delq c rules))) | |
106 | (message "Conflict for %S: %S" | |
107 | (car rule) (apply #'string conflicts))))))) | |
108 | (let ((inputs (mapcar #'car newrules))) | |
109 | (setq inputs (delete-dups inputs)) | |
110 | (message "latin-ltx: %d rules (+ %d conflicts)!" | |
111 | (length inputs) (- (length newrules) (length inputs)))) | |
112 | `(quail-define-rules ,@(nreverse newrules))))) | |
f8f2e1d8 SM |
113 | |
114 | (latin-ltx--define-rules | |
e7cc1c83 | 115 | ("!`" ?¡) |
d781da00 SM |
116 | ("\\pounds" ?£) ;; ("{\\pounds}" ?£) |
117 | ("\\S" ?§) ;; ("{\\S}" ?§) | |
e7cc1c83 | 118 | ("$^a$" ?ª) |
e7cc1c83 SM |
119 | ("$\\pm$" ?±) ("\\pm" ?±) |
120 | ("$^2$" ?²) | |
121 | ("$^3$" ?³) | |
d781da00 | 122 | ("\\P" ?¶) ;; ("{\\P}" ?¶) |
e7cc1c83 SM |
123 | ;; Fixme: Yudit has the equivalent of ("\\cdot" ?⋅), for U+22C5, DOT |
124 | ;; OPERATOR, whereas · is MIDDLE DOT. JadeTeX translates both to | |
f042e7b9 | 125 | ;; \cdot. |
e7cc1c83 | 126 | ("$\\cdot$" ?·) ("\\cdot" ?·) |
e7cc1c83 SM |
127 | ("$^1$" ?¹) |
128 | ("$^o$" ?º) | |
129 | ("?`" ?¿) | |
130 | ||
f8f2e1d8 | 131 | ((lambda (name char) |
c8cefd6a SM |
132 | (let* ((c (if (match-end 1) |
133 | (downcase (match-string 2 name)) | |
134 | (match-string 2 name))) | |
135 | (mark1 (cdr (assoc (match-string 3 name) latin-ltx--mark-map))) | |
136 | (mark2 (if (match-end 4) | |
137 | (cdr (assoc (match-string 4 name) latin-ltx--mark-map)))) | |
138 | (marks (if mark2 (concat mark1 "\\" mark2) mark1))) | |
139 | (cl-assert mark1) | |
140 | (cons (format "\\%s{%s}" marks c) | |
141 | ;; Exclude "d" because we use "\\dh" for something else. | |
142 | (unless (member (or mark2 mark1) '("d"));; "k" | |
143 | (list (format "\\%s%s" marks c)))))) | |
144 | (concat "\\`LATIN \\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH \\(" | |
145 | latin-ltx--mark-re "\\)\\(?: AND \\(" | |
146 | latin-ltx--mark-re "\\)\\)?\\'")) | |
147 | ||
f8f2e1d8 | 148 | ((lambda (name char) |
c8cefd6a SM |
149 | (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map)))) |
150 | (cl-assert mark) | |
151 | (list (format "\\%s" mark)))) | |
152 | (concat "\\`COMBINING \\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'")) | |
153 | ||
f8f2e1d8 | 154 | ((lambda (name char) |
c8cefd6a SM |
155 | (unless (latin-ltx--ascii-p char) |
156 | (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map)))) | |
157 | (cl-assert mark) | |
158 | (list (format "\\%s{}" mark))))) | |
159 | (concat "\\`\\(?:SPACING \\)?\\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'")) | |
f8f2e1d8 | 160 | |
d781da00 SM |
161 | ("\\AA" ?Å) ;; ("{\\AA}" ?Å) |
162 | ("\\AE" ?Æ) ;; ("{\\AE}" ?Æ) | |
f8f2e1d8 | 163 | |
e7cc1c83 | 164 | ("$\\times$" ?×) ("\\times" ?×) |
d781da00 | 165 | ("\\O" ?Ø) ;; ("{\\O}" ?Ø) |
d781da00 | 166 | ("\\ss" ?ß) ;; ("{\\ss}" ?ß) |
e7cc1c83 | 167 | |
d781da00 SM |
168 | ("\\aa" ?å) ;; ("{\\aa}" ?å) |
169 | ("\\ae" ?æ) ;; ("{\\ae}" ?æ) | |
f8f2e1d8 | 170 | |
e7cc1c83 | 171 | ("$\\div$" ?÷) ("\\div" ?÷) |
d781da00 | 172 | ("\\o" ?ø) ;; ("{\\o}" ?ø) |
f8f2e1d8 | 173 | |
f8f2e1d8 SM |
174 | ("\\~{\\i}" ?ĩ) |
175 | ("\\={\\i}" ?ī) | |
176 | ("\\u{\\i}" ?ĭ) | |
177 | ||
d781da00 | 178 | ("\\i" ?ı) ;; ("{\\i}" ?ı) |
f8f2e1d8 | 179 | ("\\^{\\j}" ?ĵ) |
e7cc1c83 | 180 | |
d781da00 SM |
181 | ("\\L" ?Ł) ;; ("{\\L}" ?Ł) |
182 | ("\\l" ?ł) ;; ("{\\l}" ?ł) | |
f8f2e1d8 SM |
183 | |
184 | ("\\H" ?̋) | |
185 | ("\\H{}" ?˝) | |
f8f2e1d8 SM |
186 | ("\\U{o}" ?ő) ("\\Uo" ?ő) ;; FIXME: Was it just a typo? |
187 | ||
d781da00 SM |
188 | ("\\OE" ?Œ) ;; ("{\\OE}" ?Œ) |
189 | ("\\oe" ?œ) ;; ("{\\oe}" ?œ) | |
f8f2e1d8 SM |
190 | |
191 | ("\\v{\\i}" ?ǐ) | |
e7cc1c83 SM |
192 | |
193 | ("\\={\\AE}" ?Ǣ) ("\\=\\AE" ?Ǣ) | |
194 | ("\\={\\ae}" ?ǣ) ("\\=\\ae" ?ǣ) | |
f8f2e1d8 SM |
195 | |
196 | ("\\v{\\j}" ?ǰ) | |
e7cc1c83 SM |
197 | ("\\'{\\AE}" ?Ǽ) ("\\'\\AE" ?Ǽ) |
198 | ("\\'{\\ae}" ?ǽ) ("\\'\\ae" ?ǽ) | |
199 | ("\\'{\\O}" ?Ǿ) ("\\'\\O" ?Ǿ) | |
200 | ("\\'{\\o}" ?ǿ) ("\\'\\o" ?ǿ) | |
201 | ||
c814bdfc | 202 | ("\\," ? ) |
e7cc1c83 SM |
203 | ("\\/" ?) |
204 | ("\\:" ? ) | |
205 | ("\\;" ? ) | |
f8f2e1d8 SM |
206 | |
207 | ((lambda (name char) | |
208 | (let* ((base (concat (match-string 1 name) (match-string 3 name))) | |
209 | (basechar (cdr (assoc base (ucs-names))))) | |
210 | (when (latin-ltx--ascii-p basechar) | |
211 | (string (if (match-end 2) ?^ ?_) basechar)))) | |
212 | "\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)") | |
213 | ||
c8cefd6a | 214 | ((lambda (name _char) |
91554659 | 215 | (let* ((basename (match-string 2 name)) |
c8cefd6a SM |
216 | (name (if (match-end 1) (capitalize basename) (downcase basename)))) |
217 | (concat "^" (if (> (length name) 1) "\\") name))) | |
218 | "\\`MODIFIER LETTER \\(?:SMALL\\|CAPITA\\(L\\)\\) \\([[:ascii:]]+\\)\\'") | |
f8f2e1d8 SM |
219 | |
220 | ;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name)))) | |
221 | ;; "\\`MODIFIER LETTER SMALL \\(.\\)\\'") | |
222 | ;; ("^\\1" "\\`MODIFIER LETTER CAPITAL \\(.\\)\\'") | |
b31b81a5 | 223 | ("^o_" ?º) |
e7cc1c83 SM |
224 | ("^{SM}" ?℠) |
225 | ("^{TEL}" ?℡) | |
226 | ("^{TM}" ?™) | |
e7cc1c83 | 227 | |
e7cc1c83 | 228 | ("\\b" ?̱) |
f8f2e1d8 | 229 | |
e7cc1c83 | 230 | ("\\rq" ?’) |
f8f2e1d8 SM |
231 | |
232 | ;; FIXME: Provides some useful entries (yen, euro, copyright, registered, | |
233 | ;; currency, minus, micro), but also a lot of dubious ones. | |
234 | ((lambda (name char) | |
c8cefd6a SM |
235 | (unless (or (latin-ltx--ascii-p char) |
236 | ;; We prefer COMBINING LONG SOLIDUS OVERLAY for \not. | |
237 | (member name '("NOT SIGN"))) | |
f8f2e1d8 SM |
238 | (concat "\\" (downcase (match-string 1 name))))) |
239 | "\\`\\([^- ]+\\) SIGN\\'") | |
240 | ||
241 | ((lambda (name char) | |
242 | (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase) | |
243 | (match-string 2 name)))) | |
244 | "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'") | |
e7cc1c83 SM |
245 | |
246 | ("\\Box" ?□) | |
247 | ("\\Bumpeq" ?≎) | |
248 | ("\\Cap" ?⋒) | |
249 | ("\\Cup" ?⋓) | |
e7cc1c83 SM |
250 | ("\\Diamond" ?◇) |
251 | ("\\Downarrow" ?⇓) | |
e7cc1c83 SM |
252 | ("\\H{o}" ?ő) |
253 | ("\\Im" ?ℑ) | |
254 | ("\\Join" ?⋈) | |
e7cc1c83 SM |
255 | ("\\Leftarrow" ?⇐) |
256 | ("\\Leftrightarrow" ?⇔) | |
257 | ("\\Ll" ?⋘) | |
258 | ("\\Lleftarrow" ?⇚) | |
259 | ("\\Longleftarrow" ?⇐) | |
260 | ("\\Longleftrightarrow" ?⇔) | |
261 | ("\\Longrightarrow" ?⇒) | |
262 | ("\\Lsh" ?↰) | |
e7cc1c83 SM |
263 | ("\\Re" ?ℜ) |
264 | ("\\Rightarrow" ?⇒) | |
265 | ("\\Rrightarrow" ?⇛) | |
266 | ("\\Rsh" ?↱) | |
e7cc1c83 SM |
267 | ("\\Subset" ?⋐) |
268 | ("\\Supset" ?⋑) | |
e7cc1c83 SM |
269 | ("\\Uparrow" ?⇑) |
270 | ("\\Updownarrow" ?⇕) | |
e7cc1c83 SM |
271 | ("\\Vdash" ?⊩) |
272 | ("\\Vert" ?‖) | |
273 | ("\\Vvdash" ?⊪) | |
6b4e1d0d | 274 | ("\\aleph" ?ℵ) |
e7cc1c83 SM |
275 | ("\\amalg" ?∐) |
276 | ("\\angle" ?∠) | |
277 | ("\\approx" ?≈) | |
278 | ("\\approxeq" ?≊) | |
279 | ("\\ast" ?∗) | |
280 | ("\\asymp" ?≍) | |
281 | ("\\backcong" ?≌) | |
282 | ("\\backepsilon" ?∍) | |
283 | ("\\backprime" ?‵) | |
284 | ("\\backsim" ?∽) | |
285 | ("\\backsimeq" ?⋍) | |
f042e7b9 | 286 | ("\\backslash" ?\\) |
e7cc1c83 SM |
287 | ("\\barwedge" ?⊼) |
288 | ("\\because" ?∵) | |
b1c07b7b | 289 | ("\\beth" ?ℶ) |
e7cc1c83 SM |
290 | ("\\between" ?≬) |
291 | ("\\bigcap" ?⋂) | |
292 | ("\\bigcirc" ?◯) | |
293 | ("\\bigcup" ?⋃) | |
294 | ("\\bigstar" ?★) | |
295 | ("\\bigtriangledown" ?▽) | |
296 | ("\\bigtriangleup" ?△) | |
297 | ("\\bigvee" ?⋁) | |
298 | ("\\bigwedge" ?⋀) | |
299 | ("\\blacklozenge" ?✦) | |
300 | ("\\blacksquare" ?▪) | |
301 | ("\\blacktriangle" ?▴) | |
302 | ("\\blacktriangledown" ?▾) | |
303 | ("\\blacktriangleleft" ?◂) | |
304 | ("\\blacktriangleright" ?▸) | |
305 | ("\\bot" ?⊥) | |
306 | ("\\bowtie" ?⋈) | |
307 | ("\\boxminus" ?⊟) | |
308 | ("\\boxplus" ?⊞) | |
309 | ("\\boxtimes" ?⊠) | |
310 | ("\\bullet" ?•) | |
311 | ("\\bumpeq" ?≏) | |
312 | ("\\cap" ?∩) | |
313 | ("\\cdots" ?⋯) | |
314 | ("\\centerdot" ?·) | |
315 | ("\\checkmark" ?✓) | |
316 | ("\\chi" ?χ) | |
a0c07f4e | 317 | ("\\circ" ?∘) |
e7cc1c83 SM |
318 | ("\\circeq" ?≗) |
319 | ("\\circlearrowleft" ?↺) | |
320 | ("\\circlearrowright" ?↻) | |
321 | ("\\circledR" ?®) | |
322 | ("\\circledS" ?Ⓢ) | |
323 | ("\\circledast" ?⊛) | |
324 | ("\\circledcirc" ?⊚) | |
325 | ("\\circleddash" ?⊝) | |
326 | ("\\clubsuit" ?♣) | |
e7cc1c83 SM |
327 | ("\\coloneq" ?≔) |
328 | ("\\complement" ?∁) | |
329 | ("\\cong" ?≅) | |
330 | ("\\coprod" ?∐) | |
331 | ("\\cup" ?∪) | |
332 | ("\\curlyeqprec" ?⋞) | |
333 | ("\\curlyeqsucc" ?⋟) | |
334 | ("\\curlypreceq" ?≼) | |
335 | ("\\curlyvee" ?⋎) | |
336 | ("\\curlywedge" ?⋏) | |
337 | ("\\curvearrowleft" ?↶) | |
338 | ("\\curvearrowright" ?↷) | |
339 | ||
340 | ("\\dag" ?†) | |
341 | ("\\dagger" ?†) | |
b1c07b7b | 342 | ("\\daleth" ?ℸ) |
e7cc1c83 SM |
343 | ("\\dashv" ?⊣) |
344 | ("\\ddag" ?‡) | |
345 | ("\\ddagger" ?‡) | |
346 | ("\\ddots" ?⋱) | |
e7cc1c83 SM |
347 | ("\\diamond" ?⋄) |
348 | ("\\diamondsuit" ?♢) | |
e7cc1c83 SM |
349 | ("\\divideontimes" ?⋇) |
350 | ("\\doteq" ?≐) | |
351 | ("\\doteqdot" ?≑) | |
352 | ("\\dotplus" ?∔) | |
353 | ("\\dotsquare" ?⊡) | |
354 | ("\\downarrow" ?↓) | |
355 | ("\\downdownarrows" ?⇊) | |
356 | ("\\downleftharpoon" ?⇃) | |
357 | ("\\downrightharpoon" ?⇂) | |
358 | ("\\ell" ?ℓ) | |
359 | ("\\emptyset" ?∅) | |
e7cc1c83 SM |
360 | ("\\eqcirc" ?≖) |
361 | ("\\eqcolon" ?≕) | |
362 | ("\\eqslantgtr" ?⋝) | |
363 | ("\\eqslantless" ?⋜) | |
364 | ("\\equiv" ?≡) | |
e7cc1c83 SM |
365 | ("\\exists" ?∃) |
366 | ("\\fallingdotseq" ?≒) | |
367 | ("\\flat" ?♭) | |
368 | ("\\forall" ?∀) | |
369 | ("\\frac1" ?⅟) | |
370 | ("\\frac12" ?½) | |
371 | ("\\frac13" ?⅓) | |
372 | ("\\frac14" ?¼) | |
373 | ("\\frac15" ?⅕) | |
374 | ("\\frac16" ?⅙) | |
375 | ("\\frac18" ?⅛) | |
376 | ("\\frac23" ?⅔) | |
377 | ("\\frac25" ?⅖) | |
378 | ("\\frac34" ?¾) | |
379 | ("\\frac35" ?⅗) | |
380 | ("\\frac38" ?⅜) | |
381 | ("\\frac45" ?⅘) | |
382 | ("\\frac56" ?⅚) | |
383 | ("\\frac58" ?⅝) | |
384 | ("\\frac78" ?⅞) | |
385 | ("\\frown" ?⌢) | |
e7cc1c83 SM |
386 | ("\\ge" ?≥) |
387 | ("\\geq" ?≥) | |
388 | ("\\geqq" ?≧) | |
389 | ("\\geqslant" ?≥) | |
390 | ("\\gets" ?←) | |
391 | ("\\gg" ?≫) | |
392 | ("\\ggg" ?⋙) | |
b1c07b7b | 393 | ("\\gimel" ?ℷ) |
e7cc1c83 SM |
394 | ("\\gnapprox" ?⋧) |
395 | ("\\gneq" ?≩) | |
396 | ("\\gneqq" ?≩) | |
397 | ("\\gnsim" ?⋧) | |
398 | ("\\gtrapprox" ?≳) | |
399 | ("\\gtrdot" ?⋗) | |
400 | ("\\gtreqless" ?⋛) | |
401 | ("\\gtreqqless" ?⋛) | |
402 | ("\\gtrless" ?≷) | |
403 | ("\\gtrsim" ?≳) | |
404 | ("\\gvertneqq" ?≩) | |
405 | ("\\hbar" ?ℏ) | |
406 | ("\\heartsuit" ?♥) | |
407 | ("\\hookleftarrow" ?↩) | |
408 | ("\\hookrightarrow" ?↪) | |
409 | ("\\iff" ?⇔) | |
410 | ("\\imath" ?ı) | |
411 | ("\\in" ?∈) | |
412 | ("\\infty" ?∞) | |
413 | ("\\int" ?∫) | |
414 | ("\\intercal" ?⊺) | |
11557421 | 415 | ("\\langle" ?⟨) ;; Was ?〈, see bug#12948. |
f042e7b9 | 416 | ("\\lbrace" ?{) |
e099e659 | 417 | ("\\lbrack" ?\[) |
e7cc1c83 SM |
418 | ("\\lceil" ?⌈) |
419 | ("\\ldots" ?…) | |
420 | ("\\le" ?≤) | |
421 | ("\\leadsto" ?↝) | |
422 | ("\\leftarrow" ?←) | |
423 | ("\\leftarrowtail" ?↢) | |
424 | ("\\leftharpoondown" ?↽) | |
425 | ("\\leftharpoonup" ?↼) | |
426 | ("\\leftleftarrows" ?⇇) | |
11557421 | 427 | ;; ("\\leftparengtr" ?〈), see bug#12948. |
e7cc1c83 SM |
428 | ("\\leftrightarrow" ?↔) |
429 | ("\\leftrightarrows" ?⇆) | |
430 | ("\\leftrightharpoons" ?⇋) | |
431 | ("\\leftrightsquigarrow" ?↭) | |
432 | ("\\leftthreetimes" ?⋋) | |
433 | ("\\leq" ?≤) | |
434 | ("\\leqq" ?≦) | |
435 | ("\\leqslant" ?≤) | |
436 | ("\\lessapprox" ?≲) | |
437 | ("\\lessdot" ?⋖) | |
438 | ("\\lesseqgtr" ?⋚) | |
439 | ("\\lesseqqgtr" ?⋚) | |
440 | ("\\lessgtr" ?≶) | |
441 | ("\\lesssim" ?≲) | |
442 | ("\\lfloor" ?⌊) | |
443 | ("\\lhd" ?◁) | |
444 | ("\\rhd" ?▷) | |
445 | ("\\ll" ?≪) | |
446 | ("\\llcorner" ?⌞) | |
447 | ("\\lnapprox" ?⋦) | |
448 | ("\\lneq" ?≨) | |
449 | ("\\lneqq" ?≨) | |
450 | ("\\lnsim" ?⋦) | |
451 | ("\\longleftarrow" ?←) | |
452 | ("\\longleftrightarrow" ?↔) | |
453 | ("\\longmapsto" ?↦) | |
454 | ("\\longrightarrow" ?→) | |
455 | ("\\looparrowleft" ?↫) | |
456 | ("\\looparrowright" ?↬) | |
457 | ("\\lozenge" ?✧) | |
458 | ("\\lq" ?‘) | |
459 | ("\\lrcorner" ?⌟) | |
460 | ("\\ltimes" ?⋉) | |
461 | ("\\lvertneqq" ?≨) | |
462 | ("\\maltese" ?✠) | |
463 | ("\\mapsto" ?↦) | |
464 | ("\\measuredangle" ?∡) | |
465 | ("\\mho" ?℧) | |
466 | ("\\mid" ?∣) | |
467 | ("\\models" ?⊧) | |
468 | ("\\mp" ?∓) | |
469 | ("\\multimap" ?⊸) | |
470 | ("\\nLeftarrow" ?⇍) | |
471 | ("\\nLeftrightarrow" ?⇎) | |
472 | ("\\nRightarrow" ?⇏) | |
473 | ("\\nVDash" ?⊯) | |
474 | ("\\nVdash" ?⊮) | |
475 | ("\\nabla" ?∇) | |
476 | ("\\napprox" ?≉) | |
477 | ("\\natural" ?♮) | |
478 | ("\\ncong" ?≇) | |
479 | ("\\ne" ?≠) | |
480 | ("\\nearrow" ?↗) | |
481 | ("\\neg" ?¬) | |
482 | ("\\neq" ?≠) | |
483 | ("\\nequiv" ?≢) | |
484 | ("\\newline" ? ) | |
485 | ("\\nexists" ?∄) | |
486 | ("\\ngeq" ?≱) | |
487 | ("\\ngeqq" ?≱) | |
488 | ("\\ngeqslant" ?≱) | |
489 | ("\\ngtr" ?≯) | |
490 | ("\\ni" ?∋) | |
491 | ("\\nleftarrow" ?↚) | |
492 | ("\\nleftrightarrow" ?↮) | |
493 | ("\\nleq" ?≰) | |
494 | ("\\nleqq" ?≰) | |
495 | ("\\nleqslant" ?≰) | |
496 | ("\\nless" ?≮) | |
497 | ("\\nmid" ?∤) | |
f8f2e1d8 | 498 | ("\\not" ?̸) ;FIXME: conflict with "NOT SIGN" ¬. |
e7cc1c83 SM |
499 | ("\\notin" ?∉) |
500 | ("\\nparallel" ?∦) | |
501 | ("\\nprec" ?⊀) | |
502 | ("\\npreceq" ?⋠) | |
503 | ("\\nrightarrow" ?↛) | |
504 | ("\\nshortmid" ?∤) | |
505 | ("\\nshortparallel" ?∦) | |
506 | ("\\nsim" ?≁) | |
507 | ("\\nsimeq" ?≄) | |
508 | ("\\nsubset" ?⊄) | |
509 | ("\\nsubseteq" ?⊈) | |
510 | ("\\nsubseteqq" ?⊈) | |
511 | ("\\nsucc" ?⊁) | |
512 | ("\\nsucceq" ?⋡) | |
513 | ("\\nsupset" ?⊅) | |
514 | ("\\nsupseteq" ?⊉) | |
515 | ("\\nsupseteqq" ?⊉) | |
516 | ("\\ntriangleleft" ?⋪) | |
517 | ("\\ntrianglelefteq" ?⋬) | |
518 | ("\\ntriangleright" ?⋫) | |
519 | ("\\ntrianglerighteq" ?⋭) | |
e7cc1c83 SM |
520 | ("\\nvDash" ?⊭) |
521 | ("\\nvdash" ?⊬) | |
522 | ("\\nwarrow" ?↖) | |
523 | ("\\odot" ?⊙) | |
524 | ("\\oint" ?∮) | |
e7cc1c83 SM |
525 | ("\\ominus" ?⊖) |
526 | ("\\oplus" ?⊕) | |
527 | ("\\oslash" ?⊘) | |
528 | ("\\otimes" ?⊗) | |
529 | ("\\par" ? ) | |
530 | ("\\parallel" ?∥) | |
531 | ("\\partial" ?∂) | |
532 | ("\\perp" ?⊥) | |
e7cc1c83 SM |
533 | ("\\pitchfork" ?⋔) |
534 | ("\\prec" ?≺) | |
535 | ("\\precapprox" ?≾) | |
536 | ("\\preceq" ?≼) | |
537 | ("\\precnapprox" ?⋨) | |
538 | ("\\precnsim" ?⋨) | |
539 | ("\\precsim" ?≾) | |
540 | ("\\prime" ?′) | |
541 | ("\\prod" ?∏) | |
542 | ("\\propto" ?∝) | |
fbd80e28 | 543 | ("\\qed" ?∎) |
e7cc1c83 | 544 | ("\\quad" ? ) |
11557421 | 545 | ("\\rangle" ?⟩) ;; Was ?〉, see bug#12948. |
f042e7b9 | 546 | ("\\rbrace" ?}) |
e099e659 | 547 | ("\\rbrack" ?\]) |
e7cc1c83 SM |
548 | ("\\rceil" ?⌉) |
549 | ("\\rfloor" ?⌋) | |
550 | ("\\rightarrow" ?→) | |
551 | ("\\rightarrowtail" ?↣) | |
552 | ("\\rightharpoondown" ?⇁) | |
553 | ("\\rightharpoonup" ?⇀) | |
554 | ("\\rightleftarrows" ?⇄) | |
555 | ("\\rightleftharpoons" ?⇌) | |
11557421 | 556 | ;; ("\\rightparengtr" ?⦔) ;; Was ?〉, see bug#12948. |
e7cc1c83 SM |
557 | ("\\rightrightarrows" ?⇉) |
558 | ("\\rightthreetimes" ?⋌) | |
559 | ("\\risingdotseq" ?≓) | |
560 | ("\\rtimes" ?⋊) | |
561 | ("\\sbs" ?﹨) | |
562 | ("\\searrow" ?↘) | |
563 | ("\\setminus" ?∖) | |
564 | ("\\sharp" ?♯) | |
565 | ("\\shortmid" ?∣) | |
566 | ("\\shortparallel" ?∥) | |
e7cc1c83 SM |
567 | ("\\sim" ?∼) |
568 | ("\\simeq" ?≃) | |
569 | ("\\smallamalg" ?∐) | |
570 | ("\\smallsetminus" ?∖) | |
571 | ("\\smallsmile" ?⌣) | |
572 | ("\\smile" ?⌣) | |
573 | ("\\spadesuit" ?♠) | |
574 | ("\\sphericalangle" ?∢) | |
575 | ("\\sqcap" ?⊓) | |
576 | ("\\sqcup" ?⊔) | |
577 | ("\\sqsubset" ?⊏) | |
578 | ("\\sqsubseteq" ?⊑) | |
579 | ("\\sqsupset" ?⊐) | |
580 | ("\\sqsupseteq" ?⊒) | |
581 | ("\\square" ?□) | |
582 | ("\\squigarrowright" ?⇝) | |
583 | ("\\star" ?⋆) | |
584 | ("\\straightphi" ?φ) | |
585 | ("\\subset" ?⊂) | |
586 | ("\\subseteq" ?⊆) | |
587 | ("\\subseteqq" ?⊆) | |
588 | ("\\subsetneq" ?⊊) | |
589 | ("\\subsetneqq" ?⊊) | |
590 | ("\\succ" ?≻) | |
591 | ("\\succapprox" ?≿) | |
592 | ("\\succcurlyeq" ?≽) | |
593 | ("\\succeq" ?≽) | |
594 | ("\\succnapprox" ?⋩) | |
595 | ("\\succnsim" ?⋩) | |
596 | ("\\succsim" ?≿) | |
597 | ("\\sum" ?∑) | |
598 | ("\\supset" ?⊃) | |
599 | ("\\supseteq" ?⊇) | |
600 | ("\\supseteqq" ?⊇) | |
601 | ("\\supsetneq" ?⊋) | |
602 | ("\\supsetneqq" ?⊋) | |
603 | ("\\surd" ?√) | |
604 | ("\\swarrow" ?↙) | |
e7cc1c83 | 605 | ("\\therefore" ?∴) |
e7cc1c83 SM |
606 | ("\\thickapprox" ?≈) |
607 | ("\\thicksim" ?∼) | |
608 | ("\\to" ?→) | |
609 | ("\\top" ?⊤) | |
610 | ("\\triangle" ?▵) | |
611 | ("\\triangledown" ?▿) | |
612 | ("\\triangleleft" ?◃) | |
613 | ("\\trianglelefteq" ?⊴) | |
614 | ("\\triangleq" ?≜) | |
615 | ("\\triangleright" ?▹) | |
616 | ("\\trianglerighteq" ?⊵) | |
617 | ("\\twoheadleftarrow" ?↞) | |
618 | ("\\twoheadrightarrow" ?↠) | |
619 | ("\\ulcorner" ?⌜) | |
620 | ("\\uparrow" ?↑) | |
621 | ("\\updownarrow" ?↕) | |
622 | ("\\upleftharpoon" ?↿) | |
623 | ("\\uplus" ?⊎) | |
624 | ("\\uprightharpoon" ?↾) | |
e7cc1c83 SM |
625 | ("\\upuparrows" ?⇈) |
626 | ("\\urcorner" ?⌝) | |
627 | ("\\u{i}" ?ĭ) | |
628 | ("\\vDash" ?⊨) | |
f8f2e1d8 SM |
629 | |
630 | ((lambda (name char) | |
631 | (concat "\\var" (downcase (match-string 1 name)))) | |
632 | "\\`GREEK \\([^- ]+\\) SYMBOL\\'") | |
633 | ||
e7cc1c83 SM |
634 | ("\\varprime" ?′) |
635 | ("\\varpropto" ?∝) | |
f8f2e1d8 | 636 | ("\\varsigma" ?ς) ;FIXME: Looks reversed with the non\var. |
e7cc1c83 SM |
637 | ("\\vartriangleleft" ?⊲) |
638 | ("\\vartriangleright" ?⊳) | |
639 | ("\\vdash" ?⊢) | |
640 | ("\\vdots" ?⋮) | |
641 | ("\\vee" ?∨) | |
642 | ("\\veebar" ?⊻) | |
f042e7b9 | 643 | ("\\vert" ?|) |
e7cc1c83 SM |
644 | ("\\wedge" ?∧) |
645 | ("\\wp" ?℘) | |
646 | ("\\wr" ?≀) | |
e7cc1c83 SM |
647 | |
648 | ("\\Bbb{N}" ?ℕ) ; AMS commands for blackboard bold | |
649 | ("\\Bbb{P}" ?ℙ) ; Also sometimes \mathbb. | |
650 | ("\\Bbb{R}" ?ℝ) | |
651 | ("\\Bbb{Z}" ?ℤ) | |
652 | ("--" ?–) | |
653 | ("---" ?—) | |
8be6f5ae SM |
654 | ;; We used to use ~ for NBSP but that's inconvenient and may even look like |
655 | ;; a bug where the user finds his ~ key doesn't insert a ~ any more. | |
656 | ("\\ " ? ) | |
657 | ("\\\\" ?\\) | |
e7cc1c83 SM |
658 | ("\\mathscr{I}" ?ℐ) ; moment of inertia |
659 | ("\\Smiley" ?☺) | |
660 | ("\\blacksmiley" ?☻) | |
661 | ("\\Frowny" ?☹) | |
662 | ("\\Letter" ?✉) | |
663 | ("\\permil" ?‰) | |
8be6f5ae SM |
664 | ;; Probably not useful enough: |
665 | ;; ("\\Telefon" ?☎) ; there are other possibilities | |
666 | ;; ("\\Radioactivity" ?☢) | |
667 | ;; ("\Biohazard" ?☣) | |
668 | ;; ("\\Male" ?♂) | |
669 | ;; ("\\Female" ?♀) | |
670 | ;; ("\\Lightning" ?☇) | |
671 | ;; ("\\Mercury" ?☿) | |
672 | ;; ("\\Earth" ?♁) | |
673 | ;; ("\\Jupiter" ?♃) | |
674 | ;; ("\\Saturn" ?♄) | |
675 | ;; ("\\Uranus" ?♅) | |
676 | ;; ("\\Neptune" ?♆) | |
677 | ;; ("\\Pluto" ?♇) | |
678 | ;; ("\\Sun" ?☉) | |
679 | ;; ("\\Writinghand" ?✍) | |
680 | ;; ("\\Yinyang" ?☯) | |
681 | ;; ("\\Heart" ?♡) | |
e7cc1c83 SM |
682 | ("\\dh" ?ð) |
683 | ("\\DH" ?Ð) | |
684 | ("\\th" ?þ) | |
685 | ("\\TH" ?Þ) | |
e7cc1c83 SM |
686 | ("\\lnot" ?¬) |
687 | ("\\ordfeminine" ?ª) | |
688 | ("\\ordmasculine" ?º) | |
689 | ("\\lambdabar" ?ƛ) | |
690 | ("\\celsius" ?℃) | |
804c0109 | 691 | ;; by analogy with lq, rq: |
e7cc1c83 SM |
692 | ("\\ldq" ?\“) |
693 | ("\\rdq" ?\”) | |
e7cc1c83 | 694 | ("\\defs" ?≙) ; per fuzz/zed |
8be6f5ae | 695 | ;; ("\\sqrt[3]" ?∛) |
e7cc1c83 SM |
696 | ("\\llbracket" ?\〚) ; stmaryrd |
697 | ("\\rrbracket" ?\〛) | |
8be6f5ae SM |
698 | ;; ("\\lbag" ?\〚) ; fuzz |
699 | ;; ("\\rbag" ?\〛) | |
e7cc1c83 SM |
700 | ("\\ldata" ?\《) ; fuzz/zed |
701 | ("\\rdata" ?\》) | |
d2c846aa SM |
702 | ;; From Karl Eichwalder. |
703 | ("\\glq" ?‚) | |
704 | ("\\grq" ?‘) | |
bef96454 SM |
705 | ("\\glqq" ?„) ("\\\"`" ?„) |
706 | ("\\grqq" ?“) ("\\\"'" ?“) | |
d2c846aa SM |
707 | ("\\flq" ?‹) |
708 | ("\\frq" ?›) | |
e89e3726 SM |
709 | ("\\flqq" ?\«) ("\\\"<" ?\«) |
710 | ("\\frqq" ?\») ("\\\">" ?\») | |
c814bdfc KH |
711 | |
712 | ("\\-" ?) ;; soft hyphen | |
713 | ||
714 | ("\\textmu" ?µ) | |
715 | ("\\textfractionsolidus" ?⁄) | |
716 | ("\\textbigcircle" ?⃝) | |
717 | ("\\textmusicalnote" ?♪) | |
718 | ("\\textdied" ?✝) | |
719 | ("\\textcolonmonetary" ?₡) | |
720 | ("\\textwon" ?₩) | |
721 | ("\\textnaira" ?₦) | |
722 | ("\\textpeso" ?₱) | |
723 | ("\\textlira" ?₤) | |
724 | ("\\textrecipe" ?℞) | |
725 | ("\\textinterrobang" ?‽) | |
726 | ("\\textpertenthousand" ?‱) | |
727 | ("\\textbaht" ?฿) | |
728 | ("\\textnumero" ?№) | |
729 | ("\\textdiscount" ?⁒) | |
730 | ("\\textestimated" ?℮) | |
731 | ("\\textopenbullet" ?◦) | |
732 | ("\\textlquill" ?⁅) | |
733 | ("\\textrquill" ?⁆) | |
734 | ("\\textcircledP" ?℗) | |
735 | ("\\textreferencemark" ?※) | |
564cc607 | 736 | ) |
be567141 PJ |
737 | |
738 | ;;; latin-ltx.el ends here |