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