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