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