;;; org-entities.el --- Support for special entities in Org-mode
-;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten at orgmode dot org>,
;; Ulf Stegemann <ulf at zeitform dot de>
;; Keywords: outlines, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 7.4
;;
;; This file is part of GNU Emacs.
;;
;;; Code:
-(require 'org-macs)
-
-(declare-function org-table-align "org-table" ())
+(declare-function org-toggle-pretty-entities "org" ())
+(declare-function org-table-align "org-table" ())
(eval-when-compile
(require 'cl))
For example, this will replace \"\\nsup\" with \"[not a superset of]\"
in backends where the corresponding character is not available."
:group 'org-entities
+ :version "24.1"
:type 'boolean)
(defcustom org-entities-user nil
Latin1 replacement Use the special characters available in latin1.
utf-8 replacement Use the special characters available in utf-8.
-If you define new entities here that require specific LaTeX packages to be
-loaded, add these packages to `org-export-latex-packages-alist'."
+If you define new entities here that require specific LaTeX
+packages to be loaded, add these packages to `org-latex-packages-alist'."
:group 'org-entities
+ :version "24.1"
:type '(repeat
(list
(string :tag "name ")
("real" "\\Re" t "ℜ" "R" "R" "ℜ")
("image" "\\Im" t "ℑ" "I" "I" "ℑ")
("weierp" "\\wp" t "℘" "P" "P" "℘")
+ ("ell" "\\ell" t "ℓ" "ell" "ell" "ℓ")
+ ("imath" "\\imath" t "ı" "[dotless i]" "dotless i" "ı")
+ ("jmath" "\\jmath" t "ȷ" "[dotless j]" "dotless j" "ȷ")
"** Greek"
("Alpha" "A" nil "Α" "Alpha" "Alpha" "Α")
("upsilon" "\\upsilon" t "υ" "upsilon" "upsilon" "υ")
("Phi" "\\Phi" t "Φ" "Phi" "Phi" "Φ")
("phi" "\\phi" t "φ" "phi" "phi" "φ")
+ ("varphi" "\\varphi" t "ϕ" "varphi" "varphi" "ɸ")
("Chi" "X" nil "Χ" "Chi" "Chi" "Χ")
("chi" "\\chi" t "χ" "chi" "chi" "χ")
("acutex" "\\acute x" t "´x" "'x" "'x" "𝑥́")
("Omega" "\\Omega" t "Ω" "Omega" "Omega" "Ω")
("omega" "\\omega" t "ω" "omega" "omega" "ω")
("piv" "\\varpi" t "ϖ" "omega-pi" "omega-pi" "ϖ")
+ ("varpi" "\\varpi" t "ϖ" "omega-pi" "omega-pi" "ϖ")
("partial" "\\partial" t "∂" "[partial differential]" "[partial differential]" "∂")
"** Hebrew"
("alefsym" "\\aleph" t "ℵ" "aleph" "aleph" "ℵ")
+ ("aleph" "\\aleph" t "ℵ" "aleph" "aleph" "ℵ")
+ ("gimel" "\\gimel" t "ℷ" "gimel" "gimel" "ℷ")
+ ("beth" "\\beth" t "ℶ" "beth" "beth" "ב")
+ ("dalet" "\\daleth" t "ℸ" "dalet" "dalet" "ד")
"** Dead languages"
("ETH" "\\DH{}" nil "Ð" "D" "Ð" "Ð")
"* Punctuation"
"** Dots and Marks"
("dots" "\\dots{}" nil "…" "..." "..." "…")
+ ("cdots" "\\cdots{}" t "⋯" "..." "..." "⋯")
("hellip" "\\dots{}" nil "…" "..." "..." "…")
("middot" "\\textperiodcentered{}" nil "·" "." "·" "·")
("iexcl" "!`" nil "¡" "!" "¡" "¡")
"* Other"
"** Misc. (often used)"
- ("circ" "\\circ" t "ˆ" "^" "^" "ˆ")
- ("vert" "\\vert{}" t "|" "|" "|" "|")
+ ("circ" "\\^{}" nil "ˆ" "^" "^" "ˆ")
+ ("vert" "\\vert{}" t "|" "|" "|" "|")
("brvbar" "\\textbrokenbar{}" nil "¦" "|" "¦" "¦")
+ ("S" "\\S" nil "§" "paragraph" "§" "§")
("sect" "\\S" nil "§" "paragraph" "§" "§")
("amp" "\\&" nil "&" "&" "&" "&")
("lt" "\\textless{}" nil "<" "<" "<" "<")
("gt" "\\textgreater{}" nil ">" ">" ">" ">")
- ("tilde" "\\~{}" nil "˜" "~" "~" "~")
+ ("tilde" "\\textasciitilde{}" nil "~" "~" "~" "~")
+ ("slash" "/" nil "/" "/" "/" "/")
+ ("plus" "+" nil "+" "+" "+" "+")
+ ("under" "\\_" nil "_" "_" "_" "_")
+ ("equal" "=" nil "=" "=" "=" "=")
+ ("asciicirc" "\\textasciicircum{}" nil "^" "^" "^" "^")
("dagger" "\\textdagger{}" nil "†" "[dagger]" "[dagger]" "†")
+ ("dag" "\\dag{}" nil "†" "[dagger]" "[dagger]" "†")
("Dagger" "\\textdaggerdbl{}" nil "‡" "[doubledagger]" "[doubledagger]" "‡")
+ ("ddag" "\\ddag{}" nil "‡" "[doubledagger]" "[doubledagger]" "‡")
"** Whitespace"
("nbsp" "~" nil " " " " " " " ")
("plusmn" "\\textpm{}" nil "±" "+-" "±" "±")
("times" "\\texttimes{}" nil "×" "*" "×" "×")
("frasl" "/" nil "⁄" "/" "/" "⁄")
+ ("colon" "\\colon" t ":" ":" ":" ":")
("div" "\\textdiv{}" nil "÷" "/" "÷" "÷")
("frac12" "\\textonehalf{}" nil "½" "1/2" "½" "½")
("frac14" "\\textonequarter{}" nil "¼" "1/4" "¼" "¼")
("prod" "\\prod" t "∏" "[product]" "[n-ary product]" "∏")
("micro" "\\textmu{}" nil "µ" "micro" "µ" "µ")
("macr" "\\textasciimacron{}" nil "¯" "[macron]" "¯" "¯")
- ("deg" "\\textdegree{}" nil "deg" "degree" "°" "°")
+ ("deg" "\\textdegree{}" nil "°" "degree" "°" "°")
("prime" "\\prime" t "′" "'" "'" "′")
("Prime" "\\prime{}\\prime" t "″" "''" "''" "″")
("infin" "\\propto" t "∞" "[infinity]" "[infinity]" "∞")
("infty" "\\infty" t "∞" "[infinity]" "[infinity]" "∞")
("prop" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝")
- ("proptp" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝")
+ ("propto" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝")
("not" "\\textlnot{}" nil "¬" "[angled dash]" "¬" "¬")
+ ("neg" "\\neg{}" t "¬" "[angled dash]" "¬" "¬")
("land" "\\land" t "∧" "[logical and]" "[logical and]" "∧")
("wedge" "\\wedge" t "∧" "[logical and]" "[logical and]" "∧")
("lor" "\\lor" t "∨" "[logical or]" "[logical or]" "∨")
("cap" "\\cap" t "∩" "[intersection]" "[intersection]" "∩")
("cup" "\\cup" t "∪" "[union]" "[union]" "∪")
("int" "\\int" t "∫" "[integral]" "[integral]" "∫")
+ ("therefore" "\\therefore" t "∴" "[therefore]" "[therefore]" "∴")
("there4" "\\therefore" t "∴" "[therefore]" "[therefore]" "∴")
+ ("because" "\\because" t "∵" "[because]" "[because]" "∵")
("sim" "\\sim" t "∼" "~" "~" "∼")
("cong" "\\cong" t "≅" "[approx. equal to]" "[approx. equal to]" "≅")
("simeq" "\\simeq" t "≅" "[approx. equal to]" "[approx. equal to]" "≅")
("ne" "\\ne" t "≠" "[not equal to]" "[not equal to]" "≠")
("neq" "\\neq" t "≠" "[not equal to]" "[not equal to]" "≠")
("equiv" "\\equiv" t "≡" "[identical to]" "[identical to]" "≡")
+
+ ("triangleq" "\\triangleq" t "≜" "[defined to]" "[defined to]" "≜")
("le" "\\le" t "≤" "<=" "<=" "≤")
+ ("leq" "\\le" t "≤" "<=" "<=" "≤")
("ge" "\\ge" t "≥" ">=" ">=" "≥")
+ ("geq" "\\ge" t "≥" ">=" ">=" "≥")
+ ("lessgtr" "\\lessgtr" t "≶" "[less than or greater than]" "[less than or greater than]" "≶")
+ ("lesseqgtr" "\\lesseqgtr" t "⋚" "[less than or equal or greater than or equal]" "[less than or equal or greater than or equal]" "⋚")
+ ("ll" "\\ll" t "≪" "<<" "<<" "≪")
+ ("Ll" "\\lll" t "⋘" "<<<" "<<<" "⋘")
+ ("lll" "\\lll" t "⋘" "<<<" "<<<" "⋘")
+ ("gg" "\\gg" t "≫" ">>" ">>" "≫")
+ ("Gg" "\\ggg" t "⋙" ">>>" ">>>" "⋙")
+ ("ggg" "\\ggg" t "⋙" ">>>" ">>>" "⋙")
+ ("prec" "\\prec" t "≺" "[precedes]" "[precedes]" "≺")
+ ("preceq" "\\preceq" t "≼" "[precedes or equal]" "[precedes or equal]" "≼")
+ ("preccurlyeq" "\\preccurlyeq" t "≼" "[precedes or equal]" "[precedes or equal]" "≼")
+ ("succ" "\\succ" t "≻" "[succeeds]" "[succeeds]" "≻")
+ ("succeq" "\\succeq" t "≽" "[succeeds or equal]" "[succeeds or equal]" "≽")
+ ("succcurlyeq" "\\succcurlyeq" t "≽" "[succeeds or equal]" "[succeeds or equal]" "≽")
("sub" "\\subset" t "⊂" "[subset of]" "[subset of]" "⊂")
("subset" "\\subset" t "⊂" "[subset of]" "[subset of]" "⊂")
("sup" "\\supset" t "⊃" "[superset of]" "[superset of]" "⊃")
("sube" "\\subseteq" t "⊆" "[subset of or equal to]" "[subset of or equal to]" "⊆")
("nsup" "\\not\\supset" t "⊅" "[not a superset of]" "[not a superset of]" "⊅")
("supe" "\\supseteq" t "⊇" "[superset of or equal to]" "[superset of or equal to]" "⊇")
+ ("setminus" "\\setminus" t "∖" "\" "\" "⧵")
("forall" "\\forall" t "∀" "[for all]" "[for all]" "∀")
("exist" "\\exists" t "∃" "[there exists]" "[there exists]" "∃")
("exists" "\\exists" t "∃" "[there exists]" "[there exists]" "∃")
+ ("nexist" "\\nexists" t "∃" "[there does not exists]" "[there does not exists]" "∄")
+ ("nexists" "\\nexists" t "∃" "[there does not exists]" "[there does not exists]" "∄")
("empty" "\\empty" t "∅" "[empty set]" "[empty set]" "∅")
("emptyset" "\\emptyset" t "∅" "[empty set]" "[empty set]" "∅")
("isin" "\\in" t "∈" "[element of]" "[element of]" "∈")
("rfloor" "\\rfloor" t "⌋" "[right floor]" "[right floor]" "⌋")
("lang" "\\langle" t "⟨" "<" "<" "⟨")
("rang" "\\rangle" t "⟩" ">" ">" "⟩")
+ ("hbar" "\\hbar" t "ℏ" "hbar" "hbar" "ℏ")
+ ("mho" "\\mho" t "℧" "mho" "mho" "℧")
"** Arrows"
("larr" "\\leftarrow" t "←" "<-" "<-" "←")
("odot" "\\odot" t "o" "[circled dot]" "[circled dot]" "ʘ")
("oplus" "\\oplus" t "⊕" "[circled plus]" "[circled plus]" "⊕")
("otimes" "\\otimes" t "⊗" "[circled times]" "[circled times]" "⊗")
- ("checkmark" "\\checkmark" t "✓" "[checkmark]" "[checkmark]" "✓")
+ ("check" "\\checkmark" t "✓" "[checkmark]" "[checkmark]" "✓")
+ ("checkmark" "\\checkmark" t "✓" "[checkmark]" "[checkmark]" "✓")
"** Miscellaneous (seldom used)"
("para" "\\P{}" nil "¶" "[pilcrow]" "¶" "¶")
("rlm" "" nil "‏" "" "" "")
"** Smilies"
- ("smile" "\\smile" t "☺" ":-)" ":-)" "⌣")
+ ("smile" "\\smile" t "⌣" ":-)" ":-)" "⌣")
+ ("frown" "\\frown" t "⌢" ":-(" ":-(" "⌢")
("smiley" "\\smiley{}" nil "☺" ":-)" ":-)" "☺")
("blacksmile" "\\blacksmiley{}" nil "☻" ":-)" ":-)" "☻")
("sad" "\\frownie{}" nil "☹" ":-(" ":-(" "☹")
("spadesuit" "\\spadesuit" t "♠" "[spades]" "[spades]" "♠")
("hearts" "\\heartsuit" t "♥" "[hearts]" "[hearts]" "♥")
("heartsuit" "\\heartsuit" t "♥" "[hearts]" "[hearts]" "♥")
- ("diams" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "♦")
- ("diamondsuit" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "♦")
- ("Diamond" "\\diamond" t "⋄" "[diamond]" "[diamond]" "⋄")
- ("loz" "\\diamond" t "◊" "[lozenge]" "[lozenge]" "◊")
+ ("diams" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "◆")
+ ("diamondsuit" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "◆")
+ ("diamond" "\\diamondsuit" t "⋄" "[diamond]" "[diamond]" "◆")
+ ("Diamond" "\\diamondsuit" t "⋄" "[diamond]" "[diamond]" "◆")
+ ("loz" "\\lozenge" t "◊" "[lozenge]" "[lozenge]" "⧫")
)
"Default entities used in Org-mode to produce special characters.
For details see `org-entities-user'.")
;; Helpfunctions to create a table for orgmode.org/worg/org-symbols.org
(defun org-entities-create-table ()
- "Create an org-mode table with all entities."
+ "Create an Org mode table with all entities."
(interactive)
- (let ((ll org-entities)
- (pos (point))
- e latex mathp html latin utf8 name ascii)
+ (let ((pos (point)) e latex mathp html latin utf8 name ascii)
(insert "|Name|LaTeX code|LaTeX|HTML code |HTML|ASCII|Latin1|UTF-8\n|-\n")
- (while ll
- (when (listp e)
- (setq e (pop ll))
- (setq name (car e)
- latex (nth 1 e)
- mathp (nth 2 e)
- html (nth 3 e)
- ascii (nth 4 e)
- latin (nth 5 e)
- utf8 (nth 6 e))
- (if (equal ascii "|") (setq ascii "\\vert"))
- (if (equal latin "|") (setq latin "\\vert"))
- (if (equal utf8 "|") (setq utf8 "\\vert"))
- (if (equal ascii "=>") (setq ascii "= >"))
- (if (equal latin "=>") (setq latin "= >"))
- (insert "|" name
- "|" (format "=%s=" latex)
- "|" (format (if mathp "$%s$" "$\\mbox{%s}$")
- latex)
- "|" (format "=%s=" html) "|" html
- "|" ascii "|" latin "|" utf8
- "|\n")))
+ (mapc (lambda (e) (when (listp e)
+ (setq name (car e)
+ latex (nth 1 e)
+ mathp (nth 2 e)
+ html (nth 3 e)
+ ascii (nth 4 e)
+ latin (nth 5 e)
+ utf8 (nth 6 e))
+ (if (equal ascii "|") (setq ascii "\\vert"))
+ (if (equal latin "|") (setq latin "\\vert"))
+ (if (equal utf8 "|") (setq utf8 "\\vert"))
+ (if (equal ascii "=>") (setq ascii "= >"))
+ (if (equal latin "=>") (setq latin "= >"))
+ (insert "|" name
+ "|" (format "=%s=" latex)
+ "|" (format (if mathp "$%s$" "$\\mbox{%s}$")
+ latex)
+ "|" (format "=%s=" html) "|" html
+ "|" ascii "|" latin "|" utf8
+ "|\n")))
+ org-entities)
(goto-char pos)
(org-table-align)))
+(defvar org-pretty-entities) ;; declare defcustom from org
(defun org-entities-help ()
"Create a Help buffer with all available entities."
(interactive)
(princ (format " %-8s \\%-16s %-22s %-13s\n"
utf8 name latex html))))))
(with-current-buffer "*Org Entity Help*"
- (org-mode))
+ (org-mode)
+ (when org-pretty-entities
+ (org-toggle-pretty-entities)))
(select-window (get-buffer-window "*Org Entity Help*")))
;; coding: utf-8
;; End:
-
;;; org-entities.el ends here