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