1 ;;; org-entities.el --- Support for special entities in Org-mode
3 ;; Copyright (C) 2010-2014 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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 (declare-function org-toggle-pretty-entities
"org" ())
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."
50 (defun org-entities--user-safe-p (v)
51 "Return t if V is a safe value for `org-entities-user'."
54 ;; The stupid `eval' trick is needed because `apply'
55 ;; doesn't work with the special form `and'.
56 (eval (cons #'and
(mapcar (lambda (v2)
65 (stringp (nth 6 v2
))))
68 (defcustom org-entities-user nil
69 "User-defined entities used in Org-mode to produce special characters.
70 Each entry in this list is a list of strings. It associates the name
71 of the entity that can be inserted into an Org file as \\name with the
72 appropriate replacements for the different export backends. The order
73 of the fields is the following
75 name As a string, without the leading backslash
76 LaTeX replacement In ready LaTeX, no further processing will take place
77 LaTeX mathp A Boolean, either t or nil. t if this entity needs
79 HTML replacement In ready HTML, no further processing will take place.
80 Usually this will be an &...; entity.
81 ASCII replacement Plain ASCII, no extensions. Symbols that cannot be
82 represented will be left as they are, but see the.
83 variable `org-entities-ascii-explanatory'.
84 Latin1 replacement Use the special characters available in latin1.
85 utf-8 replacement Use the special characters available in utf-8.
87 If you define new entities here that require specific LaTeX
88 packages to be loaded, add these packages to `org-latex-packages-alist'."
94 (string :tag
"LaTeX ")
95 (boolean :tag
"Require LaTeX math?")
97 (string :tag
"ASCII ")
98 (string :tag
"Latin1")
99 (string :tag
"utf-8 ")))
100 :safe
#'org-entities--user-safe-p
)
102 (defconst org-entities
106 ("Agrave" "\\`{A}" nil
"À" "A" "À" "À")
107 ("agrave" "\\`{a}" nil
"à" "a" "à" "à")
108 ("Aacute" "\\'{A}" nil
"Á" "A" "Á" "Á")
109 ("aacute" "\\'{a}" nil
"á" "a" "á" "á")
110 ("Acirc" "\\^{A}" nil
"Â" "A" "Â" "Â")
111 ("acirc" "\\^{a}" nil
"â" "a" "â" "â")
112 ("Atilde" "\\~{A}" nil
"Ã" "A" "Ã" "Ã")
113 ("atilde" "\\~{a}" nil
"ã" "a" "ã" "ã")
114 ("Auml" "\\\"{A}" nil
"Ä" "Ae" "Ä" "Ä")
115 ("auml" "\\\"{a}" nil
"ä" "ae" "ä" "ä")
116 ("Aring" "\\AA{}" nil
"Å" "A" "Å" "Å")
117 ("AA" "\\AA{}" nil
"Å" "A" "Å" "Å")
118 ("aring" "\\aa{}" nil
"å" "a" "å" "å")
119 ("AElig" "\\AE{}" nil
"Æ" "AE" "Æ" "Æ")
120 ("aelig" "\\ae{}" nil
"æ" "ae" "æ" "æ")
121 ("Ccedil" "\\c{C}" nil
"Ç" "C" "Ç" "Ç")
122 ("ccedil" "\\c{c}" nil
"ç" "c" "ç" "ç")
123 ("Egrave" "\\`{E}" nil
"È" "E" "È" "È")
124 ("egrave" "\\`{e}" nil
"è" "e" "è" "è")
125 ("Eacute" "\\'{E}" nil
"É" "E" "É" "É")
126 ("eacute" "\\'{e}" nil
"é" "e" "é" "é")
127 ("Ecirc" "\\^{E}" nil
"Ê" "E" "Ê" "Ê")
128 ("ecirc" "\\^{e}" nil
"ê" "e" "ê" "ê")
129 ("Euml" "\\\"{E}" nil
"Ë" "E" "Ë" "Ë")
130 ("euml" "\\\"{e}" nil
"ë" "e" "ë" "ë")
131 ("Igrave" "\\`{I}" nil
"Ì" "I" "Ì" "Ì")
132 ("igrave" "\\`{i}" nil
"ì" "i" "ì" "ì")
133 ("Iacute" "\\'{I}" nil
"Í" "I" "Í" "Í")
134 ("iacute" "\\'{i}" nil
"í" "i" "í" "í")
135 ("Icirc" "\\^{I}" nil
"Î" "I" "Î" "Î")
136 ("icirc" "\\^{i}" nil
"î" "i" "î" "î")
137 ("Iuml" "\\\"{I}" nil
"Ï" "I" "Ï" "Ï")
138 ("iuml" "\\\"{i}" nil
"ï" "i" "ï" "ï")
139 ("Ntilde" "\\~{N}" nil
"Ñ" "N" "Ñ" "Ñ")
140 ("ntilde" "\\~{n}" nil
"ñ" "n" "ñ" "ñ")
141 ("Ograve" "\\`{O}" nil
"Ò" "O" "Ò" "Ò")
142 ("ograve" "\\`{o}" nil
"ò" "o" "ò" "ò")
143 ("Oacute" "\\'{O}" nil
"Ó" "O" "Ó" "Ó")
144 ("oacute" "\\'{o}" nil
"ó" "o" "ó" "ó")
145 ("Ocirc" "\\^{O}" nil
"Ô" "O" "Ô" "Ô")
146 ("ocirc" "\\^{o}" nil
"ô" "o" "ô" "ô")
147 ("Otilde" "\\~{O}" nil
"Õ" "O" "Õ" "Õ")
148 ("otilde" "\\~{o}" nil
"õ" "o" "õ" "õ")
149 ("Ouml" "\\\"{O}" nil
"Ö" "Oe" "Ö" "Ö")
150 ("ouml" "\\\"{o}" nil
"ö" "oe" "ö" "ö")
151 ("Oslash" "\\O" nil
"Ø" "O" "Ø" "Ø")
152 ("oslash" "\\o{}" nil
"ø" "o" "ø" "ø")
153 ("OElig" "\\OE{}" nil
"Œ" "OE" "OE" "Œ")
154 ("oelig" "\\oe{}" nil
"œ" "oe" "oe" "œ")
155 ("Scaron" "\\v{S}" nil
"Š" "S" "S" "Š")
156 ("scaron" "\\v{s}" nil
"š" "s" "s" "š")
157 ("szlig" "\\ss{}" nil
"ß" "ss" "ß" "ß")
158 ("Ugrave" "\\`{U}" nil
"Ù" "U" "Ù" "Ù")
159 ("ugrave" "\\`{u}" nil
"ù" "u" "ù" "ù")
160 ("Uacute" "\\'{U}" nil
"Ú" "U" "Ú" "Ú")
161 ("uacute" "\\'{u}" nil
"ú" "u" "ú" "ú")
162 ("Ucirc" "\\^{U}" nil
"Û" "U" "Û" "Û")
163 ("ucirc" "\\^{u}" nil
"û" "u" "û" "û")
164 ("Uuml" "\\\"{U}" nil
"Ü" "Ue" "Ü" "Ü")
165 ("uuml" "\\\"{u}" nil
"ü" "ue" "ü" "ü")
166 ("Yacute" "\\'{Y}" nil
"Ý" "Y" "Ý" "Ý")
167 ("yacute" "\\'{y}" nil
"ý" "y" "ý" "ý")
168 ("Yuml" "\\\"{Y}" nil
"Ÿ" "Y" "Y" "Ÿ")
169 ("yuml" "\\\"{y}" nil
"ÿ" "y" "ÿ" "ÿ")
171 "** Latin (special face)"
172 ("fnof" "\\textit{f}" nil
"ƒ" "f" "f" "ƒ")
173 ("real" "\\Re" t
"ℜ" "R" "R" "ℜ")
174 ("image" "\\Im" t
"ℑ" "I" "I" "ℑ")
175 ("weierp" "\\wp" t
"℘" "P" "P" "℘")
176 ("ell" "\\ell" t
"ℓ" "ell" "ell" "ℓ")
177 ("imath" "\\imath" t
"ı" "[dotless i]" "dotless i" "ı")
178 ("jmath" "\\jmath" t
"ȷ" "[dotless j]" "dotless j" "ȷ")
181 ("Alpha" "A" nil
"Α" "Alpha" "Alpha" "Α")
182 ("alpha" "\\alpha" t
"α" "alpha" "alpha" "α")
183 ("Beta" "B" nil
"Β" "Beta" "Beta" "Β")
184 ("beta" "\\beta" t
"β" "beta" "beta" "β")
185 ("Gamma" "\\Gamma" t
"Γ" "Gamma" "Gamma" "Γ")
186 ("gamma" "\\gamma" t
"γ" "gamma" "gamma" "γ")
187 ("Delta" "\\Delta" t
"Δ" "Delta" "Gamma" "Δ")
188 ("delta" "\\delta" t
"δ" "delta" "delta" "δ")
189 ("Epsilon" "E" nil
"Ε" "Epsilon" "Epsilon" "Ε")
190 ("epsilon" "\\epsilon" t
"ε" "epsilon" "epsilon" "ε")
191 ("varepsilon" "\\varepsilon" t
"ε" "varepsilon" "varepsilon" "ε")
192 ("Zeta" "Z" nil
"Ζ" "Zeta" "Zeta" "Ζ")
193 ("zeta" "\\zeta" t
"ζ" "zeta" "zeta" "ζ")
194 ("Eta" "H" nil
"Η" "Eta" "Eta" "Η")
195 ("eta" "\\eta" t
"η" "eta" "eta" "η")
196 ("Theta" "\\Theta" t
"Θ" "Theta" "Theta" "Θ")
197 ("theta" "\\theta" t
"θ" "theta" "theta" "θ")
198 ("thetasym" "\\vartheta" t
"ϑ" "theta" "theta" "ϑ")
199 ("vartheta" "\\vartheta" t
"ϑ" "theta" "theta" "ϑ")
200 ("Iota" "I" nil
"Ι" "Iota" "Iota" "Ι")
201 ("iota" "\\iota" t
"ι" "iota" "iota" "ι")
202 ("Kappa" "K" nil
"Κ" "Kappa" "Kappa" "Κ")
203 ("kappa" "\\kappa" t
"κ" "kappa" "kappa" "κ")
204 ("Lambda" "\\Lambda" t
"Λ" "Lambda" "Lambda" "Λ")
205 ("lambda" "\\lambda" t
"λ" "lambda" "lambda" "λ")
206 ("Mu" "M" nil
"Μ" "Mu" "Mu" "Μ")
207 ("mu" "\\mu" t
"μ" "mu" "mu" "μ")
208 ("nu" "\\nu" t
"ν" "nu" "nu" "ν")
209 ("Nu" "N" nil
"Ν" "Nu" "Nu" "Ν")
210 ("Xi" "\\Xi" t
"Ξ" "Xi" "Xi" "Ξ")
211 ("xi" "\\xi" t
"ξ" "xi" "xi" "ξ")
212 ("Omicron" "O" nil
"Ο" "Omicron" "Omicron" "Ο")
213 ("omicron" "\\textit{o}" nil
"ο" "omicron" "omicron" "ο")
214 ("Pi" "\\Pi" t
"Π" "Pi" "Pi" "Π")
215 ("pi" "\\pi" t
"π" "pi" "pi" "π")
216 ("Rho" "P" nil
"Ρ" "Rho" "Rho" "Ρ")
217 ("rho" "\\rho" t
"ρ" "rho" "rho" "ρ")
218 ("Sigma" "\\Sigma" t
"Σ" "Sigma" "Sigma" "Σ")
219 ("sigma" "\\sigma" t
"σ" "sigma" "sigma" "σ")
220 ("sigmaf" "\\varsigma" t
"ς" "sigmaf" "sigmaf" "ς")
221 ("varsigma" "\\varsigma" t
"ς" "varsigma" "varsigma" "ς")
222 ("Tau" "T" nil
"Τ" "Tau" "Tau" "Τ")
223 ("Upsilon" "\\Upsilon" t
"Υ" "Upsilon" "Upsilon" "Υ")
224 ("upsih" "\\Upsilon" t
"ϒ" "upsilon" "upsilon" "ϒ")
225 ("upsilon" "\\upsilon" t
"υ" "upsilon" "upsilon" "υ")
226 ("Phi" "\\Phi" t
"Φ" "Phi" "Phi" "Φ")
227 ("phi" "\\phi" t
"φ" "phi" "phi" "φ")
228 ("varphi" "\\varphi" t
"ϕ" "varphi" "varphi" "ɸ")
229 ("Chi" "X" nil
"Χ" "Chi" "Chi" "Χ")
230 ("chi" "\\chi" t
"χ" "chi" "chi" "χ")
231 ("acutex" "\\acute x" t
"´x" "'x" "'x" "𝑥́")
232 ("Psi" "\\Psi" t
"Ψ" "Psi" "Psi" "Ψ")
233 ("psi" "\\psi" t
"ψ" "psi" "psi" "ψ")
234 ("tau" "\\tau" t
"τ" "tau" "tau" "τ")
235 ("Omega" "\\Omega" t
"Ω" "Omega" "Omega" "Ω")
236 ("omega" "\\omega" t
"ω" "omega" "omega" "ω")
237 ("piv" "\\varpi" t
"ϖ" "omega-pi" "omega-pi" "ϖ")
238 ("varpi" "\\varpi" t
"ϖ" "omega-pi" "omega-pi" "ϖ")
239 ("partial" "\\partial" t
"∂" "[partial differential]" "[partial differential]" "∂")
242 ("alefsym" "\\aleph" t
"ℵ" "aleph" "aleph" "ℵ")
243 ("aleph" "\\aleph" t
"ℵ" "aleph" "aleph" "ℵ")
244 ("gimel" "\\gimel" t
"ℷ" "gimel" "gimel" "ℷ")
245 ("beth" "\\beth" t
"ℶ" "beth" "beth" "ב")
246 ("dalet" "\\daleth" t
"ℸ" "dalet" "dalet" "ד")
249 ("ETH" "\\DH{}" nil
"Ð" "D" "Ð" "Ð")
250 ("eth" "\\dh{}" nil
"ð" "dh" "ð" "ð")
251 ("THORN" "\\TH{}" nil
"Þ" "TH" "Þ" "Þ")
252 ("thorn" "\\th{}" nil
"þ" "th" "þ" "þ")
256 ("dots" "\\dots{}" nil
"…" "..." "..." "…")
257 ("cdots" "\\cdots{}" t
"⋯" "..." "..." "⋯")
258 ("hellip" "\\dots{}" nil
"…" "..." "..." "…")
259 ("middot" "\\textperiodcentered{}" nil
"·" "." "·" "·")
260 ("iexcl" "!`" nil
"¡" "!" "¡" "¡")
261 ("iquest" "?`" nil
"¿" "?" "¿" "¿")
264 ("shy" "\\-" nil
"­" "" "" "")
265 ("ndash" "--" nil
"–" "-" "-" "–")
266 ("mdash" "---" nil
"—" "--" "--" "—")
269 ("quot" "\\textquotedbl{}" nil
""" "\"" "\"" "\"")
270 ("acute" "\\textasciiacute{}" nil
"´" "'" "´" "´")
271 ("ldquo" "\\textquotedblleft{}" nil
"“" "\"" "\"" "“")
272 ("rdquo" "\\textquotedblright{}" nil
"”" "\"" "\"" "”")
273 ("bdquo" "\\quotedblbase{}" nil
"„" "\"" "\"" "„")
274 ("lsquo" "\\textquoteleft{}" nil
"‘" "`" "`" "‘")
275 ("rsquo" "\\textquoteright{}" nil
"’" "'" "'" "’")
276 ("sbquo" "\\quotesinglbase{}" nil
"‚" "," "," "‚")
277 ("laquo" "\\guillemotleft{}" nil
"«" "<<" "«" "«")
278 ("raquo" "\\guillemotright{}" nil
"»" ">>" "»" "»")
279 ("lsaquo" "\\guilsinglleft{}" nil
"‹" "<" "<" "‹")
280 ("rsaquo" "\\guilsinglright{}" nil
"›" ">" ">" "›")
283 "** Misc. (often used)"
284 ("circ" "\\^{}" nil
"ˆ" "^" "^" "ˆ")
285 ("vert" "\\vert{}" t
"|" "|" "|" "|")
286 ("brvbar" "\\textbrokenbar{}" nil
"¦" "|" "¦" "¦")
287 ("S" "\\S" nil
"§" "paragraph" "§" "§")
288 ("sect" "\\S" nil
"§" "paragraph" "§" "§")
289 ("amp" "\\&" nil
"&" "&" "&" "&")
290 ("lt" "\\textless{}" nil
"<" "<" "<" "<")
291 ("gt" "\\textgreater{}" nil
">" ">" ">" ">")
292 ("tilde" "\\textasciitilde{}" nil
"~" "~" "~" "~")
293 ("slash" "/" nil
"/" "/" "/" "/")
294 ("plus" "+" nil
"+" "+" "+" "+")
295 ("under" "\\_" nil
"_" "_" "_" "_")
296 ("equal" "=" nil
"=" "=" "=" "=")
297 ("asciicirc" "\\textasciicircum{}" nil
"^" "^" "^" "^")
298 ("dagger" "\\textdagger{}" nil
"†" "[dagger]" "[dagger]" "†")
299 ("dag" "\\dag{}" nil
"†" "[dagger]" "[dagger]" "†")
300 ("Dagger" "\\textdaggerdbl{}" nil
"‡" "[doubledagger]" "[doubledagger]" "‡")
301 ("ddag" "\\ddag{}" nil
"‡" "[doubledagger]" "[doubledagger]" "‡")
304 ("nbsp" "~" nil
" " " " " " " ")
305 ("ensp" "\\hspace*{.5em}" nil
" " " " " " " ")
306 ("emsp" "\\hspace*{1em}" nil
" " " " " " " ")
307 ("thinsp" "\\hspace*{.2em}" nil
" " " " " " " ")
310 ("curren" "\\textcurrency{}" nil
"¤" "curr." "¤" "¤")
311 ("cent" "\\textcent{}" nil
"¢" "cent" "¢" "¢")
312 ("pound" "\\pounds{}" nil
"£" "pound" "£" "£")
313 ("yen" "\\textyen{}" nil
"¥" "yen" "¥" "¥")
314 ("euro" "\\texteuro{}" nil
"€" "EUR" "EUR" "€")
315 ("EUR" "\\EUR{}" nil
"€" "EUR" "EUR" "€")
316 ("EURdig" "\\EURdig{}" nil
"€" "EUR" "EUR" "€")
317 ("EURhv" "\\EURhv{}" nil
"€" "EUR" "EUR" "€")
318 ("EURcr" "\\EURcr{}" nil
"€" "EUR" "EUR" "€")
319 ("EURtm" "\\EURtm{}" nil
"€" "EUR" "EUR" "€")
322 ("copy" "\\textcopyright{}" nil
"©" "(c)" "©" "©")
323 ("reg" "\\textregistered{}" nil
"®" "(r)" "®" "®")
324 ("trade" "\\texttrademark{}" nil
"™" "TM" "TM" "™")
327 ("minus" "\\minus" t
"−" "-" "-" "−")
328 ("pm" "\\textpm{}" nil
"±" "+-" "±" "±")
329 ("plusmn" "\\textpm{}" nil
"±" "+-" "±" "±")
330 ("times" "\\texttimes{}" nil
"×" "*" "×" "×")
331 ("frasl" "/" nil
"⁄" "/" "/" "⁄")
332 ("colon" "\\colon" t
":" ":" ":" ":")
333 ("div" "\\textdiv{}" nil
"÷" "/" "÷" "÷")
334 ("frac12" "\\textonehalf{}" nil
"½" "1/2" "½" "½")
335 ("frac14" "\\textonequarter{}" nil
"¼" "1/4" "¼" "¼")
336 ("frac34" "\\textthreequarters{}" nil
"¾" "3/4" "¾" "¾")
337 ("permil" "\\textperthousand{}" nil
"‰" "per thousand" "per thousand" "‰")
338 ("sup1" "\\textonesuperior{}" nil
"¹" "^1" "¹" "¹")
339 ("sup2" "\\texttwosuperior{}" nil
"²" "^2" "²" "²")
340 ("sup3" "\\textthreesuperior{}" nil
"³" "^3" "³" "³")
341 ("radic" "\\sqrt{\\,}" t
"√" "[square root]" "[square root]" "√")
342 ("sum" "\\sum" t
"∑" "[sum]" "[sum]" "∑")
343 ("prod" "\\prod" t
"∏" "[product]" "[n-ary product]" "∏")
344 ("micro" "\\textmu{}" nil
"µ" "micro" "µ" "µ")
345 ("macr" "\\textasciimacron{}" nil
"¯" "[macron]" "¯" "¯")
346 ("deg" "\\textdegree{}" nil
"°" "degree" "°" "°")
347 ("prime" "\\prime" t
"′" "'" "'" "′")
348 ("Prime" "\\prime{}\\prime" t
"″" "''" "''" "″")
349 ("infin" "\\propto" t
"∞" "[infinity]" "[infinity]" "∞")
350 ("infty" "\\infty" t
"∞" "[infinity]" "[infinity]" "∞")
351 ("prop" "\\propto" t
"∝" "[proportional to]" "[proportional to]" "∝")
352 ("propto" "\\propto" t
"∝" "[proportional to]" "[proportional to]" "∝")
353 ("not" "\\textlnot{}" nil
"¬" "[angled dash]" "¬" "¬")
354 ("neg" "\\neg{}" t
"¬" "[angled dash]" "¬" "¬")
355 ("land" "\\land" t
"∧" "[logical and]" "[logical and]" "∧")
356 ("wedge" "\\wedge" t
"∧" "[logical and]" "[logical and]" "∧")
357 ("lor" "\\lor" t
"∨" "[logical or]" "[logical or]" "∨")
358 ("vee" "\\vee" t
"∨" "[logical or]" "[logical or]" "∨")
359 ("cap" "\\cap" t
"∩" "[intersection]" "[intersection]" "∩")
360 ("cup" "\\cup" t
"∪" "[union]" "[union]" "∪")
361 ("int" "\\int" t
"∫" "[integral]" "[integral]" "∫")
362 ("therefore" "\\therefore" t
"∴" "[therefore]" "[therefore]" "∴")
363 ("there4" "\\therefore" t
"∴" "[therefore]" "[therefore]" "∴")
364 ("because" "\\because" t
"∵" "[because]" "[because]" "∵")
365 ("sim" "\\sim" t
"∼" "~" "~" "∼")
366 ("cong" "\\cong" t
"≅" "[approx. equal to]" "[approx. equal to]" "≅")
367 ("simeq" "\\simeq" t
"≅" "[approx. equal to]" "[approx. equal to]" "≅")
368 ("asymp" "\\asymp" t
"≈" "[almost equal to]" "[almost equal to]" "≈")
369 ("approx" "\\approx" t
"≈" "[almost equal to]" "[almost equal to]" "≈")
370 ("ne" "\\ne" t
"≠" "[not equal to]" "[not equal to]" "≠")
371 ("neq" "\\neq" t
"≠" "[not equal to]" "[not equal to]" "≠")
372 ("equiv" "\\equiv" t
"≡" "[identical to]" "[identical to]" "≡")
374 ("triangleq" "\\triangleq" t
"≜" "[defined to]" "[defined to]" "≜")
375 ("le" "\\le" t
"≤" "<=" "<=" "≤")
376 ("leq" "\\le" t
"≤" "<=" "<=" "≤")
377 ("ge" "\\ge" t
"≥" ">=" ">=" "≥")
378 ("geq" "\\ge" t
"≥" ">=" ">=" "≥")
379 ("lessgtr" "\\lessgtr" t
"≶" "[less than or greater than]" "[less than or greater than]" "≶")
380 ("lesseqgtr" "\\lesseqgtr" t
"⋚" "[less than or equal or greater than or equal]" "[less than or equal or greater than or equal]" "⋚")
381 ("ll" "\\ll" t
"≪" "<<" "<<" "≪")
382 ("Ll" "\lll" t
"⋘" "<<<" "<<<" "⋘")
383 ("lll" "\lll" t
"⋘" "<<<" "<<<" "⋘")
384 ("gg" "\\gg" t
"≫" ">>" ">>" "≫")
385 ("Gg" "\\ggg" t
"⋙" ">>>" ">>>" "⋙")
386 ("ggg" "\\ggg" t
"⋙" ">>>" ">>>" "⋙")
387 ("prec" "\\prec" t
"≺" "[precedes]" "[precedes]" "≺")
388 ("preceq" "\\preceq" t
"≼" "[precedes or equal]" "[precedes or equal]" "≼")
389 ("preccurlyeq" "\\preccurlyeq" t
"≼" "[precedes or equal]" "[precedes or equal]" "≼")
390 ("succ" "\\succ" t
"≻" "[succeeds]" "[succeeds]" "≻")
391 ("succeq" "\\succeq" t
"≽" "[succeeds or equal]" "[succeeds or equal]" "≽")
392 ("succcurlyeq" "\\succcurlyeq" t
"≽" "[succeeds or equal]" "[succeeds or equal]" "≽")
393 ("sub" "\\subset" t
"⊂" "[subset of]" "[subset of]" "⊂")
394 ("subset" "\\subset" t
"⊂" "[subset of]" "[subset of]" "⊂")
395 ("sup" "\\supset" t
"⊃" "[superset of]" "[superset of]" "⊃")
396 ("supset" "\\supset" t
"⊃" "[superset of]" "[superset of]" "⊃")
397 ("nsub" "\\not\\subset" t
"⊄" "[not a subset of]" "[not a subset of" "⊄")
398 ("sube" "\\subseteq" t
"⊆" "[subset of or equal to]" "[subset of or equal to]" "⊆")
399 ("nsup" "\\not\\supset" t
"⊅" "[not a superset of]" "[not a superset of]" "⊅")
400 ("supe" "\\supseteq" t
"⊇" "[superset of or equal to]" "[superset of or equal to]" "⊇")
401 ("setminus" "\\setminus" t
"∖" "\" "\" "⧵")
402 ("forall" "\\forall" t
"∀" "[for all]" "[for all]" "∀")
403 ("exist" "\\exists" t
"∃" "[there exists]" "[there exists]" "∃")
404 ("exists" "\\exists" t
"∃" "[there exists]" "[there exists]" "∃")
405 ("nexist" "\\nexists" t
"∃" "[there does not exists]" "[there does not exists]" "∄")
406 ("nexists" "\\nexists" t
"∃" "[there does not exists]" "[there does not exists]" "∄")
407 ("empty" "\\empty" t
"∅" "[empty set]" "[empty set]" "∅")
408 ("emptyset" "\\emptyset" t
"∅" "[empty set]" "[empty set]" "∅")
409 ("isin" "\\in" t
"∈" "[element of]" "[element of]" "∈")
410 ("in" "\\in" t
"∈" "[element of]" "[element of]" "∈")
411 ("notin" "\\notin" t
"∉" "[not an element of]" "[not an element of]" "∉")
412 ("ni" "\\ni" t
"∋" "[contains as member]" "[contains as member]" "∋")
413 ("nabla" "\\nabla" t
"∇" "[nabla]" "[nabla]" "∇")
414 ("ang" "\\angle" t
"∠" "[angle]" "[angle]" "∠")
415 ("angle" "\\angle" t
"∠" "[angle]" "[angle]" "∠")
416 ("perp" "\\perp" t
"⊥" "[up tack]" "[up tack]" "⊥")
417 ("parallel" "\\parallel" t
"∥" "||" "||" "∥")
418 ("sdot" "\\cdot" t
"⋅" "[dot]" "[dot]" "⋅")
419 ("cdot" "\\cdot" t
"⋅" "[dot]" "[dot]" "⋅")
420 ("lceil" "\\lceil" t
"⌈" "[left ceiling]" "[left ceiling]" "⌈")
421 ("rceil" "\\rceil" t
"⌉" "[right ceiling]" "[right ceiling]" "⌉")
422 ("lfloor" "\\lfloor" t
"⌊" "[left floor]" "[left floor]" "⌊")
423 ("rfloor" "\\rfloor" t
"⌋" "[right floor]" "[right floor]" "⌋")
424 ("lang" "\\langle" t
"⟨" "<" "<" "⟨")
425 ("rang" "\\rangle" t
"⟩" ">" ">" "⟩")
426 ("langle" "\\langle" t
"⟨" "<" "<" "⟨")
427 ("rangle" "\\rangle" t
"⟩" ">" ">" "⟩")
428 ("hbar" "\\hbar" t
"ℏ" "hbar" "hbar" "ℏ")
429 ("mho" "\\mho" t
"℧" "mho" "mho" "℧")
432 ("larr" "\\leftarrow" t
"←" "<-" "<-" "←")
433 ("leftarrow" "\\leftarrow" t
"←" "<-" "<-" "←")
434 ("gets" "\\gets" t
"←" "<-" "<-" "←")
435 ("lArr" "\\Leftarrow" t
"⇐" "<=" "<=" "⇐")
436 ("Leftarrow" "\\Leftarrow" t
"⇐" "<=" "<=" "⇐")
437 ("uarr" "\\uparrow" t
"↑" "[uparrow]" "[uparrow]" "↑")
438 ("uparrow" "\\uparrow" t
"↑" "[uparrow]" "[uparrow]" "↑")
439 ("uArr" "\\Uparrow" t
"⇑" "[dbluparrow]" "[dbluparrow]" "⇑")
440 ("Uparrow" "\\Uparrow" t
"⇑" "[dbluparrow]" "[dbluparrow]" "⇑")
441 ("rarr" "\\rightarrow" t
"→" "->" "->" "→")
442 ("to" "\\to" t
"→" "->" "->" "→")
443 ("rightarrow" "\\rightarrow" t
"→" "->" "->" "→")
444 ("rArr" "\\Rightarrow" t
"⇒" "=>" "=>" "⇒")
445 ("Rightarrow" "\\Rightarrow" t
"⇒" "=>" "=>" "⇒")
446 ("darr" "\\downarrow" t
"↓" "[downarrow]" "[downarrow]" "↓")
447 ("downarrow" "\\downarrow" t
"↓" "[downarrow]" "[downarrow]" "↓")
448 ("dArr" "\\Downarrow" t
"⇓" "[dbldownarrow]" "[dbldownarrow]" "⇓")
449 ("Downarrow" "\\Downarrow" t
"⇓" "[dbldownarrow]" "[dbldownarrow]" "⇓")
450 ("harr" "\\leftrightarrow" t
"↔" "<->" "<->" "↔")
451 ("leftrightarrow" "\\leftrightarrow" t
"↔" "<->" "<->" "↔")
452 ("hArr" "\\Leftrightarrow" t
"⇔" "<=>" "<=>" "⇔")
453 ("Leftrightarrow" "\\Leftrightarrow" t
"⇔" "<=>" "<=>" "⇔")
454 ("crarr" "\\hookleftarrow" t
"↵" "<-'" "<-'" "↵")
455 ("hookleftarrow" "\\hookleftarrow" t
"↵" "<-'" "<-'" "↵")
458 ("arccos" "\\arccos" t
"arccos" "arccos" "arccos" "arccos")
459 ("arcsin" "\\arcsin" t
"arcsin" "arcsin" "arcsin" "arcsin")
460 ("arctan" "\\arctan" t
"arctan" "arctan" "arctan" "arctan")
461 ("arg" "\\arg" t
"arg" "arg" "arg" "arg")
462 ("cos" "\\cos" t
"cos" "cos" "cos" "cos")
463 ("cosh" "\\cosh" t
"cosh" "cosh" "cosh" "cosh")
464 ("cot" "\\cot" t
"cot" "cot" "cot" "cot")
465 ("coth" "\\coth" t
"coth" "coth" "coth" "coth")
466 ("csc" "\\csc" t
"csc" "csc" "csc" "csc")
467 ("deg" "\\deg" t
"°" "deg" "deg" "deg")
468 ("det" "\\det" t
"det" "det" "det" "det")
469 ("dim" "\\dim" t
"dim" "dim" "dim" "dim")
470 ("exp" "\\exp" t
"exp" "exp" "exp" "exp")
471 ("gcd" "\\gcd" t
"gcd" "gcd" "gcd" "gcd")
472 ("hom" "\\hom" t
"hom" "hom" "hom" "hom")
473 ("inf" "\\inf" t
"inf" "inf" "inf" "inf")
474 ("ker" "\\ker" t
"ker" "ker" "ker" "ker")
475 ("lg" "\\lg" t
"lg" "lg" "lg" "lg")
476 ("lim" "\\lim" t
"lim" "lim" "lim" "lim")
477 ("liminf" "\\liminf" t
"liminf" "liminf" "liminf" "liminf")
478 ("limsup" "\\limsup" t
"limsup" "limsup" "limsup" "limsup")
479 ("ln" "\\ln" t
"ln" "ln" "ln" "ln")
480 ("log" "\\log" t
"log" "log" "log" "log")
481 ("max" "\\max" t
"max" "max" "max" "max")
482 ("min" "\\min" t
"min" "min" "min" "min")
483 ("Pr" "\\Pr" t
"Pr" "Pr" "Pr" "Pr")
484 ("sec" "\\sec" t
"sec" "sec" "sec" "sec")
485 ("sin" "\\sin" t
"sin" "sin" "sin" "sin")
486 ("sinh" "\\sinh" t
"sinh" "sinh" "sinh" "sinh")
487 ("sup" "\\sup" t
"⊃" "sup" "sup" "sup")
488 ("tan" "\\tan" t
"tan" "tan" "tan" "tan")
489 ("tanh" "\\tanh" t
"tanh" "tanh" "tanh" "tanh")
492 ("bull" "\\textbullet{}" nil
"•" "*" "*" "•")
493 ("bullet" "\\textbullet{}" nil
"•" "*" "*" "•")
494 ("star" "\\star" t
"*" "*" "*" "⋆")
495 ("lowast" "\\ast" t
"∗" "*" "*" "∗")
496 ("ast" "\\ast" t
"∗" "*" "*" "*")
497 ("odot" "\\odot" t
"o" "[circled dot]" "[circled dot]" "ʘ")
498 ("oplus" "\\oplus" t
"⊕" "[circled plus]" "[circled plus]" "⊕")
499 ("otimes" "\\otimes" t
"⊗" "[circled times]" "[circled times]" "⊗")
500 ("check" "\\checkmark" t
"✓" "[checkmark]" "[checkmark]" "✓")
501 ("checkmark" "\\checkmark" t
"✓" "[checkmark]" "[checkmark]" "✓")
503 "** Miscellaneous (seldom used)"
504 ("para" "\\P{}" nil
"¶" "[pilcrow]" "¶" "¶")
505 ("ordf" "\\textordfeminine{}" nil
"ª" "_a_" "ª" "ª")
506 ("ordm" "\\textordmasculine{}" nil
"º" "_o_" "º" "º")
507 ("cedil" "\\c{}" nil
"¸" "[cedilla]" "¸" "¸")
508 ("oline" "\\overline{~}" t
"‾" "[overline]" "¯" "‾")
509 ("uml" "\\textasciidieresis{}" nil
"¨" "[diaeresis]" "¨" "¨")
510 ("zwnj" "\\/{}" nil
"‌" "" "" "")
511 ("zwj" "" nil
"‍" "" "" "")
512 ("lrm" "" nil
"‎" "" "" "")
513 ("rlm" "" nil
"‏" "" "" "")
516 ("smile" "\\smile" t
"⌣" ":-)" ":-)" "⌣")
517 ("frown" "\\frown" t
"⌢" ":-(" ":-(" "⌢")
518 ("smiley" "\\smiley{}" nil
"☺" ":-)" ":-)" "☺")
519 ("blacksmile" "\\blacksmiley{}" nil
"☻" ":-)" ":-)" "☻")
520 ("sad" "\\frownie{}" nil
"☹" ":-(" ":-(" "☹")
523 ("clubs" "\\clubsuit" t
"♣" "[clubs]" "[clubs]" "♣")
524 ("clubsuit" "\\clubsuit" t
"♣" "[clubs]" "[clubs]" "♣")
525 ("spades" "\\spadesuit" t
"♠" "[spades]" "[spades]" "♠")
526 ("spadesuit" "\\spadesuit" t
"♠" "[spades]" "[spades]" "♠")
527 ("hearts" "\\heartsuit" t
"♥" "[hearts]" "[hearts]" "♥")
528 ("heartsuit" "\\heartsuit" t
"♥" "[hearts]" "[hearts]" "♥")
529 ("diams" "\\diamondsuit" t
"♦" "[diamonds]" "[diamonds]" "◆")
530 ("diamondsuit" "\\diamondsuit" t
"♦" "[diamonds]" "[diamonds]" "◆")
531 ("diamond" "\\diamondsuit" t
"⋄" "[diamond]" "[diamond]" "◆")
532 ("Diamond" "\\diamondsuit" t
"⋄" "[diamond]" "[diamond]" "◆")
533 ("loz" "\\lozenge" t
"◊" "[lozenge]" "[lozenge]" "⧫")
535 "Default entities used in Org-mode to produce special characters.
536 For details see `org-entities-user'.")
538 (defsubst org-entity-get
(name)
539 "Get the proper association for NAME from the entity lists.
540 This first checks the user list, then the built-in list."
541 (or (assoc name org-entities-user
)
542 (assoc name org-entities
)))
544 (defun org-entity-get-representation (name kind
)
545 "Get the correct representation of entity NAME for export type KIND.
546 Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'."
547 (let* ((e (org-entity-get name
))
548 (n (cdr (assq kind
'((latex .
1) (html .
3) (ascii .
4)
549 (latin1 .
5) (utf8 .
6)))))
550 (r (and e n
(nth n e
))))
552 (not org-entities-ascii-explanatory
)
553 (memq kind
'(ascii latin1 utf8
))
554 (= (string-to-char r
) ?\
[))
558 (defsubst org-entity-latex-math-p
(name)
559 "Does entity NAME require math mode in LaTeX?"
560 (nth 2 (org-entity-get name
)))
562 ;; Helpfunctions to create a table for orgmode.org/worg/org-symbols.org
564 (defun org-entities-create-table ()
565 "Create an Org mode table with all entities."
567 (let ((pos (point)) e latex mathp html latin utf8 name ascii
)
568 (insert "|Name|LaTeX code|LaTeX|HTML code |HTML|ASCII|Latin1|UTF-8\n|-\n")
569 (mapc (lambda (e) (when (listp e
)
577 (if (equal ascii
"|") (setq ascii
"\\vert"))
578 (if (equal latin
"|") (setq latin
"\\vert"))
579 (if (equal utf8
"|") (setq utf8
"\\vert"))
580 (if (equal ascii
"=>") (setq ascii
"= >"))
581 (if (equal latin
"=>") (setq latin
"= >"))
583 "|" (format "=%s=" latex
)
584 "|" (format (if mathp
"$%s$" "$\\mbox{%s}$")
586 "|" (format "=%s=" html
) "|" html
587 "|" ascii
"|" latin
"|" utf8
593 (defvar org-pretty-entities
) ;; declare defcustom from org
594 (defun org-entities-help ()
595 "Create a Help buffer with all available entities."
597 (with-output-to-temp-buffer "*Org Entity Help*"
598 (princ "Org-mode entities\n=================\n\n")
599 (let ((ll (append '("* User-defined additions (variable org-entities-user)")
602 e latex mathp html latin utf8 name ascii
606 " Symbol Org entity LaTeX code HTML code\n"
607 " -----------------------------------------------------------\n")))
614 (setq lastwasstring t
))
615 (if lastwasstring
(princ head
))
616 (setq lastwasstring nil
)
621 (princ (format " %-8s \\%-16s %-22s %-13s\n"
622 utf8 name latex html
))))))
623 (with-current-buffer "*Org Entity Help*"
625 (when org-pretty-entities
626 (org-toggle-pretty-entities)))
627 (select-window (get-buffer-window "*Org Entity Help*")))
630 (provide 'org-entities
)
636 ;;; org-entities.el ends here