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