2010-03-28 03:48:03 -04:00
|
|
|
|
;;; org-entities.el --- Support for special entities in Org-mode
|
|
|
|
|
|
|
|
|
|
;; Copyright (C) 2010 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
|
|
;; Author: Carsten Dominik <carsten at orgmode dot org>,
|
|
|
|
|
;; Ulf Stegemann <ulf at zeitform dot de>
|
|
|
|
|
;; Keywords: outlines, calendar, wp
|
|
|
|
|
;; Homepage: http://orgmode.org
|
2011-07-28 06:33:35 -04:00
|
|
|
|
;; Version: 7.7
|
2010-03-28 03:48:03 -04:00
|
|
|
|
;;
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
;;
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;;
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
2010-07-15 18:54:53 -04:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
2010-04-06 08:39:54 -04:00
|
|
|
|
(require 'org-macs)
|
|
|
|
|
|
2010-04-04 16:26:27 -04:00
|
|
|
|
(declare-function org-table-align "org-table" ())
|
|
|
|
|
|
2010-03-28 03:48:03 -04:00
|
|
|
|
(eval-when-compile
|
|
|
|
|
(require 'cl))
|
|
|
|
|
|
|
|
|
|
(defgroup org-entities nil
|
|
|
|
|
"Options concerning entities in Org-mode."
|
|
|
|
|
:tag "Org Entities"
|
|
|
|
|
:group 'org)
|
|
|
|
|
|
|
|
|
|
(defcustom org-entities-ascii-explanatory nil
|
|
|
|
|
"Non-nil means replace special entities in ASCII.
|
|
|
|
|
For example, this will replace \"\\nsup\" with \"[not a superset of]\"
|
|
|
|
|
in backends where the corresponding character is not available."
|
|
|
|
|
:group 'org-entities
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
|
|
|
|
(defcustom org-entities-user nil
|
2010-04-30 22:35:50 -04:00
|
|
|
|
"User-defined entities used in Org-mode to produce special characters.
|
|
|
|
|
Each entry in this list is a list of strings. It associates the name
|
2010-03-28 03:48:03 -04:00
|
|
|
|
of the entity that can be inserted into an Org file as \\name with the
|
|
|
|
|
appropriate replacements for the different export backends. The order
|
2010-04-30 22:35:50 -04:00
|
|
|
|
of the fields is the following
|
2010-03-28 03:48:03 -04:00
|
|
|
|
|
|
|
|
|
name As a string, without the leading backslash
|
|
|
|
|
LaTeX replacement In ready LaTeX, no further processing will take place
|
|
|
|
|
LaTeX mathp A Boolean, either t or nil. t if this entity needs
|
|
|
|
|
to be in math mode.
|
|
|
|
|
HTML replacement In ready HTML, no further processing will take place.
|
|
|
|
|
Usually this will be an &...; entity.
|
|
|
|
|
ASCII replacement Plain ASCII, no extensions. Symbols that cannot be
|
2010-05-01 00:30:02 -04:00
|
|
|
|
represented will be left as they are, but see the.
|
|
|
|
|
variable `org-entities-ascii-explanatory'.
|
2010-03-28 03:48:03 -04:00
|
|
|
|
Latin1 replacement Use the special characters available in latin1.
|
2010-04-30 22:35:50 -04:00
|
|
|
|
utf-8 replacement Use the special characters available in utf-8.
|
2010-04-07 03:52:36 -04:00
|
|
|
|
|
|
|
|
|
If you define new entities here that require specific LaTeX packages to be
|
|
|
|
|
loaded, add these packages to `org-export-latex-packages-alist'."
|
2010-04-07 07:41:40 -04:00
|
|
|
|
:group 'org-entities
|
2010-03-28 03:48:03 -04:00
|
|
|
|
:type '(repeat
|
|
|
|
|
(list
|
|
|
|
|
(string :tag "name ")
|
|
|
|
|
(string :tag "LaTeX ")
|
|
|
|
|
(boolean :tag "Require LaTeX math?")
|
|
|
|
|
(string :tag "HTML ")
|
|
|
|
|
(string :tag "ASCII ")
|
|
|
|
|
(string :tag "Latin1")
|
|
|
|
|
(string :tag "utf-8 "))))
|
|
|
|
|
|
|
|
|
|
(defconst org-entities
|
2010-06-28 06:16:33 -04:00
|
|
|
|
'(
|
|
|
|
|
"* Letters"
|
|
|
|
|
"** Latin"
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Agrave" "\\`{A}" nil "À" "A" "À" "À")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("agrave" "\\`{a}" nil "à" "a" "à" "à")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Aacute" "\\'{A}" nil "Á" "A" "Á" "Á")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("aacute" "\\'{a}" nil "á" "a" "á" "á")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Acirc" "\\^{A}" nil "Â" "A" "Â" "Â")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("acirc" "\\^{a}" nil "â" "a" "â" "â")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Atilde" "\\~{A}" nil "Ã" "A" "Ã" "Ã")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("atilde" "\\~{a}" nil "ã" "a" "ã" "ã")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Auml" "\\\"{A}" nil "Ä" "Ae" "Ä" "Ä")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("auml" "\\\"{a}" nil "ä" "ae" "ä" "ä")
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("Aring" "\\AA{}" nil "Å" "A" "Å" "Å")
|
|
|
|
|
("AA" "\\AA{}" nil "Å" "A" "Å" "Å")
|
|
|
|
|
("aring" "\\aa{}" nil "å" "a" "å" "å")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("AElig" "\\AE{}" nil "Æ" "AE" "Æ" "Æ")
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("aelig" "\\ae{}" nil "æ" "ae" "æ" "æ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ccedil" "\\c{C}" nil "Ç" "C" "Ç" "Ç")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ccedil" "\\c{c}" nil "ç" "c" "ç" "ç")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Egrave" "\\`{E}" nil "È" "E" "È" "È")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("egrave" "\\`{e}" nil "è" "e" "è" "è")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Eacute" "\\'{E}" nil "É" "E" "É" "É")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("eacute" "\\'{e}" nil "é" "e" "é" "é")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ecirc" "\\^{E}" nil "Ê" "E" "Ê" "Ê")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ecirc" "\\^{e}" nil "ê" "e" "ê" "ê")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Euml" "\\\"{E}" nil "Ë" "E" "Ë" "Ë")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("euml" "\\\"{e}" nil "ë" "e" "ë" "ë")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Igrave" "\\`{I}" nil "Ì" "I" "Ì" "Ì")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("igrave" "\\`{i}" nil "ì" "i" "ì" "ì")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Iacute" "\\'{I}" nil "Í" "I" "Í" "Í")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("iacute" "\\'{i}" nil "í" "i" "í" "í")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Icirc" "\\^{I}" nil "Î" "I" "Î" "Î")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("icirc" "\\^{i}" nil "î" "i" "î" "î")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Iuml" "\\\"{I}" nil "Ï" "I" "Ï" "Ï")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("iuml" "\\\"{i}" nil "ï" "i" "ï" "ï")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ntilde" "\\~{N}" nil "Ñ" "N" "Ñ" "Ñ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ntilde" "\\~{n}" nil "ñ" "n" "ñ" "ñ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ograve" "\\`{O}" nil "Ò" "O" "Ò" "Ò")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ograve" "\\`{o}" nil "ò" "o" "ò" "ò")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Oacute" "\\'{O}" nil "Ó" "O" "Ó" "Ó")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("oacute" "\\'{o}" nil "ó" "o" "ó" "ó")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ocirc" "\\^{O}" nil "Ô" "O" "Ô" "Ô")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ocirc" "\\^{o}" nil "ô" "o" "ô" "ô")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Otilde" "\\~{O}" nil "Õ" "O" "Õ" "Õ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("otilde" "\\~{o}" nil "õ" "o" "õ" "õ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ouml" "\\\"{O}" nil "Ö" "Oe" "Ö" "Ö")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ouml" "\\\"{o}" nil "ö" "oe" "ö" "ö")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Oslash" "\\O" nil "Ø" "O" "Ø" "Ø")
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("oslash" "\\o{}" nil "ø" "o" "ø" "ø")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("OElig" "\\OE{}" nil "Œ" "OE" "OE" "Œ")
|
|
|
|
|
("oelig" "\\oe{}" nil "œ" "oe" "oe" "œ")
|
|
|
|
|
("Scaron" "\\v{S}" nil "Š" "S" "S" "Š")
|
|
|
|
|
("scaron" "\\v{s}" nil "š" "s" "s" "š")
|
|
|
|
|
("szlig" "\\ss{}" nil "ß" "ss" "ß" "ß")
|
|
|
|
|
("Ugrave" "\\`{U}" nil "Ù" "U" "Ù" "Ù")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ugrave" "\\`{u}" nil "ù" "u" "ù" "ù")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Uacute" "\\'{U}" nil "Ú" "U" "Ú" "Ú")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("uacute" "\\'{u}" nil "ú" "u" "ú" "ú")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Ucirc" "\\^{U}" nil "Û" "U" "Û" "Û")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("ucirc" "\\^{u}" nil "û" "u" "û" "û")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Uuml" "\\\"{U}" nil "Ü" "Ue" "Ü" "Ü")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("uuml" "\\\"{u}" nil "ü" "ue" "ü" "ü")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Yacute" "\\'{Y}" nil "Ý" "Y" "Ý" "Ý")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("yacute" "\\'{y}" nil "ý" "y" "ý" "ý")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Yuml" "\\\"{Y}" nil "Ÿ" "Y" "Y" "Ÿ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("yuml" "\\\"{y}" nil "ÿ" "y" "ÿ" "ÿ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
|
|
|
|
|
"** Latin (special face)"
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("fnof" "\\textit{f}" nil "ƒ" "f" "f" "ƒ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("real" "\\Re" t "ℜ" "R" "R" "ℜ")
|
|
|
|
|
("image" "\\Im" t "ℑ" "I" "I" "ℑ")
|
|
|
|
|
("weierp" "\\wp" t "℘" "P" "P" "℘")
|
|
|
|
|
|
|
|
|
|
"** Greek"
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("Alpha" "A" nil "Α" "Alpha" "Alpha" "Α")
|
|
|
|
|
("alpha" "\\alpha" t "α" "alpha" "alpha" "α")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Beta" "B" nil "Β" "Beta" "Beta" "Β")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("beta" "\\beta" t "β" "beta" "beta" "β")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Gamma" "\\Gamma" t "Γ" "Gamma" "Gamma" "Γ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("gamma" "\\gamma" t "γ" "gamma" "gamma" "γ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Delta" "\\Delta" t "Δ" "Delta" "Gamma" "Δ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("delta" "\\delta" t "δ" "delta" "delta" "δ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Epsilon" "E" nil "Ε" "Epsilon" "Epsilon" "Ε")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("epsilon" "\\epsilon" t "ε" "epsilon" "epsilon" "ε")
|
|
|
|
|
("varepsilon" "\\varepsilon" t "ε" "varepsilon" "varepsilon" "ε")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Zeta" "Z" nil "Ζ" "Zeta" "Zeta" "Ζ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("zeta" "\\zeta" t "ζ" "zeta" "zeta" "ζ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Eta" "H" nil "Η" "Eta" "Eta" "Η")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("eta" "\\eta" t "η" "eta" "eta" "η")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Theta" "\\Theta" t "Θ" "Theta" "Theta" "Θ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("theta" "\\theta" t "θ" "theta" "theta" "θ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("thetasym" "\\vartheta" t "ϑ" "theta" "theta" "ϑ")
|
|
|
|
|
("vartheta" "\\vartheta" t "ϑ" "theta" "theta" "ϑ")
|
|
|
|
|
("Iota" "I" nil "Ι" "Iota" "Iota" "Ι")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("iota" "\\iota" t "ι" "iota" "iota" "ι")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Kappa" "K" nil "Κ" "Kappa" "Kappa" "Κ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("kappa" "\\kappa" t "κ" "kappa" "kappa" "κ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Lambda" "\\Lambda" t "Λ" "Lambda" "Lambda" "Λ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("lambda" "\\lambda" t "λ" "lambda" "lambda" "λ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Mu" "M" nil "Μ" "Mu" "Mu" "Μ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("mu" "\\mu" t "μ" "mu" "mu" "μ")
|
|
|
|
|
("nu" "\\nu" t "ν" "nu" "nu" "ν")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Nu" "N" nil "Ν" "Nu" "Nu" "Ν")
|
|
|
|
|
("Xi" "\\Xi" t "Ξ" "Xi" "Xi" "Ξ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("xi" "\\xi" t "ξ" "xi" "xi" "ξ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Omicron" "O" nil "Ο" "Omicron" "Omicron" "Ο")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("omicron" "\\textit{o}" nil "ο" "omicron" "omicron" "ο")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Pi" "\\Pi" t "Π" "Pi" "Pi" "Π")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("pi" "\\pi" t "π" "pi" "pi" "π")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Rho" "P" nil "Ρ" "Rho" "Rho" "Ρ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("rho" "\\rho" t "ρ" "rho" "rho" "ρ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Sigma" "\\Sigma" t "Σ" "Sigma" "Sigma" "Σ")
|
|
|
|
|
("sigma" "\\sigma" t "σ" "sigma" "sigma" "σ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("sigmaf" "\\varsigma" t "ς" "sigmaf" "sigmaf" "ς")
|
|
|
|
|
("varsigma" "\\varsigma" t "ς" "varsigma" "varsigma" "ς")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Tau" "T" nil "Τ" "Tau" "Tau" "Τ")
|
|
|
|
|
("Upsilon" "\\Upsilon" t "Υ" "Upsilon" "Upsilon" "Υ")
|
|
|
|
|
("upsih" "\\Upsilon" t "ϒ" "upsilon" "upsilon" "ϒ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("upsilon" "\\upsilon" t "υ" "upsilon" "upsilon" "υ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Phi" "\\Phi" t "Φ" "Phi" "Phi" "Φ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("phi" "\\phi" t "φ" "phi" "phi" "φ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("Chi" "X" nil "Χ" "Chi" "Chi" "Χ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("chi" "\\chi" t "χ" "chi" "chi" "χ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("acutex" "\\acute x" t "´x" "'x" "'x" "𝑥́")
|
|
|
|
|
("Psi" "\\Psi" t "Ψ" "Psi" "Psi" "Ψ")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("psi" "\\psi" t "ψ" "psi" "psi" "ψ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("tau" "\\tau" t "τ" "tau" "tau" "τ")
|
|
|
|
|
("Omega" "\\Omega" t "Ω" "Omega" "Omega" "Ω")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("omega" "\\omega" t "ω" "omega" "omega" "ω")
|
|
|
|
|
("piv" "\\varpi" t "ϖ" "omega-pi" "omega-pi" "ϖ")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("partial" "\\partial" t "∂" "[partial differential]" "[partial differential]" "∂")
|
|
|
|
|
|
|
|
|
|
"** Hebrew"
|
|
|
|
|
("alefsym" "\\aleph" t "ℵ" "aleph" "aleph" "ℵ")
|
|
|
|
|
|
|
|
|
|
"** Dead languages"
|
|
|
|
|
("ETH" "\\DH{}" nil "Ð" "D" "Ð" "Ð")
|
|
|
|
|
("eth" "\\dh{}" nil "ð" "dh" "ð" "ð")
|
|
|
|
|
("THORN" "\\TH{}" nil "Þ" "TH" "Þ" "Þ")
|
|
|
|
|
("thorn" "\\th{}" nil "þ" "th" "þ" "þ")
|
|
|
|
|
|
|
|
|
|
"* Punctuation"
|
|
|
|
|
"** Dots and Marks"
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("dots" "\\dots{}" nil "…" "..." "..." "…")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("hellip" "\\dots{}" nil "…" "..." "..." "…")
|
|
|
|
|
("middot" "\\textperiodcentered{}" nil "·" "." "·" "·")
|
|
|
|
|
("iexcl" "!`" nil "¡" "!" "¡" "¡")
|
|
|
|
|
("iquest" "?`" nil "¿" "?" "¿" "¿")
|
|
|
|
|
|
|
|
|
|
"** Dash-like"
|
|
|
|
|
("shy" "\\-" nil "­" "" "" "")
|
|
|
|
|
("ndash" "--" nil "–" "-" "-" "–")
|
|
|
|
|
("mdash" "---" nil "—" "--" "--" "—")
|
|
|
|
|
|
|
|
|
|
"** Quotations"
|
|
|
|
|
("quot" "\\textquotedbl{}" nil """ "\"" "\"" "\"")
|
|
|
|
|
("acute" "\\textasciiacute{}" nil "´" "'" "´" "´")
|
|
|
|
|
("ldquo" "\\textquotedblleft{}" nil "“" "\"" "\"" "“")
|
|
|
|
|
("rdquo" "\\textquotedblright{}" nil "”" "\"" "\"" "”")
|
|
|
|
|
("bdquo" "\\quotedblbase{}" nil "„" "\"" "\"" "„")
|
|
|
|
|
("lsquo" "\\textquoteleft{}" nil "‘" "`" "`" "‘")
|
|
|
|
|
("rsquo" "\\textquoteright{}" nil "’" "'" "'" "’")
|
|
|
|
|
("sbquo" "\\quotesinglbase{}" nil "‚" "," "," "‚")
|
|
|
|
|
("laquo" "\\guillemotleft{}" nil "«" "<<" "«" "«")
|
|
|
|
|
("raquo" "\\guillemotright{}" nil "»" ">>" "»" "»")
|
|
|
|
|
("lsaquo" "\\guilsinglleft{}" nil "‹" "<" "<" "‹")
|
|
|
|
|
("rsaquo" "\\guilsinglright{}" nil "›" ">" ">" "›")
|
|
|
|
|
|
|
|
|
|
"* Other"
|
|
|
|
|
"** Misc. (often used)"
|
|
|
|
|
("circ" "\\circ" t "ˆ" "^" "^" "ˆ")
|
|
|
|
|
("vert" "\\vert{}" t "|" "|" "|" "|")
|
|
|
|
|
("brvbar" "\\textbrokenbar{}" nil "¦" "|" "¦" "¦")
|
|
|
|
|
("sect" "\\S" nil "§" "paragraph" "§" "§")
|
|
|
|
|
("amp" "\\&" nil "&" "&" "&" "&")
|
|
|
|
|
("lt" "\\textless{}" nil "<" "<" "<" "<")
|
|
|
|
|
("gt" "\\textgreater{}" nil ">" ">" ">" ">")
|
|
|
|
|
("tilde" "\\~{}" nil "˜" "~" "~" "~")
|
|
|
|
|
("dagger" "\\textdagger{}" nil "†" "[dagger]" "[dagger]" "†")
|
|
|
|
|
("Dagger" "\\textdaggerdbl{}" nil "‡" "[doubledagger]" "[doubledagger]" "‡")
|
|
|
|
|
|
|
|
|
|
"** Whitespace"
|
|
|
|
|
("nbsp" "~" nil " " " " " " " ")
|
|
|
|
|
("ensp" "\\hspace*{.5em}" nil " " " " " " " ")
|
|
|
|
|
("emsp" "\\hspace*{1em}" nil " " " " " " " ")
|
|
|
|
|
("thinsp" "\\hspace*{.2em}" nil " " " " " " " ")
|
|
|
|
|
|
|
|
|
|
"** Currency"
|
|
|
|
|
("curren" "\\textcurrency{}" nil "¤" "curr." "¤" "¤")
|
|
|
|
|
("cent" "\\textcent{}" nil "¢" "cent" "¢" "¢")
|
|
|
|
|
("pound" "\\pounds{}" nil "£" "pound" "£" "£")
|
|
|
|
|
("yen" "\\textyen{}" nil "¥" "yen" "¥" "¥")
|
|
|
|
|
("euro" "\\texteuro{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
("EUR" "\\EUR{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
("EURdig" "\\EURdig{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
("EURhv" "\\EURhv{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
("EURcr" "\\EURcr{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
("EURtm" "\\EURtm{}" nil "€" "EUR" "EUR" "€")
|
|
|
|
|
|
|
|
|
|
"** Property Marks"
|
|
|
|
|
("copy" "\\textcopyright{}" nil "©" "(c)" "©" "©")
|
|
|
|
|
("reg" "\\textregistered{}" nil "®" "(r)" "®" "®")
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("trade" "\\texttrademark{}" nil "™" "TM" "TM" "™")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
|
|
|
|
|
"** Science et al."
|
|
|
|
|
("minus" "\\minus" t "−" "-" "-" "−")
|
|
|
|
|
("pm" "\\textpm{}" nil "±" "+-" "±" "±")
|
|
|
|
|
("plusmn" "\\textpm{}" nil "±" "+-" "±" "±")
|
|
|
|
|
("times" "\\texttimes{}" nil "×" "*" "×" "×")
|
|
|
|
|
("frasl" "/" nil "⁄" "/" "/" "⁄")
|
|
|
|
|
("div" "\\textdiv{}" nil "÷" "/" "÷" "÷")
|
|
|
|
|
("frac12" "\\textonehalf{}" nil "½" "1/2" "½" "½")
|
|
|
|
|
("frac14" "\\textonequarter{}" nil "¼" "1/4" "¼" "¼")
|
|
|
|
|
("frac34" "\\textthreequarters{}" nil "¾" "3/4" "¾" "¾")
|
|
|
|
|
("permil" "\\textperthousand{}" nil "‰" "per thousand" "per thousand" "‰")
|
|
|
|
|
("sup1" "\\textonesuperior{}" nil "¹" "^1" "¹" "¹")
|
|
|
|
|
("sup2" "\\texttwosuperior{}" nil "²" "^2" "²" "²")
|
|
|
|
|
("sup3" "\\textthreesuperior{}" nil "³" "^3" "³" "³")
|
2010-03-30 04:36:02 -04:00
|
|
|
|
("radic" "\\sqrt{\\,}" t "√" "[square root]" "[square root]" "√")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("sum" "\\sum" t "∑" "[sum]" "[sum]" "∑")
|
|
|
|
|
("prod" "\\prod" t "∏" "[product]" "[n-ary product]" "∏")
|
|
|
|
|
("micro" "\\textmu{}" nil "µ" "micro" "µ" "µ")
|
|
|
|
|
("macr" "\\textasciimacron{}" nil "¯" "[macron]" "¯" "¯")
|
2011-06-06 03:24:21 -04:00
|
|
|
|
("deg" "\\textdegree{}" nil "°" "degree" "°" "°")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("prime" "\\prime" t "′" "'" "'" "′")
|
|
|
|
|
("Prime" "\\prime{}\\prime" t "″" "''" "''" "″")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("infin" "\\propto" t "∞" "[infinity]" "[infinity]" "∞")
|
|
|
|
|
("infty" "\\infty" t "∞" "[infinity]" "[infinity]" "∞")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("prop" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝")
|
|
|
|
|
("proptp" "\\propto" t "∝" "[proportional to]" "[proportional to]" "∝")
|
|
|
|
|
("not" "\\textlnot{}" nil "¬" "[angled dash]" "¬" "¬")
|
2010-04-23 11:22:07 -04:00
|
|
|
|
("land" "\\land" t "∧" "[logical and]" "[logical and]" "∧")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("wedge" "\\wedge" t "∧" "[logical and]" "[logical and]" "∧")
|
2010-04-23 11:22:07 -04:00
|
|
|
|
("lor" "\\lor" t "∨" "[logical or]" "[logical or]" "∨")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("vee" "\\vee" t "∨" "[logical or]" "[logical or]" "∨")
|
|
|
|
|
("cap" "\\cap" t "∩" "[intersection]" "[intersection]" "∩")
|
|
|
|
|
("cup" "\\cup" t "∪" "[union]" "[union]" "∪")
|
|
|
|
|
("int" "\\int" t "∫" "[integral]" "[integral]" "∫")
|
|
|
|
|
("there4" "\\therefore" t "∴" "[therefore]" "[therefore]" "∴")
|
|
|
|
|
("sim" "\\sim" t "∼" "~" "~" "∼")
|
|
|
|
|
("cong" "\\cong" t "≅" "[approx. equal to]" "[approx. equal to]" "≅")
|
|
|
|
|
("simeq" "\\simeq" t "≅" "[approx. equal to]" "[approx. equal to]" "≅")
|
|
|
|
|
("asymp" "\\asymp" t "≈" "[almost equal to]" "[almost equal to]" "≈")
|
|
|
|
|
("approx" "\\approx" t "≈" "[almost equal to]" "[almost equal to]" "≈")
|
|
|
|
|
("ne" "\\ne" t "≠" "[not equal to]" "[not equal to]" "≠")
|
|
|
|
|
("neq" "\\neq" t "≠" "[not equal to]" "[not equal to]" "≠")
|
|
|
|
|
("equiv" "\\equiv" t "≡" "[identical to]" "[identical to]" "≡")
|
|
|
|
|
("le" "\\le" t "≤" "<=" "<=" "≤")
|
|
|
|
|
("ge" "\\ge" t "≥" ">=" ">=" "≥")
|
|
|
|
|
("sub" "\\subset" t "⊂" "[subset of]" "[subset of]" "⊂")
|
|
|
|
|
("subset" "\\subset" t "⊂" "[subset of]" "[subset of]" "⊂")
|
|
|
|
|
("sup" "\\supset" t "⊃" "[superset of]" "[superset of]" "⊃")
|
|
|
|
|
("supset" "\\supset" t "⊃" "[superset of]" "[superset of]" "⊃")
|
|
|
|
|
("nsub" "\\not\\subset" t "⊄" "[not a subset of]" "[not a subset of" "⊄")
|
|
|
|
|
("sube" "\\subseteq" t "⊆" "[subset of or equal to]" "[subset of or equal to]" "⊆")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("nsup" "\\not\\supset" t "⊅" "[not a superset of]" "[not a superset of]" "⊅")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("supe" "\\supseteq" t "⊇" "[superset of or equal to]" "[superset of or equal to]" "⊇")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("forall" "\\forall" t "∀" "[for all]" "[for all]" "∀")
|
|
|
|
|
("exist" "\\exists" t "∃" "[there exists]" "[there exists]" "∃")
|
|
|
|
|
("exists" "\\exists" t "∃" "[there exists]" "[there exists]" "∃")
|
|
|
|
|
("empty" "\\empty" t "∅" "[empty set]" "[empty set]" "∅")
|
|
|
|
|
("emptyset" "\\emptyset" t "∅" "[empty set]" "[empty set]" "∅")
|
|
|
|
|
("isin" "\\in" t "∈" "[element of]" "[element of]" "∈")
|
|
|
|
|
("in" "\\in" t "∈" "[element of]" "[element of]" "∈")
|
|
|
|
|
("notin" "\\notin" t "∉" "[not an element of]" "[not an element of]" "∉")
|
|
|
|
|
("ni" "\\ni" t "∋" "[contains as member]" "[contains as member]" "∋")
|
|
|
|
|
("nabla" "\\nabla" t "∇" "[nabla]" "[nabla]" "∇")
|
|
|
|
|
("ang" "\\angle" t "∠" "[angle]" "[angle]" "∠")
|
|
|
|
|
("angle" "\\angle" t "∠" "[angle]" "[angle]" "∠")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("perp" "\\perp" t "⊥" "[up tack]" "[up tack]" "⊥")
|
|
|
|
|
("sdot" "\\cdot" t "⋅" "[dot]" "[dot]" "⋅")
|
|
|
|
|
("cdot" "\\cdot" t "⋅" "[dot]" "[dot]" "⋅")
|
|
|
|
|
("lceil" "\\lceil" t "⌈" "[left ceiling]" "[left ceiling]" "⌈")
|
|
|
|
|
("rceil" "\\rceil" t "⌉" "[right ceiling]" "[right ceiling]" "⌉")
|
|
|
|
|
("lfloor" "\\lfloor" t "⌊" "[left floor]" "[left floor]" "⌊")
|
|
|
|
|
("rfloor" "\\rfloor" t "⌋" "[right floor]" "[right floor]" "⌋")
|
|
|
|
|
("lang" "\\langle" t "⟨" "<" "<" "⟨")
|
|
|
|
|
("rang" "\\rangle" t "⟩" ">" ">" "⟩")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
|
|
|
|
|
"** Arrows"
|
|
|
|
|
("larr" "\\leftarrow" t "←" "<-" "<-" "←")
|
|
|
|
|
("leftarrow" "\\leftarrow" t "←" "<-" "<-" "←")
|
|
|
|
|
("gets" "\\gets" t "←" "<-" "<-" "←")
|
|
|
|
|
("lArr" "\\Leftarrow" t "⇐" "<=" "<=" "⇐")
|
|
|
|
|
("Leftarrow" "\\Leftarrow" t "⇐" "<=" "<=" "⇐")
|
|
|
|
|
("uarr" "\\uparrow" t "↑" "[uparrow]" "[uparrow]" "↑")
|
|
|
|
|
("uparrow" "\\uparrow" t "↑" "[uparrow]" "[uparrow]" "↑")
|
|
|
|
|
("uArr" "\\Uparrow" t "⇑" "[dbluparrow]" "[dbluparrow]" "⇑")
|
|
|
|
|
("Uparrow" "\\Uparrow" t "⇑" "[dbluparrow]" "[dbluparrow]" "⇑")
|
|
|
|
|
("rarr" "\\rightarrow" t "→" "->" "->" "→")
|
|
|
|
|
("to" "\\to" t "→" "->" "->" "→")
|
|
|
|
|
("rightarrow" "\\rightarrow" t "→" "->" "->" "→")
|
|
|
|
|
("rArr" "\\Rightarrow" t "⇒" "=>" "=>" "⇒")
|
|
|
|
|
("Rightarrow" "\\Rightarrow" t "⇒" "=>" "=>" "⇒")
|
|
|
|
|
("darr" "\\downarrow" t "↓" "[downarrow]" "[downarrow]" "↓")
|
|
|
|
|
("downarrow" "\\downarrow" t "↓" "[downarrow]" "[downarrow]" "↓")
|
|
|
|
|
("dArr" "\\Downarrow" t "⇓" "[dbldownarrow]" "[dbldownarrow]" "⇓")
|
|
|
|
|
("Downarrow" "\\Downarrow" t "⇓" "[dbldownarrow]" "[dbldownarrow]" "⇓")
|
|
|
|
|
("harr" "\\leftrightarrow" t "↔" "<->" "<->" "↔")
|
|
|
|
|
("leftrightarrow" "\\leftrightarrow" t "↔" "<->" "<->" "↔")
|
|
|
|
|
("hArr" "\\Leftrightarrow" t "⇔" "<=>" "<=>" "⇔")
|
|
|
|
|
("Leftrightarrow" "\\Leftrightarrow" t "⇔" "<=>" "<=>" "⇔")
|
|
|
|
|
("crarr" "\\hookleftarrow" t "↵" "<-'" "<-'" "↵")
|
|
|
|
|
("hookleftarrow" "\\hookleftarrow" t "↵" "<-'" "<-'" "↵")
|
|
|
|
|
|
|
|
|
|
"** Function names"
|
2010-03-28 03:48:03 -04:00
|
|
|
|
("arccos" "\\arccos" t "arccos" "arccos" "arccos" "arccos")
|
|
|
|
|
("arcsin" "\\arcsin" t "arcsin" "arcsin" "arcsin" "arcsin")
|
|
|
|
|
("arctan" "\\arctan" t "arctan" "arctan" "arctan" "arctan")
|
|
|
|
|
("arg" "\\arg" t "arg" "arg" "arg" "arg")
|
|
|
|
|
("cos" "\\cos" t "cos" "cos" "cos" "cos")
|
|
|
|
|
("cosh" "\\cosh" t "cosh" "cosh" "cosh" "cosh")
|
|
|
|
|
("cot" "\\cot" t "cot" "cot" "cot" "cot")
|
|
|
|
|
("coth" "\\coth" t "coth" "coth" "coth" "coth")
|
|
|
|
|
("csc" "\\csc" t "csc" "csc" "csc" "csc")
|
|
|
|
|
("deg" "\\deg" t "°" "deg" "deg" "deg")
|
|
|
|
|
("det" "\\det" t "det" "det" "det" "det")
|
|
|
|
|
("dim" "\\dim" t "dim" "dim" "dim" "dim")
|
|
|
|
|
("exp" "\\exp" t "exp" "exp" "exp" "exp")
|
|
|
|
|
("gcd" "\\gcd" t "gcd" "gcd" "gcd" "gcd")
|
|
|
|
|
("hom" "\\hom" t "hom" "hom" "hom" "hom")
|
|
|
|
|
("inf" "\\inf" t "inf" "inf" "inf" "inf")
|
|
|
|
|
("ker" "\\ker" t "ker" "ker" "ker" "ker")
|
|
|
|
|
("lg" "\\lg" t "lg" "lg" "lg" "lg")
|
|
|
|
|
("lim" "\\lim" t "lim" "lim" "lim" "lim")
|
|
|
|
|
("liminf" "\\liminf" t "liminf" "liminf" "liminf" "liminf")
|
|
|
|
|
("limsup" "\\limsup" t "limsup" "limsup" "limsup" "limsup")
|
|
|
|
|
("ln" "\\ln" t "ln" "ln" "ln" "ln")
|
|
|
|
|
("log" "\\log" t "log" "log" "log" "log")
|
|
|
|
|
("max" "\\max" t "max" "max" "max" "max")
|
|
|
|
|
("min" "\\min" t "min" "min" "min" "min")
|
|
|
|
|
("Pr" "\\Pr" t "Pr" "Pr" "Pr" "Pr")
|
|
|
|
|
("sec" "\\sec" t "sec" "sec" "sec" "sec")
|
|
|
|
|
("sin" "\\sin" t "sin" "sin" "sin" "sin")
|
|
|
|
|
("sinh" "\\sinh" t "sinh" "sinh" "sinh" "sinh")
|
|
|
|
|
("sup" "\\sup" t "⊃" "sup" "sup" "sup")
|
|
|
|
|
("tan" "\\tan" t "tan" "tan" "tan" "tan")
|
|
|
|
|
("tanh" "\\tanh" t "tanh" "tanh" "tanh" "tanh")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
|
|
|
|
|
"** Signs & Symbols"
|
|
|
|
|
("bull" "\\textbullet{}" nil "•" "*" "*" "•")
|
|
|
|
|
("bullet" "\\textbullet{}" nil "•" "*" "*" "•")
|
|
|
|
|
("star" "\\star" t "*" "*" "*" "⋆")
|
|
|
|
|
("lowast" "\\ast" t "∗" "*" "*" "∗")
|
|
|
|
|
("ast" "\\ast" t "∗" "*" "*" "*")
|
|
|
|
|
("odot" "\\odot" t "o" "[circled dot]" "[circled dot]" "ʘ")
|
|
|
|
|
("oplus" "\\oplus" t "⊕" "[circled plus]" "[circled plus]" "⊕")
|
|
|
|
|
("otimes" "\\otimes" t "⊗" "[circled times]" "[circled times]" "⊗")
|
|
|
|
|
("checkmark" "\\checkmark" t "✓" "[checkmark]" "[checkmark]" "✓")
|
|
|
|
|
|
|
|
|
|
"** Miscellaneous (seldom used)"
|
|
|
|
|
("para" "\\P{}" nil "¶" "[pilcrow]" "¶" "¶")
|
|
|
|
|
("ordf" "\\textordfeminine{}" nil "ª" "_a_" "ª" "ª")
|
|
|
|
|
("ordm" "\\textordmasculine{}" nil "º" "_o_" "º" "º")
|
|
|
|
|
("cedil" "\\c{}" nil "¸" "[cedilla]" "¸" "¸")
|
|
|
|
|
("oline" "\\overline{~}" t "‾" "[overline]" "¯" "‾")
|
|
|
|
|
("uml" "\\textasciidieresis{}" nil "¨" "[diaeresis]" "¨" "¨")
|
|
|
|
|
("zwnj" "\\/{}" nil "‌" "" "" "")
|
|
|
|
|
("zwj" "" nil "‍" "" "" "")
|
|
|
|
|
("lrm" "" nil "‎" "" "" "")
|
|
|
|
|
("rlm" "" nil "‏" "" "" "")
|
|
|
|
|
|
|
|
|
|
"** Smilies"
|
|
|
|
|
("smile" "\\smile" t "☺" ":-)" ":-)" "⌣")
|
2010-03-29 09:10:56 -04:00
|
|
|
|
("smiley" "\\smiley{}" nil "☺" ":-)" ":-)" "☺")
|
2010-06-28 06:16:33 -04:00
|
|
|
|
("blacksmile" "\\blacksmiley{}" nil "☻" ":-)" ":-)" "☻")
|
|
|
|
|
("sad" "\\frownie{}" nil "☹" ":-(" ":-(" "☹")
|
|
|
|
|
|
|
|
|
|
"** Suits"
|
|
|
|
|
("clubs" "\\clubsuit" t "♣" "[clubs]" "[clubs]" "♣")
|
|
|
|
|
("clubsuit" "\\clubsuit" t "♣" "[clubs]" "[clubs]" "♣")
|
|
|
|
|
("spades" "\\spadesuit" t "♠" "[spades]" "[spades]" "♠")
|
|
|
|
|
("spadesuit" "\\spadesuit" t "♠" "[spades]" "[spades]" "♠")
|
|
|
|
|
("hearts" "\\heartsuit" t "♥" "[hearts]" "[hearts]" "♥")
|
|
|
|
|
("heartsuit" "\\heartsuit" t "♥" "[hearts]" "[hearts]" "♥")
|
|
|
|
|
("diams" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "♦")
|
|
|
|
|
("diamondsuit" "\\diamondsuit" t "♦" "[diamonds]" "[diamonds]" "♦")
|
|
|
|
|
("Diamond" "\\diamond" t "⋄" "[diamond]" "[diamond]" "⋄")
|
|
|
|
|
("loz" "\\diamond" t "◊" "[lozenge]" "[lozenge]" "◊")
|
2010-03-28 03:48:03 -04:00
|
|
|
|
)
|
2010-07-15 18:54:53 -04:00
|
|
|
|
"Default entities used in Org-mode to produce special characters.
|
2010-03-28 03:48:03 -04:00
|
|
|
|
For details see `org-entities-user'.")
|
|
|
|
|
|
|
|
|
|
(defsubst org-entity-get (name)
|
|
|
|
|
"Get the proper association for NAME from the entity lists.
|
|
|
|
|
This first checks the user list, then the built-in list."
|
|
|
|
|
(or (assoc name org-entities-user)
|
|
|
|
|
(assoc name org-entities)))
|
|
|
|
|
|
|
|
|
|
(defun org-entity-get-representation (name kind)
|
|
|
|
|
"Get the correct representation of entity NAME for export type KIND.
|
|
|
|
|
Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'."
|
|
|
|
|
(let* ((e (org-entity-get name))
|
|
|
|
|
(n (cdr (assq kind '((latex . 1) (html . 3) (ascii . 4)
|
|
|
|
|
(latin1 . 5) (utf8 . 6)))))
|
|
|
|
|
(r (and e n (nth n e))))
|
2010-04-01 11:49:45 -04:00
|
|
|
|
(if (and e r
|
|
|
|
|
(not org-entities-ascii-explanatory)
|
2010-03-28 03:48:03 -04:00
|
|
|
|
(memq kind '(ascii latin1 utf8))
|
|
|
|
|
(= (string-to-char r) ?\[))
|
|
|
|
|
(concat "\\" name)
|
|
|
|
|
r)))
|
|
|
|
|
|
|
|
|
|
(defsubst org-entity-latex-math-p (name)
|
|
|
|
|
"Does entity NAME require math mode in LaTeX?"
|
|
|
|
|
(nth 2 (org-entity-get name)))
|
|
|
|
|
|
2010-03-29 16:06:53 -04:00
|
|
|
|
;; Helpfunctions to create a table for orgmode.org/worg/org-symbols.org
|
|
|
|
|
|
|
|
|
|
(defun org-entities-create-table ()
|
|
|
|
|
"Create an org-mode table with all entities."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let ((ll org-entities)
|
|
|
|
|
(pos (point))
|
2010-04-04 16:26:27 -04:00
|
|
|
|
e latex mathp html latin utf8 name ascii)
|
2010-03-29 16:06:53 -04:00
|
|
|
|
(insert "|Name|LaTeX code|LaTeX|HTML code |HTML|ASCII|Latin1|UTF-8\n|-\n")
|
|
|
|
|
(while ll
|
2010-06-28 06:16:33 -04:00
|
|
|
|
(when (listp e)
|
|
|
|
|
(setq e (pop ll))
|
|
|
|
|
(setq name (car e)
|
|
|
|
|
latex (nth 1 e)
|
|
|
|
|
mathp (nth 2 e)
|
|
|
|
|
html (nth 3 e)
|
|
|
|
|
ascii (nth 4 e)
|
|
|
|
|
latin (nth 5 e)
|
|
|
|
|
utf8 (nth 6 e))
|
|
|
|
|
(if (equal ascii "|") (setq ascii "\\vert"))
|
|
|
|
|
(if (equal latin "|") (setq latin "\\vert"))
|
|
|
|
|
(if (equal utf8 "|") (setq utf8 "\\vert"))
|
|
|
|
|
(if (equal ascii "=>") (setq ascii "= >"))
|
|
|
|
|
(if (equal latin "=>") (setq latin "= >"))
|
|
|
|
|
(insert "|" name
|
|
|
|
|
"|" (format "=%s=" latex)
|
|
|
|
|
"|" (format (if mathp "$%s$" "$\\mbox{%s}$")
|
|
|
|
|
latex)
|
|
|
|
|
"|" (format "=%s=" html) "|" html
|
|
|
|
|
"|" ascii "|" latin "|" utf8
|
|
|
|
|
"|\n")))
|
2010-03-29 16:06:53 -04:00
|
|
|
|
(goto-char pos)
|
|
|
|
|
(org-table-align)))
|
|
|
|
|
|
2010-06-03 12:17:08 -04:00
|
|
|
|
(defun org-entities-help ()
|
2010-07-15 18:54:53 -04:00
|
|
|
|
"Create a Help buffer with all available entities."
|
2010-06-03 12:17:08 -04:00
|
|
|
|
(interactive)
|
2010-06-28 06:16:33 -04:00
|
|
|
|
(with-output-to-temp-buffer "*Org Entity Help*"
|
2010-06-03 12:17:08 -04:00
|
|
|
|
(princ "Org-mode entities\n=================\n\n")
|
2010-07-12 05:37:39 -04:00
|
|
|
|
(let ((ll (append '("* User-defined additions (variable org-entities-user)")
|
|
|
|
|
org-entities-user
|
|
|
|
|
org-entities))
|
2010-06-28 06:16:33 -04:00
|
|
|
|
e latex mathp html latin utf8 name ascii
|
|
|
|
|
(lastwasstring t)
|
|
|
|
|
(head (concat
|
|
|
|
|
"\n"
|
|
|
|
|
" Symbol Org entity LaTeX code HTML code\n"
|
|
|
|
|
" -----------------------------------------------------------\n")))
|
2010-06-03 12:17:08 -04:00
|
|
|
|
(while ll
|
|
|
|
|
(setq e (pop ll))
|
2010-06-28 06:16:33 -04:00
|
|
|
|
(if (stringp e)
|
|
|
|
|
(progn
|
|
|
|
|
(princ e)
|
|
|
|
|
(princ "\n")
|
|
|
|
|
(setq lastwasstring t))
|
|
|
|
|
(if lastwasstring (princ head))
|
|
|
|
|
(setq lastwasstring nil)
|
|
|
|
|
(setq name (car e)
|
|
|
|
|
latex (nth 1 e)
|
|
|
|
|
html (nth 3 e)
|
|
|
|
|
utf8 (nth 6 e))
|
|
|
|
|
(princ (format " %-8s \\%-16s %-22s %-13s\n"
|
|
|
|
|
utf8 name latex html))))))
|
|
|
|
|
(with-current-buffer "*Org Entity Help*"
|
|
|
|
|
(org-mode))
|
|
|
|
|
(select-window (get-buffer-window "*Org Entity Help*")))
|
|
|
|
|
|
2010-06-03 12:17:08 -04:00
|
|
|
|
|
2010-03-29 16:06:53 -04:00
|
|
|
|
(defun replace-amp ()
|
2010-07-15 18:54:53 -04:00
|
|
|
|
"Postprocess HTML file to unescape the ampersand."
|
2010-03-29 16:06:53 -04:00
|
|
|
|
(interactive)
|
|
|
|
|
(while (re-search-forward "<td>&\\([^<;]+;\\)" nil t)
|
|
|
|
|
(replace-match (concat "<td>&" (match-string 1)) t t)))
|
|
|
|
|
|
2010-03-28 03:48:03 -04:00
|
|
|
|
(provide 'org-entities)
|
|
|
|
|
|
2010-06-22 08:42:45 -04:00
|
|
|
|
;; Local variables:
|
|
|
|
|
;; coding: utf-8
|
|
|
|
|
;; End:
|
|
|
|
|
|
2010-03-28 03:48:03 -04:00
|
|
|
|
;; arch-tag: e6bd163f-7419-4009-9c93-a74623016424
|
|
|
|
|
|
|
|
|
|
;;; org-entities.el ends here
|