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