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