Implement new and better support for entities
[org-mode.git] / lisp / org-entities.el
blobd9e4d5ad5c8d4a0ee4a2b35fe34c7f0f4d6a0c5c
1 ;;; org-entities.el --- Support for special entities in Org-mode
3 ;; Copyright (C) 2010 Free Software Foundation, Inc.
5 ;; Author: Carsten Dominik <carsten at orgmode dot org>,
6 ;; Ulf Stegemann <ulf at zeitform dot de>
7 ;; Keywords: outlines, calendar, wp
8 ;; Homepage: http://orgmode.org
9 ;; Version: 6.34trans
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 ;;; Commentary:
29 (eval-when-compile
30 (require 'cl))
32 (defgroup org-entities nil
33 "Options concerning entities in Org-mode."
34 :tag "Org Entities"
35 :group 'org)
37 (defcustom org-entities-ascii-explanatory nil
38 "Non-nil means replace special entities in ASCII.
39 For example, this will replace \"\\nsup\" with \"[not a superset of]\"
40 in backends where the corresponding character is not available."
41 :group 'org-entities
42 :type 'boolean)
44 (defcustom org-entities-user nil
45 "User-defined entities used in Org-mode to preduce special characters.
46 Each entry in this list is a list of strings. It associate the name
47 of the entity that can be inserted into an Org file as \\name with the
48 appropriate replacements for the different export backends. The order
49 of the fields is he following
51 name As a string, without the leading backslash
52 LaTeX replacement In ready LaTeX, no further processing will take place
53 LaTeX mathp A Boolean, either t or nil. t if this entity needs
54 to be in math mode.
55 HTML replacement In ready HTML, no further processing will take place.
56 Usually this will be an &...; entity.
57 ASCII replacement Plain ASCII, no extensions. Symbols that cannot be
58 represented will be written out as an explanatory text.
59 But see the variable `org-entities-ascii-keep-macro-form'.
60 Latin1 replacement Use the special characters available in latin1.
61 utf-8 replacement Use special character available in utf-8."
62 :group 'org-entities
63 :type '(repeat
64 (list
65 (string :tag "name ")
66 (string :tag "LaTeX ")
67 (boolean :tag "Require LaTeX math?")
68 (string :tag "HTML ")
69 (string :tag "ASCII ")
70 (string :tag "Latin1")
71 (string :tag "utf-8 "))))
73 (defconst org-entities
74 '(("nbsp" "~" nil "&nbsp;" " " " " " ")
75 ("iexcl" "!`" nil "&iexcl;" "!" "¡" "¡")
76 ("cent" "\\textcent" nil "&cent;" "cent" "¢" "¢")
77 ("pound" "\\pounds" nil "&pound;" "pound" "£" "£")
78 ("curren" "\\textcurrency" nil "&curren;" "curr." "¤" "¤")
79 ("yen" "\\textyen" nil "&yen;" "yen" "¥" "¥")
80 ("brvbar" "\\textbrokenbar" nil "&brvbar;" "|" "¦" "¦")
81 ("vert" "\\vert" t "&#124;" "|" "|" "|")
82 ("sect" "\\S" nil "&sect;" "paragraph" "§" "§")
83 ("uml" "\\textasciidieresis" nil "&uml;" "[diaeresis]" "¨" "¨")
84 ("copy" "\\textcopyright" nil "&copy;" "(c)" "©" "©")
85 ("ordf" "\\textordfeminine" nil "&ordf;" "_a_" "ª" "ª")
86 ("laquo" "\\guillemotleft" nil "&laquo;" "<<" "«" "«")
87 ("not" "\\textlnot" nil "&not;" "[angled dash]" "¬" "¬")
88 ("shy" "\\-" nil "&shy;" "" "" "")
89 ("reg" "\\textregistered" nil "&reg;" "(r)" "®" "®")
90 ("macr" "\\textasciimacron" nil "&macr;" "[macron]" "¯" "¯")
91 ("deg" "\\textdegree" nil "deg" "degree" "°" "°")
92 ("pm" "\\textpm" nil "&plusmn;" "+-" "±" "±")
93 ("plusmn" "\\textpm" nil "&plusmn;" "+-" "±" "±")
94 ("sup2" "\\texttwosuperior" nil "&sup2;" "^2" "²" "²")
95 ("sup3" "\\textthreesuperior" nil "&sup3;" "^3" "³" "³")
96 ("acute x" "\\acute x" t "&acute x;" "'x" "'x" "𝑥́")
97 ("micro" "\\textmu" nil "&micro;" "micro" "µ" "µ")
98 ("para" "\\P" nil "&para;" "[pilcrow]" "¶" "¶")
99 ("middot" "\\textperiodcentered" nil "&middot;" "." "·" "·")
100 ("odot" "\\odot" t "o" "[circled dot]" "[circled dot]" "ʘ")
101 ("star" "\\star" t "*" "*" "*" "⋆")
102 ("cedil" "\\c" nil "&cedil;" "[cedilla]" "¸" "¸")
103 ("sup1" "\\textonesuperior" nil "&sup1;" "^1" "¹" "¹")
104 ("ordm" "\\textordmasculine" nil "&ordm;" "_o_" "º" "º")
105 ("raquo" "\\guillemotright" nil "&raquo;" ">>" "»" "»")
106 ("iquest" "?`" nil "&iquest;" "?" "¿" "¿")
107 ("Agrave" "\\`{A}" nil "&Agrave;" "A" "À" "À")
108 ("Aacute" "\\'{A}" nil "&Aacute;" "A" "Á" "Á")
109 ("Acirc" "\\^{A}" nil "&Acirc;" "A" "Â" "Â")
110 ("Atilde" "\\~{A}" nil "&Atilde;" "A" "Ã" "Ã")
111 ("Auml" "\\\"{A}" nil "&Auml;" "Ae" "Ä" "Ä")
112 ("Aring" "\\AA" nil "&Aring;" "A" "Å" "Å")
113 ("AA" "\\AA" nil "&Aring;" "A" "Å" "Å")
114 ("AElig" "\\AE" nil "&AElig;" "AE" "Æ" "Æ")
115 ("Ccedil" "\\c{C}" nil "&Ccedil;" "C" "Ç" "Ç")
116 ("Egrave" "\\`{E}" nil "&Egrave;" "E" "È" "È")
117 ("Eacute" "\\'{E}" nil "&Eacute;" "E" "É" "É")
118 ("Ecirc" "\\^{E}" nil "&Ecirc;" "E" "Ê" "Ê")
119 ("Euml" "\\\"{E}" nil "&Euml;" "E" "Ë" "Ë")
120 ("Igrave" "\\`{I}" nil "&Igrave;" "I" "Ì" "Ì")
121 ("Iacute" "\\'{I}" nil "&Iacute;" "I" "Í" "Í")
122 ("Icirc" "\\^{I}" nil "&Icirc;" "I" "Î" "Î")
123 ("Iuml" "\\\"{I}" nil "&Iuml;" "I" "Ï" "Ï")
124 ("ETH" "\\DH" nil "&ETH;" "D" "Ð" "Ð")
125 ("Ntilde" "\\~{N}" nil "&Ntilde;" "N" "Ñ" "Ñ")
126 ("Ograve" "\\`{O}" nil "&Ograve;" "O" "Ò" "Ò")
127 ("Oacute" "\\'{O}" nil "&Oacute;" "O" "Ó" "Ó")
128 ("Ocirc" "\\^{O}" nil "&Ocirc;" "O" "Ô" "Ô")
129 ("Otilde" "\\~{O}" nil "&Otilde;" "O" "Õ" "Õ")
130 ("Ouml" "\\\"{O}" nil "&Ouml;" "Oe" "Ö" "Ö")
131 ("times" "\\texttimes" nil "&times;" "*" "×" "×")
132 ("Oslash" "\\O" nil "&Oslash;" "O" "Ø" "Ø")
133 ("Ugrave" "\\`{U}" nil "&Ugrave;" "U" "Ù" "Ù")
134 ("Uacute" "\\'{U}" nil "&Uacute;" "U" "Ú" "Ú")
135 ("Ucirc" "\\^{U}" nil "&Ucirc;" "U" "Û" "Û")
136 ("Uuml" "\\\"{U}" nil "&Uuml;" "Ue" "Ü" "Ü")
137 ("Yacute" "\\'{Y}" nil "&Yacute;" "Y" "Ý" "Ý")
138 ("THORN" "\\TH" nil "&THORN;" "TH" "Þ" "Þ")
139 ("szlig" "\\ss" nil "&szlig;" "ss" "ß" "ß")
140 ("agrave" "\\`{a}" nil "&agrave;" "a" "à" "à")
141 ("aacute" "\\'{a}" nil "&aacute;" "a" "á" "á")
142 ("acirc" "\\^{a}" nil "&acirc;" "a" "â" "â")
143 ("atilde" "\\~{a}" nil "&atilde;" "a" "ã" "ã")
144 ("auml" "\\\"{a}" nil "&auml;" "ae" "ä" "ä")
145 ("aring" "\\aa" nil "&aring;" "a" "å" "å")
146 ("aelig" "\\ae" nil "&aelig;" "ae" "æ" "æ")
147 ("ccedil" "\\c{c}" nil "&ccedil;" "c" "ç" "ç")
148 ("checkmark" "\\checkmark" t "&#10003;" "[checkmark]" "[checkmark]" "✓")
149 ("egrave" "\\`{e}" nil "&egrave;" "e" "è" "è")
150 ("eacute" "\\'{e}" nil "&eacute;" "e" "é" "é")
151 ("ecirc" "\\^{e}" nil "&ecirc;" "e" "ê" "ê")
152 ("euml" "\\\"{e}" nil "&euml;" "e" "ë" "ë")
153 ("igrave" "\\`{i}" nil "&igrave;" "i" "ì" "ì")
154 ("iacute" "\\'{i}" nil "&iacute;" "i" "í" "í")
155 ("icirc" "\\^{i}" nil "&icirc;" "i" "î" "î")
156 ("iuml" "\\\"{i}" nil "&iuml;" "i" "ï" "ï")
157 ("eth" "\\dh" nil "&eth;" "dh" "ð" "ð")
158 ("ntilde" "\\~{n}" nil "&ntilde;" "n" "ñ" "ñ")
159 ("ograve" "\\`{o}" nil "&ograve;" "o" "ò" "ò")
160 ("oacute" "\\'{o}" nil "&oacute;" "o" "ó" "ó")
161 ("ocirc" "\\^{o}" nil "&ocirc;" "o" "ô" "ô")
162 ("otilde" "\\~{o}" nil "&otilde;" "o" "õ" "õ")
163 ("ouml" "\\\"{o}" nil "&ouml;" "oe" "ö" "ö")
164 ("oslash" "\\o" nil "&oslash;" "o" "ø" "ø")
165 ("ugrave" "\\`{u}" nil "&ugrave;" "u" "ù" "ù")
166 ("uacute" "\\'{u}" nil "&uacute;" "u" "ú" "ú")
167 ("ucirc" "\\^{u}" nil "&ucirc;" "u" "û" "û")
168 ("uuml" "\\\"{u}" nil "&uuml;" "ue" "ü" "ü")
169 ("yacute" "\\'{y}" nil "&yacute;" "y" "ý" "ý")
170 ("thorn" "\\th" nil "&thorn;" "th" "þ" "þ")
171 ("yuml" "\\\"{y}" nil "&yuml;" "y" "ÿ" "ÿ")
172 ("fnof" "\\textit{f}" nil "&fnof;" "f" "f" "ƒ")
173 ("Alpha" "A" nil "&Alpha;" "Alpha" "Alpha" "Α")
174 ("Beta" "B" nil "&Beta;" "Beta" "Beta" "Β")
175 ("Gamma" "\\Gamma" t "&Gamma;" "Gamma" "Gamma" "Γ")
176 ("Delta" "\\Delta" t "&Delta;" "Delta" "Gamma" "Δ")
177 ("Epsilon" "E" nil "&Epsilon;" "Epsilon" "Epsilon" "Ε")
178 ("Zeta" "Z" nil "&Zeta;" "Zeta" "Zeta" "Ζ")
179 ("Eta" "H" nil "&Eta;" "Eta" "Eta" "Η")
180 ("Theta" "\\Theta" t "&Theta;" "Theta" "Theta" "Θ")
181 ("Iota" "I" nil "&Iota;" "Iota" "Iota" "Ι")
182 ("Kappa" "K" nil "&Kappa;" "Kappa" "Kappa" "Κ")
183 ("Lambda" "\\Lambda" t "&Lambda;" "Lambda" "Lambda" "Λ")
184 ("Mu" "M" nil "&Mu;" "Mu" "Mu" "Μ")
185 ("Nu" "N" nil "&Nu;" "Nu" "Nu" "Ν")
186 ("Xi" "\\Xi" t "&Xi;" "Xi" "Xi" "Ξ")
187 ("Omicron" "O" nil "&Omicron;" "Omicron" "Omicron" "Ο")
188 ("Pi" "\\Pi" t "&Pi;" "Pi" "Pi" "Π")
189 ("Rho" "P" nil "&Rho;" "Rho" "Rho" "Ρ")
190 ("Sigma" "\\Sigma" t "&Sigma;" "Sigma" "Sigma" "Σ")
191 ("Tau" "T" nil "&Tau;" "Tau" "Tau" "Τ")
192 ("Upsilon" "\\Upsilon" t "&Upsilon;" "Upsilon" "Upsilon" "Υ")
193 ("Phi" "\\Phi" t "&Phi;" "Phi" "Phi" "Φ")
194 ("Chi" "X" nil "&Chi;" "Chi" "Chi" "Χ")
195 ("Psi" "\\Psi" t "&Psi;" "Psi" "Psi" "Ψ")
196 ("Omega" "\\Omega" t "&Omega;" "Omega" "Omega" "Ω")
197 ("alpha" "\\alpha" t "&alpha;" "alpha" "alpha" "α")
198 ("beta" "\\beta" t "&beta;" "beta" "beta" "β")
199 ("gamma" "\\gamma" t "&gamma;" "gamma" "gamma" "γ")
200 ("delta" "\\delta" t "&delta;" "delta" "delta" "δ")
201 ("epsilon" "\\epsilon" t "&epsilon;" "epsilon" "epsilon" "ε")
202 ("varepsilon" "\\varepsilon" t "&epsilon;" "varepsilon" "varepsilon" "ε")
203 ("zeta" "\\zeta" t "&zeta;" "zeta" "zeta" "ζ")
204 ("eta" "\\eta" t "&eta;" "eta" "eta" "η")
205 ("theta" "\\theta" t "&theta;" "theta" "theta" "θ")
206 ("iota" "\\iota" t "&iota;" "iota" "iota" "ι")
207 ("kappa" "\\kappa" t "&kappa;" "kappa" "kappa" "κ")
208 ("lambda" "\\lambda" t "&lambda;" "lambda" "lambda" "λ")
209 ("mu" "\\mu" t "&mu;" "mu" "mu" "μ")
210 ("nu" "\\nu" t "&nu;" "nu" "nu" "ν")
211 ("xi" "\\xi" t "&xi;" "xi" "xi" "ξ")
212 ("omicron" "\\textit{o}" nil "&omicron;" "omicron" "omicron" "ο")
213 ("pi" "\\pi" t "&pi;" "pi" "pi" "π")
214 ("rho" "\\rho" t "&rho;" "rho" "rho" "ρ")
215 ("sigmaf" "\\varsigma" t "&sigmaf;" "sigmaf" "sigmaf" "ς")
216 ("varsigma" "\\varsigma" t "&sigmaf;" "varsigma" "varsigma" "ς")
217 ("sigma" "\\sigma" t "&sigma;" "sigma" "sigma" "σ")
218 ("tau" "\\tau" t "&tau;" "tau" "tau" "τ")
219 ("upsilon" "\\upsilon" t "&upsilon;" "upsilon" "upsilon" "υ")
220 ("phi" "\\phi" t "&phi;" "phi" "phi" "φ")
221 ("chi" "\\chi" t "&chi;" "chi" "chi" "χ")
222 ("psi" "\\psi" t "&psi;" "psi" "psi" "ψ")
223 ("omega" "\\omega" t "&omega;" "omega" "omega" "ω")
224 ("thetasym" "\\vartheta" t "&thetasym;" "theta" "theta" "ϑ")
225 ("vartheta" "\\vartheta" t "&thetasym;" "theta" "theta" "ϑ")
226 ("upsih" "\\Upsilon" t "&upsih;" "upsilon" "upsilon" "ϒ")
227 ("piv" "\\varpi" t "&piv;" "omega-pi" "omega-pi" "ϖ")
228 ("bull" "\\textbullet" nil "&bull;" "*" "*" "•")
229 ("bullet" "\\textbullet" nil "&bull;" "*" "*" "•")
230 ("hellip" "\\dots" nil "&hellip;" "..." "..." "…")
231 ("dots" "\\dots" nil "&hellip;" "..." "..." "…")
232 ("prime" "\\prime" t "&prime;" "'" "'" "′")
233 ("Prime" "\\prime{}\\prime" t "&Prime;" "''" "''" "″")
234 ("oline" "\\overline{~}" t "&oline;" "[overline]" "¯" "‾")
235 ("frasl" "/" nil "&frasl;" "/" "/" "⁄")
236 ("weierp" "\\wp" t "&weierp;" "P" "P" "℘")
237 ("image" "\\Im" t "&image;" "I" "I" "ℑ")
238 ("real" "\\Re" t "&real;" "R" "R" "ℜ")
239 ("trade" "\\texttrademark" nil "&trade;" "TM" "TM" "™")
240 ("alefsym" "\\aleph" t "&alefsym;" "aleph" "aleph" "ℵ")
241 ("larr" "\\leftarrow" t "&larr;" "<-" "<-" "←")
242 ("leftarrow" "\\leftarrow" t "&larr;" "<-" "<-" "←")
243 ("gets" "\\gets" t "&larr;" "<-" "<-" "←")
244 ("uarr" "\\uparrow" t "&uarr;" "[uparrow]" "[uparrow]" "↑")
245 ("uparrow" "\\uparrow" t "&uarr;" "[uparrow]" "[uparrow]" "↑")
246 ("rarr" "\\rightarrow" t "&rarr;" "->" "->" "→")
247 ("to" "\\to" t "&rarr;" "->" "->" "→")
248 ("rightarrow" "\\rightarrow" t "&rarr;" "->" "->" "→")
249 ("darr" "\\downarrow" t "&darr;" "[downarrow]" "[downarrow]" "↓")
250 ("downarrow" "\\downarrow" t "&darr;" "[downarrow]" "[downarrow]" "↓")
251 ("harr" "\\leftrightarrow" t "&harr;" "<->" "<->" "↔")
252 ("leftrightarrow" "\\leftrightarrow" t "&harr;" "<->" "<->" "↔")
253 ("crarr" "\\hookleftarrow" t "&crarr;" "<-'" "<-'" "↵")
254 ("hookleftarrow" "\\hookleftarrow" t "&crarr;" "<-'" "<-'" "↵")
255 ("lArr" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
256 ("Leftarrow" "\\Leftarrow" t "&lArr;" "<=" "<=" "⇐")
257 ("uArr" "\\Uparrow" t "&uArr;" "[dbluparrow]" "[dbluparrow]" "⇑")
258 ("Uparrow" "\\Uparrow" t "&uArr;" "[dbluparrow]" "[dbluparrow]" "⇑")
259 ("rArr" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
260 ("Rightarrow" "\\Rightarrow" t "&rArr;" "=>" "=>" "⇒")
261 ("dArr" "\\Downarrow" t "&dArr;" "[dbldownarrow]" "[dbldownarrow]" "⇓")
262 ("Downarrow" "\\Downarrow" t "&dArr;" "[dbldownarrow]" "[dbldownarrow]" "⇓")
263 ("hArr" "\\Leftrightarrow" t "&hArr;" "<=>" "<=>" "⇔")
264 ("Leftrightarrow" "\\Leftrightarrow" t "&hArr;" "<=>" "<=>" "⇔")
265 ("forall" "\\forall" t "&forall;" "[for all]" "[for all]" "∀")
266 ("partial" "\\partial" t "&part;" "[partial differential]" "[partial differential]" "∂")
267 ("exist" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
268 ("exists" "\\exists" t "&exist;" "[there exists]" "[there exists]" "∃")
269 ("empty" "\\empty" t "&empty;" "[empty set]" "[empty set]" "∅")
270 ("emptyset" "\\emptyset" t "&empty;" "[empty set]" "[empty set]" "∅")
271 ("nabla" "\\nabla" t "&nabla;" "[nabla]" "[nabla]" "∇")
272 ("isin" "\\in" t "&isin;" "[element of]" "[element of]" "∈")
273 ("in" "\\in" t "&isin;" "[element of]" "[element of]" "∈")
274 ("notin" "\\notin" t "&notin;" "[not an element of]" "[not an element of]" "∉")
275 ("ni" "\\ni" t "&ni;" "[contains as member]" "[contains as member]" "∋")
276 ("prod" "\\prod" t "&prod;" "[product]" "[n-ary product]" "∏")
277 ("sum" "\\sum" t "&sum;" "[sum]" "[sum]" "∑")
278 ; ("minus" "\\minus" t "&minus;" "-" "-" "−")
279 ("minus" "-" t "&minus;" "-" "-" "−")
280 ("lowast" "\\ast" t "&lowast;" "*" "*" "∗")
281 ("ast" "\\ast" t "&lowast;" "*" "*" "*")
282 ("radic" "\\sqrt{\,}" t "&radic;" "[square root]" "[square root]" "√")
283 ("prop" "\\propto" t "&prop;" "[proportional to]" "[proportional to]" "∝")
284 ("proptp" "\\propto" t "&prop;" "[proportional to]" "[proportional to]" "∝")
285 ("infin" "\\propto" t "&infin;" "[infinity]" "[infinity]" "∞")
286 ("infty" "\\infty" t "&infin;" "[infinity]" "[infinity]" "∞")
287 ("ang" "\\angle" t "&ang;" "[angle]" "[angle]" "∠")
288 ("angle" "\\angle" t "&ang;" "[angle]" "[angle]" "∠")
289 ("and" "\\wedge" t "&and;" "[logical and]" "[logical and]" "∧")
290 ("wedge" "\\wedge" t "&and;" "[logical and]" "[logical and]" "∧")
291 ("or" "\\vee" t "&or;" "[logical or]" "[logical or]" "∨")
292 ("vee" "\\vee" t "&or;" "[logical or]" "[logical or]" "∨")
293 ("cap" "\\cap" t "&cap;" "[intersection]" "[intersection]" "∩")
294 ("cup" "\\cup" t "&cup;" "[union]" "[union]" "∪")
295 ("int" "\\int" t "&int;" "[integral]" "[integral]" "∫")
296 ; ("there4" "\\uptherefore" t "&there4;" "[therefore]" "[therefore]" "∴")
297 ("there4" "\\therefore" t "&there4;" "[therefore]" "[therefore]" "∴")
298 ("sim" "\\sim" t "&sim;" "~" "~" "∼")
299 ("cong" "\\cong" t "&cong;" "[approx. equal to]" "[approx. equal to]" "≅")
300 ("simeq" "\\simeq" t "&cong;" "[approx. equal to]" "[approx. equal to]" "≅")
301 ("asymp" "\\asymp" t "&asymp;" "[almost equal to]" "[almost equal to]" "≈")
302 ("approx" "\\approx" t "&asymp;" "[almost equal to]" "[almost equal to]" "≈")
303 ("ne" "\\ne" t "&ne;" "[not equal to]" "[not equal to]" "≠")
304 ("neq" "\\neq" t "&ne;" "[not equal to]" "[not equal to]" "≠")
305 ("equiv" "\\equiv" t "&equiv;" "[identical to]" "[identical to]" "≡")
306 ("le" "\\le" t "&le;" "<=" "<=" "≤")
307 ("ge" "\\ge" t "&ge;" ">=" ">=" "≥")
308 ("sub" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
309 ("subset" "\\subset" t "&sub;" "[subset of]" "[subset of]" "⊂")
310 ("sup" "\\supset" t "&sup;" "[superset of]" "[superset of]" "⊃")
311 ("supset" "\\supset" t "&sup;" "[superset of]" "[superset of]" "⊃")
312 ("nsub" "\\not\\subset" t "&nsub;" "[not a subset of]" "[not a subset of" "⊄")
313 ("sube" "\\subseteq" t "&sube;" "[subset of or equal to]" "[subset of or equal to]" "⊆")
314 ("supe" "\\supseteq" t "&supe;" "[superset of or equal to]" "[superset of or equal to]" "⊇")
315 ("oplus" "\\oplus" t "&oplus;" "[circled plus]" "[circled plus]" "⊕")
316 ("otimes" "\\otimes" t "&otimes;" "[circled times]" "[circled times]" "⊗")
317 ("perp" "\\perp" t "&perp;" "[up tack]" "[up tack]" "⊥")
318 ("sdot" "\\cdot" t "&sdot;" "[dot]" "[dot]" "⋅")
319 ("cdot" "\\cdot" t "&sdot;" "[dot]" "[dot]" "⋅")
320 ("lceil" "\\lceil" t "&lceil;" "[left ceiling]" "[left ceiling]" "⌈")
321 ("rceil" "\\rceil" t "&rceil;" "[right ceiling]" "[right ceiling]" "⌉")
322 ("lfloor" "\\lfloor" t "&lfloor;" "[left floor]" "[left floor]" "⌊")
323 ("rfloor" "\\rfloor" t "&rfloor;" "[right floor]" "[right floor]" "⌋")
324 ("lang" "\\langle" t "&lang;" "<" "<" "⟨")
325 ("rang" "\\rangle" t "&rang;" ">" ">" "⟩")
326 ("loz" "\\diamond" t "&loz;" "[lozenge]" "[lozenge]" "◊")
327 ("Diamond" "\\diamond" t "&diamond;" "[diamond]" "[diamond]" "⋄")
328 ("spades" "\\spadesuit" t "&spades;" "[spades]" "[spades]" "♠")
329 ("spadesuit" "\\spadesuit" t "&spades;" "[spades]" "[spades]" "♠")
330 ("clubs" "\\clubsuit" t "&clubs;" "[clubs]" "[clubs]" "♣")
331 ("clubsuit" "\\clubsuit" t "&clubs;" "[clubs]" "[clubs]" "♣")
332 ("hearts" "\\heartsuit" t "&hearts;" "[hearts]" "[hearts]" "♥")
333 ("heartsuit" "\\heartsuit" t "&heartsuit;" "[hearts]" "[hearts]" "♥")
334 ("diamondsuit" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
335 ("diams" "\\diamondsuit" t "&diams;" "[diamonds]" "[diamonds]" "♦")
336 ("smile" "\\smile" t "&#9786;" ":-)" ":-)" "⌣")
337 ("blacksmile" "\\blacksmiley" nil "&#9787;" ":-)" ":-)" "☻")
338 ("sad" "\\frownie" nil "&#9785;" ":-(" ":-(" "☹")
339 ("quot" "\\textquotedbl" nil "&quot;" "\"" "\"" "\"")
340 ("amp" "\\&" nil "&amp;" "&" "&" "&")
341 ("lt" "\\textless" nil "&lt;" "<" "<" "<")
342 ("gt" "\\textgreater" nil "&gt;" ">" ">" ">")
343 ("OElig" "\\OE" nil "&OElig;" "OE" "OE" "Œ")
344 ("oelig" "\\oe" nil "&oelig;" "oe" "oe" "œ")
345 ("Scaron" "\\v{S}" nil "&Scaron;" "S" "S" "Š")
346 ("scaron" "\\v{s}" nil "&scaron;" "s" "s" "š")
347 ("Yuml" "\\\"{Y}" nil "&Yuml;" "Y" "Y" "Ÿ")
348 ("circ" "\\circ" t "&circ;" "^" "^" "ˆ")
349 ("tilde" "\~{}" nil "&tilde;" "~" "~" "~")
350 ("ensp" "\\hspace*{.5em}" nil "&ensp;" " " " " " ")
351 ("emsp" "\\hspace*{1em}" nil "&emsp;" " " " " " ")
352 ("thinsp" "\\hspace*{.2em}" nil "&thinsp;" " " " " " ")
353 ("zwnj" "\\/{}" nil "&zwnj;" "" "" "‌")
354 ("zwj" "" nil "&zwj;" "" "" "‍")
355 ("lrm" "" nil "&lrm;" "" "" "‎")
356 ("rlm" "" nil "&rlm;" "" "" "‏")
357 ("ndash" "--" nil "&ndash;" "-" "-" "–")
358 ("mdash" "---" nil "&mdash;" "--" "--" "—")
359 ("lsquo" "\\textquoteleft" nil "&lsquo;" "`" "`" "‘")
360 ("rsquo" "\\textquoteright" nil "&rsquo;" "'" "'" "’")
361 ("sbquo" "\\quotesinglbase" nil "&sbquo;" "," "," "‚")
362 ("ldquo" "\\textquotedblleft" nil "&ldquo;" "\"" "\"" "“")
363 ("rdquo" "\\textquotedblright" nil "&rdquo;" "\"" "\"" "”")
364 ("bdquo" "\\quotedblbase" nil "&bdquo;" "\"" "\"" "„")
365 ("dagger" "\\textdagger" nil "&dagger;" "[dagger]" "[dagger]" "†")
366 ("Dagger" "\\textdaggerdbl" nil "&Dagger;" "[doubledagger]" "[doubledagger]" "‡")
367 ("permil" "\\textperthousand" nil "&permil;" "per thousand" "per thousand" "‰")
368 ("lsaquo" "\\guilsinglleft" nil "&lsaquo;" "<" "<" "‹")
369 ("rsaquo" "\\guilsinglright" nil "&rsaquo;" ">" ">" "›")
370 ("euro" "\\texteuro" nil "&euro;" "EUR" "EUR" "€")
371 ("EUR" "\\EUR" nil "&euro;" "EUR" "EUR" "€")
372 ("EURdig" "\\EURdig" nil "&euro;" "EUR" "EUR" "€")
373 ("EURhv" "\\EURhv" nil "&euro;" "EUR" "EUR" "€")
374 ("EURcr" "\\EURcr" nil "&euro;" "EUR" "EUR" "€")
375 ("EURtm" "\\EURtm" nil "&euro;" "EUR" "EUR" "€")
376 ("arccos" "\\arccos" t "arccos" "arccos" "arccos" "arccos")
377 ("arcsin" "\\arcsin" t "arcsin" "arcsin" "arcsin" "arcsin")
378 ("arctan" "\\arctan" t "arctan" "arctan" "arctan" "arctan")
379 ("arg" "\\arg" t "arg" "arg" "arg" "arg")
380 ("cos" "\\cos" t "cos" "cos" "cos" "cos")
381 ("cosh" "\\cosh" t "cosh" "cosh" "cosh" "cosh")
382 ("cot" "\\cot" t "cot" "cot" "cot" "cot")
383 ("coth" "\\coth" t "coth" "coth" "coth" "coth")
384 ("csc" "\\csc" t "csc" "csc" "csc" "csc")
385 ("deg" "\\deg" t "&deg;" "deg" "deg" "deg")
386 ("det" "\\det" t "det" "det" "det" "det")
387 ("dim" "\\dim" t "dim" "dim" "dim" "dim")
388 ("exp" "\\exp" t "exp" "exp" "exp" "exp")
389 ("gcd" "\\gcd" t "gcd" "gcd" "gcd" "gcd")
390 ("hom" "\\hom" t "hom" "hom" "hom" "hom")
391 ("inf" "\\inf" t "inf" "inf" "inf" "inf")
392 ("ker" "\\ker" t "ker" "ker" "ker" "ker")
393 ("lg" "\\lg" t "lg" "lg" "lg" "lg")
394 ("lim" "\\lim" t "lim" "lim" "lim" "lim")
395 ("liminf" "\\liminf" t "liminf" "liminf" "liminf" "liminf")
396 ("limsup" "\\limsup" t "limsup" "limsup" "limsup" "limsup")
397 ("ln" "\\ln" t "ln" "ln" "ln" "ln")
398 ("log" "\\log" t "log" "log" "log" "log")
399 ("max" "\\max" t "max" "max" "max" "max")
400 ("min" "\\min" t "min" "min" "min" "min")
401 ("Pr" "\\Pr" t "Pr" "Pr" "Pr" "Pr")
402 ("sec" "\\sec" t "sec" "sec" "sec" "sec")
403 ("sin" "\\sin" t "sin" "sin" "sin" "sin")
404 ("sinh" "\\sinh" t "sinh" "sinh" "sinh" "sinh")
405 ("sup" "\\sup" t "&sup;" "sup" "sup" "sup")
406 ("tan" "\\tan" t "tan" "tan" "tan" "tan")
407 ("tanh" "\\tanh" t "tanh" "tanh" "tanh" "tanh")
408 ("frac12" "\\textonehalf" nil "&frac12;" "1/2" "½" "½")
409 ("frac14" "\\textonequarter" nil "&frac14;" "1/4" "¼" "¼")
410 ("frac34" "\\textthreequarters" nil "&frac34;" "3/4" "¾" "¾")
411 ("div" "\\textdiv" nil "&divide;" "/" "÷" "÷")
412 ("acute" "\\textasciiacute" nil "&acute;" "'" "´" "´")
413 ("nsup" "\\not\\supset" t "&nsup;" "[not a superset of]" "[not a superset of]" "⊅")
414 ("smiley" "\\smiley" nil "&#9786;" ":-)" ":-)" "☺")
416 "Default entities used in Org-mode to preduce special characters.
417 For details see `org-entities-user'.")
419 (defsubst org-entity-get (name)
420 "Get the proper association for NAME from the entity lists.
421 This first checks the user list, then the built-in list."
422 (or (assoc name org-entities-user)
423 (assoc name org-entities)))
425 (defun org-entity-get-representation (name kind)
426 "Get the correct representation of entity NAME for export type KIND.
427 Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'."
428 (let* ((e (org-entity-get name))
429 (n (cdr (assq kind '((latex . 1) (html . 3) (ascii . 4)
430 (latin1 . 5) (utf8 . 6)))))
431 (r (and e n (nth n e))))
432 (if (and (not org-entities-ascii-explanatory)
433 (memq kind '(ascii latin1 utf8))
434 (= (string-to-char r) ?\[))
435 (concat "\\" name)
436 r)))
438 (defsubst org-entity-latex-math-p (name)
439 "Does entity NAME require math mode in LaTeX?"
440 (nth 2 (org-entity-get name)))
442 (provide 'org-entities)
444 ;; arch-tag: e6bd163f-7419-4009-9c93-a74623016424
446 ;;; org-entities.el ends here