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