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