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