latin-ltx.el 18.9 KB
Newer Older
Stefan Monnier's avatar
Stefan Monnier committed
1
;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*-
2

Paul Eggert's avatar
Paul Eggert committed
3
;; Copyright (C) 2001-2019 Free Software Foundation, Inc.
4 5
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
;;   2010, 2011
Kenichi Handa's avatar
Kenichi Handa committed
6 7
;;   National Institute of Advanced Industrial Science and Technology (AIST)
;;   Registration Number H14PRO021
8

Dave Love's avatar
Dave Love committed
9 10
;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
;;         Dave Love <fx@gnu.org>
11
;; Keywords: multilingual, input, Greek, i18n
12 13 14

;; This file is part of GNU Emacs.

15
;; GNU Emacs is free software: you can redistribute it and/or modify
16
;; it under the terms of the GNU General Public License as published by
17 18
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
19 20 21 22 23 24 25

;; GNU Emacs 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
26
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
27

28 29
;;; Commentary:

30 31 32 33 34
;;; Code:

(require 'quail)

(quail-define-package
35 36 37 38
 "TeX" "UTF-8" "\\" t
 "LaTeX-like input method for many characters.
These characters are from the charsets used by the `utf-8' coding
system, including many technical ones.  Examples:
39
 \\\\='a -> á  \\\\=`{a} -> à
Stefan Monnier's avatar
Stefan Monnier committed
40
 \\pi -> π  \\int -> ∫  ^1 -> ¹"
41

42 43
 '(("\t" . quail-completion))
 t t nil nil nil nil nil nil nil t)
44

45
(eval-when-compile
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
  (require 'cl-lib)

  (defconst latin-ltx--mark-map
    '(("DOT BELOW" . "d")
      ("DOT ABOVE" . ".")
      ("OGONEK" . "k")
      ("CEDILLA" . "c")
      ("CARON" . "v")
      ;; ("HOOK ABOVE" . ??)
      ("MACRON" . "=")
      ("BREVE" . "u")
      ("TILDE" . "~")
      ("GRAVE" . "`")
      ("CIRCUMFLEX" . "^")
      ("DIAERESIS" . "\"")
      ("DOUBLE ACUTE" . "H")
      ("ACUTE" . "'")))

  (defconst latin-ltx--mark-re (regexp-opt (mapcar #'car latin-ltx--mark-map)))

66 67 68 69 70 71 72 73 74 75
  (defun latin-ltx--ascii-p (char)
    (and (characterp char) (< char 128)))

  (defmacro latin-ltx--define-rules (&rest rules)
    (load "uni-name")
    (let ((newrules ()))
      (dolist (rule rules)
        (pcase rule
          (`(,_ ,(pred characterp)) (push rule newrules)) ;; Normal quail rule.
          (`(,seq ,re)
76 77
           (let ((count 0)
                 (re (eval re t)))
78 79 80 81 82 83 84 85 86 87 88 89 90 91
             (maphash
              (lambda (name char)
                (when (and (characterp char) ;; Ignore char-ranges.
                           (string-match re name))
                  (let ((keys (if (stringp seq)
                                  (replace-match seq nil nil name)
                                (funcall seq name char))))
                    (if (listp keys)
                        (dolist (x keys)
                          (setq count (1+ count))
                          (push (list x char) newrules))
                      (setq count (1+ count))
                      (push (list keys char) newrules)))))
               (ucs-names))
92
             ;; (message "latin-ltx: %d mappings for %S" count re)
93
	     ))))
94 95 96 97 98 99 100 101 102 103 104 105 106 107
      (setq newrules (delete-dups newrules))
      (let ((rules (copy-sequence newrules)))
        (while rules
          (let ((rule (pop rules)))
            (when (assoc (car rule) rules)
              (let ((conflicts (list (cadr rule)))
                    (tail rules)
                    c)
                (while (setq c (assoc (car rule) tail))
                  (push (cadr c) conflicts)
                  (setq tail (cdr (memq c tail)))
                  (setq rules (delq c rules)))
                (message "Conflict for %S: %S"
                         (car rule) (apply #'string conflicts)))))))
108 109 110 111 112
      (let* ((inputs (delete-dups (mapcar #'car newrules)))
             (conflicts (- (length newrules) (length inputs))))
        (unless (zerop conflicts)
          (message "latin-ltx: %d rules (+ %d conflicts)!"
                   (length inputs) conflicts)))
113
      `(quail-define-rules ,@(nreverse newrules)))))
114 115

(latin-ltx--define-rules
Stefan Monnier's avatar
Stefan Monnier committed
116
 ("!`" ?¡)
117 118
 ("\\pounds" ?£) ;; ("{\\pounds}" ?£)
 ("\\S" ?§) ;; ("{\\S}" ?§)
Stefan Monnier's avatar
Stefan Monnier committed
119 120 121 122
 ("$^a$" ?ª)
 ("$\\pm$" ?±) ("\\pm" ?±)
 ("$^2$" ?²)
 ("$^3$" ?³)
123
 ("\\P" ?) ;; ("{\\P}" ?¶)
Stefan Monnier's avatar
Stefan Monnier committed
124 125
 ;; Fixme: Yudit has the equivalent of ("\\cdot" ?⋅), for U+22C5, DOT
 ;; OPERATOR, whereas · is MIDDLE DOT.  JadeTeX translates both to
126
 ;; \cdot.
Stefan Monnier's avatar
Stefan Monnier committed
127 128 129 130 131
 ("$\\cdot$" ?·) ("\\cdot" ?·)
 ("$^1$" ?¹)
 ("$^o$" ?º)
 ("?`" ?¿)

132
 ((lambda (name char)
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
    (let* ((c (if (match-end 1)
                  (downcase (match-string 2 name))
                (match-string 2 name)))
           (mark1 (cdr (assoc (match-string 3 name) latin-ltx--mark-map)))
           (mark2 (if (match-end 4)
                      (cdr (assoc (match-string 4 name) latin-ltx--mark-map))))
           (marks (if mark2 (concat mark1 "\\" mark2) mark1)))
      (cl-assert mark1)
      (cons (format "\\%s{%s}" marks c)
            ;; Exclude "d" because we use "\\dh" for something else.
            (unless (member (or mark2 mark1) '("d"));; "k"
              (list (format "\\%s%s" marks c))))))
  (concat "\\`LATIN \\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH \\("
          latin-ltx--mark-re "\\)\\(?: AND \\("
          latin-ltx--mark-re "\\)\\)?\\'"))

149
 ((lambda (name char)
150 151 152 153 154
    (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
      (cl-assert mark)
      (list (format "\\%s" mark))))
  (concat "\\`COMBINING \\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))

155
 ((lambda (name char)
156 157 158 159 160
    (unless (latin-ltx--ascii-p char)
      (let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
        (cl-assert mark)
        (list (format "\\%s{}" mark)))))
  (concat "\\`\\(?:SPACING \\)?\\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))
161

162 163
 ("\\AA" ?Å) ;; ("{\\AA}" ?Å)
 ("\\AE" ?Æ) ;; ("{\\AE}" ?Æ)
164

Stefan Monnier's avatar
Stefan Monnier committed
165
 ("$\\times$" ?×) ("\\times" ?×)
166 167
 ("\\O" ?Ø) ;; ("{\\O}" ?Ø)
 ("\\ss" ?ß) ;; ("{\\ss}" ?ß)
Stefan Monnier's avatar
Stefan Monnier committed
168

169 170
 ("\\aa" ?å) ;; ("{\\aa}" ?å)
 ("\\ae" ?æ) ;; ("{\\ae}" ?æ)
171

Stefan Monnier's avatar
Stefan Monnier committed
172
 ("$\\div$" ?÷) ("\\div" ?÷)
173
 ("\\o" ?ø) ;; ("{\\o}" ?ø)
174 175 176 177 178

 ("\\~{\\i}" ?ĩ)
 ("\\={\\i}" ?ī)
 ("\\u{\\i}" ?ĭ)

179
 ("\\i" ?ı) ;; ("{\\i}" ?ı)
180
 ("\\^{\\j}" ?ĵ)
Stefan Monnier's avatar
Stefan Monnier committed
181

182 183
 ("\\L" ?Ł) ;; ("{\\L}" ?Ł)
 ("\\l" ?ł) ;; ("{\\l}" ?ł)
184 185 186 187

 ("\\H" ?̋)
 ("\\H{}" ?˝)
 ("\\U{o}" ?ő) ("\\Uo" ?ő) ;; FIXME: Was it just a typo?
188

189 190
 ("\\OE" ?Œ) ;; ("{\\OE}" ?Œ)
 ("\\oe" ?œ) ;; ("{\\oe}" ?œ)
191 192

 ("\\v{\\i}" ?ǐ)
Stefan Monnier's avatar
Stefan Monnier committed
193 194 195

 ("\\={\\AE}" ?Ǣ) ("\\=\\AE" ?Ǣ)
 ("\\={\\ae}" ?ǣ) ("\\=\\ae" ?ǣ)
196 197

 ("\\v{\\j}" ?ǰ)
Stefan Monnier's avatar
Stefan Monnier committed
198 199 200 201 202
 ("\\'{\\AE}" ?Ǽ) ("\\'\\AE" ?Ǽ)
 ("\\'{\\ae}" ?ǽ) ("\\'\\ae" ?ǽ)
 ("\\'{\\O}" ?Ǿ) ("\\'\\O" ?Ǿ)
 ("\\'{\\o}" ?ǿ) ("\\'\\o" ?ǿ)

203
 ("\\," ?)
Stefan Monnier's avatar
Stefan Monnier committed
204 205 206
 ("\\/" ?)
 ("\\:" ?)
 ("\\;" ?)
207 208 209

 ((lambda (name char)
    (let* ((base (concat (match-string 1 name) (match-string 3 name)))
210
           (basechar (gethash base (ucs-names))))
211 212 213 214
      (when (latin-ltx--ascii-p basechar)
        (string (if (match-end 2) ?^ ?_) basechar))))
  "\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)")

215
 ((lambda (name _char)
216
    (let* ((basename (match-string 2 name))
217 218 219
           (name (if (match-end 1) (capitalize basename) (downcase basename))))
      (concat "^" (if (> (length name) 1) "\\") name)))
  "\\`MODIFIER LETTER \\(?:SMALL\\|CAPITA\\(L\\)\\) \\([[:ascii:]]+\\)\\'")
220

221 222 223
 ;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name))))
 ;;  "\\`MODIFIER LETTER SMALL \\(.\\)\\'")
 ;; ("^\\1" "\\`MODIFIER LETTER CAPITAL \\(.\\)\\'")
224
 ("^o_" ?º)
Stefan Monnier's avatar
Stefan Monnier committed
225 226 227 228 229
 ("^{SM}" ?)
 ("^{TEL}" ?)
 ("^{TM}" ?)

 ("\\b" ?̱)
230

Stefan Monnier's avatar
Stefan Monnier committed
231
 ("\\rq" ?)
232 233 234 235

 ;; FIXME: Provides some useful entries (yen, euro, copyright, registered,
 ;; currency, minus, micro), but also a lot of dubious ones.
 ((lambda (name char)
236 237 238
    (unless (or (latin-ltx--ascii-p char)
                ;; We prefer COMBINING LONG SOLIDUS OVERLAY for \not.
                (member name '("NOT SIGN")))
239 240 241 242
      (concat "\\" (downcase (match-string 1 name)))))
  "\\`\\([^- ]+\\) SIGN\\'")

 ((lambda (name char)
243 244 245 246 247 248
    ;; "GREEK SMALL LETTER PHI" (which is \phi) and "GREEK PHI SYMBOL"
    ;; (which is \varphi) are reversed in `ucs-names', so we define
    ;; them manually.
    (unless (string-match-p "\\<PHI\\>" name)
      (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase)
                            (match-string 2 name)))))
249
  "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'")
Stefan Monnier's avatar
Stefan Monnier committed
250

251
 ("\\phi" ?ϕ)
Stefan Monnier's avatar
Stefan Monnier committed
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
 ("\\Box" ?)
 ("\\Bumpeq" ?)
 ("\\Cap" ?)
 ("\\Cup" ?)
 ("\\Diamond" ?)
 ("\\Downarrow" ?)
 ("\\H{o}" ?ő)
 ("\\Im" ?)
 ("\\Join" ?)
 ("\\Leftarrow" ?)
 ("\\Leftrightarrow" ?)
 ("\\Ll" ?)
 ("\\Lleftarrow" ?)
 ("\\Longleftarrow" ?)
 ("\\Longleftrightarrow" ?)
 ("\\Longrightarrow" ?)
 ("\\Lsh" ?)
 ("\\Re" ?)
 ("\\Rightarrow" ?)
 ("\\Rrightarrow" ?)
 ("\\Rsh" ?)
 ("\\Subset" ?)
 ("\\Supset" ?)
 ("\\Uparrow" ?)
 ("\\Updownarrow" ?)
 ("\\Vdash" ?)
 ("\\Vert" ?)
 ("\\Vvdash" ?)
280
 ("\\aleph" ?)
Stefan Monnier's avatar
Stefan Monnier committed
281 282 283 284 285 286 287 288 289 290 291
 ("\\amalg" ?)
 ("\\angle" ?)
 ("\\approx" ?)
 ("\\approxeq" ?)
 ("\\ast" ?)
 ("\\asymp" ?)
 ("\\backcong" ?)
 ("\\backepsilon" ?)
 ("\\backprime" ?)
 ("\\backsim" ?)
 ("\\backsimeq" ?)
292
 ("\\backslash" ?\\)
Stefan Monnier's avatar
Stefan Monnier committed
293 294
 ("\\barwedge" ?)
 ("\\because" ?)
295
 ("\\beth" ?)
Stefan Monnier's avatar
Stefan Monnier committed
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
 ("\\between" ?)
 ("\\bigcap" ?)
 ("\\bigcirc" ?)
 ("\\bigcup" ?)
 ("\\bigstar" ?)
 ("\\bigtriangledown" ?)
 ("\\bigtriangleup" ?)
 ("\\bigvee" ?)
 ("\\bigwedge" ?)
 ("\\blacklozenge" ?)
 ("\\blacksquare" ?)
 ("\\blacktriangle" ?)
 ("\\blacktriangledown" ?)
 ("\\blacktriangleleft" ?)
 ("\\blacktriangleright" ?)
 ("\\bot" ?)
 ("\\bowtie" ?)
 ("\\boxminus" ?)
 ("\\boxplus" ?)
 ("\\boxtimes" ?)
 ("\\bullet" ?)
 ("\\bumpeq" ?)
 ("\\cap" ?)
 ("\\cdots" ?)
 ("\\centerdot" ?·)
 ("\\checkmark" ?)
 ("\\chi" ?χ)
323
 ("\\circ" ?)
Stefan Monnier's avatar
Stefan Monnier committed
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
 ("\\circeq" ?)
 ("\\circlearrowleft" ?)
 ("\\circlearrowright" ?)
 ("\\circledR" ?®)
 ("\\circledS" ?)
 ("\\circledast" ?)
 ("\\circledcirc" ?)
 ("\\circleddash" ?)
 ("\\clubsuit" ?)
 ("\\coloneq" ?)
 ("\\complement" ?)
 ("\\cong" ?)
 ("\\coprod" ?)
 ("\\cup" ?)
 ("\\curlyeqprec" ?)
 ("\\curlyeqsucc" ?)
 ("\\curlypreceq" ?)
 ("\\curlyvee" ?)
 ("\\curlywedge" ?)
 ("\\curvearrowleft" ?)
 ("\\curvearrowright" ?)

 ("\\dag" ?)
 ("\\dagger" ?)
348
 ("\\daleth" ?)
Stefan Monnier's avatar
Stefan Monnier committed
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
 ("\\dashv" ?)
 ("\\ddag" ?)
 ("\\ddagger" ?)
 ("\\ddots" ?)
 ("\\diamond" ?)
 ("\\diamondsuit" ?)
 ("\\divideontimes" ?)
 ("\\doteq" ?)
 ("\\doteqdot" ?)
 ("\\dotplus" ?)
 ("\\dotsquare" ?)
 ("\\downarrow" ?)
 ("\\downdownarrows" ?)
 ("\\downleftharpoon" ?)
 ("\\downrightharpoon" ?)
 ("\\ell" ?)
 ("\\emptyset" ?)
 ("\\eqcirc" ?)
 ("\\eqcolon" ?)
 ("\\eqslantgtr" ?)
 ("\\eqslantless" ?)
 ("\\equiv" ?)
 ("\\exists" ?)
 ("\\fallingdotseq" ?)
 ("\\flat" ?)
 ("\\forall" ?)
 ("\\frac1" ?)
 ("\\frac12" ?½)
 ("\\frac13" ?)
 ("\\frac14" ?¼)
 ("\\frac15" ?)
 ("\\frac16" ?)
 ("\\frac18" ?)
 ("\\frac23" ?)
 ("\\frac25" ?)
 ("\\frac34" ?¾)
 ("\\frac35" ?)
 ("\\frac38" ?)
 ("\\frac45" ?)
 ("\\frac56" ?)
 ("\\frac58" ?)
 ("\\frac78" ?)
 ("\\frown" ?)
 ("\\ge" ?)
 ("\\geq" ?)
 ("\\geqq" ?)
 ("\\geqslant" ?)
 ("\\gets" ?)
 ("\\gg" ?)
 ("\\ggg" ?)
399
 ("\\gimel" ?)
Stefan Monnier's avatar
Stefan Monnier committed
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
 ("\\gnapprox" ?)
 ("\\gneq" ?)
 ("\\gneqq" ?)
 ("\\gnsim" ?)
 ("\\gtrapprox" ?)
 ("\\gtrdot" ?)
 ("\\gtreqless" ?)
 ("\\gtreqqless" ?)
 ("\\gtrless" ?)
 ("\\gtrsim" ?)
 ("\\gvertneqq" ?)
 ("\\hbar" ?)
 ("\\heartsuit" ?)
 ("\\hookleftarrow" ?)
 ("\\hookrightarrow" ?)
 ("\\iff" ?)
 ("\\imath" ?ı)
 ("\\in" ?)
 ("\\infty" ?)
 ("\\int" ?)
 ("\\intercal" ?)
421
 ("\\langle" ?) ;; Was ?〈, see bug#12948.
422
 ("\\lbrace" ?{)
Andreas Schwab's avatar
Andreas Schwab committed
423
 ("\\lbrack" ?\[)
Stefan Monnier's avatar
Stefan Monnier committed
424 425 426 427 428 429 430 431 432
 ("\\lceil" ?)
 ("\\ldots" ?)
 ("\\le" ?)
 ("\\leadsto" ?)
 ("\\leftarrow" ?)
 ("\\leftarrowtail" ?)
 ("\\leftharpoondown" ?)
 ("\\leftharpoonup" ?)
 ("\\leftleftarrows" ?)
433
 ;; ("\\leftparengtr" ?〈), see bug#12948.
Stefan Monnier's avatar
Stefan Monnier committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
 ("\\leftrightarrow" ?)
 ("\\leftrightarrows" ?)
 ("\\leftrightharpoons" ?)
 ("\\leftrightsquigarrow" ?)
 ("\\leftthreetimes" ?)
 ("\\leq" ?)
 ("\\leqq" ?)
 ("\\leqslant" ?)
 ("\\lessapprox" ?)
 ("\\lessdot" ?)
 ("\\lesseqgtr" ?)
 ("\\lesseqqgtr" ?)
 ("\\lessgtr" ?)
 ("\\lesssim" ?)
 ("\\lfloor" ?)
 ("\\lhd" ?)
 ("\\rhd" ?)
 ("\\ll" ?)
 ("\\llcorner" ?)
 ("\\lnapprox" ?)
 ("\\lneq" ?)
 ("\\lneqq" ?)
 ("\\lnsim" ?)
 ("\\longleftarrow" ?)
 ("\\longleftrightarrow" ?)
 ("\\longmapsto" ?)
 ("\\longrightarrow" ?)
 ("\\looparrowleft" ?)
 ("\\looparrowright" ?)
 ("\\lozenge" ?)
 ("\\lq" ?)
 ("\\lrcorner" ?)
 ("\\ltimes" ?)
 ("\\lvertneqq" ?)
 ("\\maltese" ?)
 ("\\mapsto" ?)
 ("\\measuredangle" ?)
 ("\\mho" ?)
 ("\\mid" ?)
 ("\\models" ?)
 ("\\mp" ?)
 ("\\multimap" ?)
 ("\\nLeftarrow" ?)
 ("\\nLeftrightarrow" ?)
 ("\\nRightarrow" ?)
 ("\\nVDash" ?)
 ("\\nVdash" ?)
 ("\\nabla" ?)
 ("\\napprox" ?)
 ("\\natural" ?)
 ("\\ncong" ?)
 ("\\ne" ?)
 ("\\nearrow" ?)
 ("\\neg" ?¬)
 ("\\neq" ?)
 ("\\nequiv" ?)
 ("\\newline" ?)
 ("\\nexists" ?)
 ("\\ngeq" ?)
 ("\\ngeqq" ?)
 ("\\ngeqslant" ?)
 ("\\ngtr" ?)
 ("\\ni" ?)
 ("\\nleftarrow" ?)
 ("\\nleftrightarrow" ?)
 ("\\nleq" ?)
 ("\\nleqq" ?)
 ("\\nleqslant" ?)
 ("\\nless" ?)
 ("\\nmid" ?)
504
 ("\\not" ?̸)                            ;FIXME: conflict with "NOT SIGN" ¬.
Stefan Monnier's avatar
Stefan Monnier committed
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
 ("\\notin" ?)
 ("\\nparallel" ?)
 ("\\nprec" ?)
 ("\\npreceq" ?)
 ("\\nrightarrow" ?)
 ("\\nshortmid" ?)
 ("\\nshortparallel" ?)
 ("\\nsim" ?)
 ("\\nsimeq" ?)
 ("\\nsubset" ?)
 ("\\nsubseteq" ?)
 ("\\nsubseteqq" ?)
 ("\\nsucc" ?)
 ("\\nsucceq" ?)
 ("\\nsupset" ?)
 ("\\nsupseteq" ?)
 ("\\nsupseteqq" ?)
 ("\\ntriangleleft" ?)
 ("\\ntrianglelefteq" ?)
 ("\\ntriangleright" ?)
 ("\\ntrianglerighteq" ?)
 ("\\nvDash" ?)
 ("\\nvdash" ?)
 ("\\nwarrow" ?)
 ("\\odot" ?)
 ("\\oint" ?)
 ("\\ominus" ?)
 ("\\oplus" ?)
 ("\\oslash" ?)
 ("\\otimes" ?)
 ("\\par" ?)
 ("\\parallel" ?)
 ("\\partial" ?)
 ("\\perp" ?)
 ("\\pitchfork" ?)
 ("\\prec" ?)
 ("\\precapprox" ?)
 ("\\preceq" ?)
 ("\\precnapprox" ?)
 ("\\precnsim" ?)
 ("\\precsim" ?)
 ("\\prime" ?)
 ("\\prod" ?)
 ("\\propto" ?)
Kenichi Handa's avatar
Kenichi Handa committed
549
 ("\\qed" ?)
Stefan Monnier's avatar
Stefan Monnier committed
550
 ("\\quad" ?)
Mark Oteiza's avatar
Mark Oteiza committed
551
 ("\\rangle" ?\⟩) ;; Was ?〉, see bug#12948.
552
 ("\\rbrace" ?})
Andreas Schwab's avatar
Andreas Schwab committed
553
 ("\\rbrack" ?\])
Stefan Monnier's avatar
Stefan Monnier committed
554 555 556 557 558 559 560 561
 ("\\rceil" ?)
 ("\\rfloor" ?)
 ("\\rightarrow" ?)
 ("\\rightarrowtail" ?)
 ("\\rightharpoondown" ?)
 ("\\rightharpoonup" ?)
 ("\\rightleftarrows" ?)
 ("\\rightleftharpoons" ?)
562
 ;; ("\\rightparengtr" ?⦔) ;; Was ?〉, see bug#12948.
Stefan Monnier's avatar
Stefan Monnier committed
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
 ("\\rightrightarrows" ?)
 ("\\rightthreetimes" ?)
 ("\\risingdotseq" ?)
 ("\\rtimes" ?)
 ("\\sbs" ?)
 ("\\searrow" ?)
 ("\\setminus" ?)
 ("\\sharp" ?)
 ("\\shortmid" ?)
 ("\\shortparallel" ?)
 ("\\sim" ?)
 ("\\simeq" ?)
 ("\\smallamalg" ?)
 ("\\smallsetminus" ?)
 ("\\smallsmile" ?)
 ("\\smile" ?)
 ("\\spadesuit" ?)
 ("\\sphericalangle" ?)
 ("\\sqcap" ?)
 ("\\sqcup" ?)
 ("\\sqsubset" ?)
 ("\\sqsubseteq" ?)
 ("\\sqsupset" ?)
 ("\\sqsupseteq" ?)
 ("\\square" ?)
 ("\\squigarrowright" ?)
 ("\\star" ?)
 ("\\straightphi" ?φ)
 ("\\subset" ?)
 ("\\subseteq" ?)
 ("\\subseteqq" ?)
 ("\\subsetneq" ?)
 ("\\subsetneqq" ?)
 ("\\succ" ?)
 ("\\succapprox" ?)
 ("\\succcurlyeq" ?)
 ("\\succeq" ?)
 ("\\succnapprox" ?)
 ("\\succnsim" ?)
 ("\\succsim" ?)
 ("\\sum" ?)
 ("\\supset" ?)
 ("\\supseteq" ?)
 ("\\supseteqq" ?)
 ("\\supsetneq" ?)
 ("\\supsetneqq" ?)
 ("\\surd" ?)
 ("\\swarrow" ?)
 ("\\therefore" ?)
 ("\\thickapprox" ?)
 ("\\thicksim" ?)
 ("\\to" ?)
 ("\\top" ?)
 ("\\triangle" ?)
 ("\\triangledown" ?)
 ("\\triangleleft" ?)
 ("\\trianglelefteq" ?)
 ("\\triangleq" ?)
 ("\\triangleright" ?)
 ("\\trianglerighteq" ?)
 ("\\twoheadleftarrow" ?)
 ("\\twoheadrightarrow" ?)
 ("\\ulcorner" ?)
 ("\\uparrow" ?)
 ("\\updownarrow" ?)
 ("\\upleftharpoon" ?)
 ("\\uplus" ?)
 ("\\uprightharpoon" ?)
 ("\\upuparrows" ?)
 ("\\urcorner" ?)
 ("\\u{i}" ?ĭ)
 ("\\vDash" ?)
635 636

 ((lambda (name char)
637 638 639 640 641
    ;; "GREEK SMALL LETTER PHI" (which is \phi) and "GREEK PHI SYMBOL"
    ;; (which is \varphi) are reversed in `ucs-names', so we define
    ;; them manually.
    (unless (string-match-p "\\<PHI\\>" name)
      (concat "\\var" (downcase (match-string 1 name)))))
642 643
  "\\`GREEK \\([^- ]+\\) SYMBOL\\'")

644
 ("\\varphi" ?φ)
Stefan Monnier's avatar
Stefan Monnier committed
645 646
 ("\\varprime" ?)
 ("\\varpropto" ?)
647
 ("\\varsigma" ?ς)
Stefan Monnier's avatar
Stefan Monnier committed
648 649 650 651 652 653
 ("\\vartriangleleft" ?)
 ("\\vartriangleright" ?)
 ("\\vdash" ?)
 ("\\vdots" ?)
 ("\\vee" ?)
 ("\\veebar" ?)
654
 ("\\vert" ?|)
Stefan Monnier's avatar
Stefan Monnier committed
655 656 657 658 659 660 661 662 663 664
 ("\\wedge" ?)
 ("\\wp" ?)
 ("\\wr" ?)

 ("\\Bbb{N}" ?)			; AMS commands for blackboard bold
 ("\\Bbb{P}" ?)			; Also sometimes \mathbb.
 ("\\Bbb{R}" ?)
 ("\\Bbb{Z}" ?)
 ("--" ?)
 ("---" ?)
665 666 667 668
 ;; We used to use ~ for NBSP but that's inconvenient and may even look like
 ;; a bug where the user finds his ~ key doesn't insert a ~ any more.
 ("\\ " ? )
 ("\\\\" ?\\)
Stefan Monnier's avatar
Stefan Monnier committed
669 670 671 672 673 674
 ("\\mathscr{I}" ?)			; moment of inertia
 ("\\Smiley" ?)
 ("\\blacksmiley" ?)
 ("\\Frowny" ?)
 ("\\Letter" ?)
 ("\\permil" ?)
675 676 677
 ;; Probably not useful enough:
 ;; ("\\Telefon" ?☎)			; there are other possibilities
 ;; ("\\Radioactivity" ?☢)
678
 ;; ("\\Biohazard" ?☣)
679 680 681 682 683 684 685 686 687 688 689 690 691 692
 ;; ("\\Male" ?♂)
 ;; ("\\Female" ?♀)
 ;; ("\\Lightning" ?☇)
 ;; ("\\Mercury" ?☿)
 ;; ("\\Earth" ?♁)
 ;; ("\\Jupiter" ?♃)
 ;; ("\\Saturn" ?♄)
 ;; ("\\Uranus" ?♅)
 ;; ("\\Neptune" ?♆)
 ;; ("\\Pluto" ?♇)
 ;; ("\\Sun" ?☉)
 ;; ("\\Writinghand" ?✍)
 ;; ("\\Yinyang" ?☯)
 ;; ("\\Heart" ?♡)
Stefan Monnier's avatar
Stefan Monnier committed
693 694 695 696 697 698 699 700 701
 ("\\dh" ?ð)
 ("\\DH" ?Ð)
 ("\\th" ?þ)
 ("\\TH" ?Þ)
 ("\\lnot" ?¬)
 ("\\ordfeminine" ?ª)
 ("\\ordmasculine" ?º)
 ("\\lambdabar" ?ƛ)
 ("\\celsius" ?)
Dave Love's avatar
Dave Love committed
702
 ;; by analogy with lq, rq:
Stefan Monnier's avatar
Stefan Monnier committed
703 704 705
 ("\\ldq" ?\“)
 ("\\rdq" ?\”)
 ("\\defs" ?)				; per fuzz/zed
706
 ;; ("\\sqrt[3]" ?∛)
Stefan Monnier's avatar
Stefan Monnier committed
707
 ("\\llbracket" ?\〚) 			; stmaryrd
708
 ("\\rrbracket" ?\〛)
709 710
 ;; ("\\lbag" ?\〚) 			; fuzz
 ;; ("\\rbag" ?\〛)
Stefan Monnier's avatar
Stefan Monnier committed
711 712
 ("\\ldata" ?\《) 			; fuzz/zed
 ("\\rdata" ?\》)
713 714 715
 ;; From Karl Eichwalder.
 ("\\glq"  ?)
 ("\\grq"  ?)
Stefan Monnier's avatar
Stefan Monnier committed
716 717
 ("\\glqq"  ?) ("\\\"`"  ?)
 ("\\grqq"  ?) ("\\\"'"  ?)
718 719
 ("\\flq" ?)
 ("\\frq" ?)
720 721
 ("\\flqq" ?\«) ("\\\"<" ?\«)
 ("\\frqq" ?\») ("\\\">" ?\»)
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742

 ("\\-" ?­)   ;; soft hyphen

 ("\\textmu" ?µ)
 ("\\textfractionsolidus" ?)
 ("\\textbigcircle" ?)
 ("\\textmusicalnote" ?)
 ("\\textdied" ?)
 ("\\textcolonmonetary" ?)
 ("\\textwon" ?)
 ("\\textnaira" ?)
 ("\\textpeso" ?)
 ("\\textlira" ?)
 ("\\textrecipe" ?)
 ("\\textinterrobang" ?)
 ("\\textpertenthousand" ?)
 ("\\textbaht" ?฿)
 ("\\textnumero" ?)
 ("\\textdiscount" ?)
 ("\\textestimated" ?)
 ("\\textopenbullet" ?)
Mark Oteiza's avatar
Mark Oteiza committed
743 744
 ("\\textlquill" ?\⁅)
 ("\\textrquill" ?\⁆)
745 746
 ("\\textcircledP" ?)
 ("\\textreferencemark" ?)
Dave Love's avatar
Dave Love committed
747
 )
748 749

;;; latin-ltx.el ends here