//! Org's entity table: `\\alpha` and friends, name to HTML. //! //! Generated from Emacs' own `org-entities` — the table is long, arbitrary and exactly //! what a reader's file will contain, so copying it by hand would be a slow way to //! introduce typos. Regenerate with: //! //! ```sh //! emacs --batch --eval '(progn (require (quote org)) \ //! (dolist (e org-entities) (when (and (listp e) (nth 3 e)) \ //! (princ (format "%s\t%s\n" (nth 0 e) (nth 3 e))))))' //! ``` //! //! The HTML column is used rather than the UTF-8 one, so output matches what Emacs //! writes for the same source. /// `(name, html)` for every entity org knows, sorted by name. pub const ENTITIES: &[(&str, &str)] = &[ ("AA", "Å"), ("AElig", "Æ"), ("Aacute", "Á"), ("Acirc", "Â"), ("Agrave", "À"), ("Alpha", "Α"), ("Amacr", "Ā"), ("Aring", "Å"), ("Atilde", "Ã"), ("Auml", "Ä"), ("Beta", "Β"), ("Ccedil", "Ç"), ("Chi", "Χ"), ("Dagger", "‡"), ("Delta", "Δ"), ("Diamond", "⋄"), ("Downarrow", "⇓"), ("ETH", "Ð"), ("EUR", "€"), ("Eacute", "É"), ("Ecirc", "Ê"), ("Egrave", "È"), ("Epsilon", "Ε"), ("Eta", "Η"), ("Euml", "Ë"), ("Gamma", "Γ"), ("Gg", "⋙"), ("Iacute", "Í"), ("Icirc", "Î"), ("Idot", "&idot;"), ("Igrave", "Ì"), ("Iota", "Ι"), ("Iuml", "Ï"), ("Kappa", "Κ"), ("Lambda", "Λ"), ("Leftarrow", "⇐"), ("Leftrightarrow", "⇔"), ("Ll", "⋘"), ("Mu", "Μ"), ("Ntilde", "Ñ"), ("Nu", "Ν"), ("OElig", "Œ"), ("Oacute", "Ó"), ("Ocirc", "Ô"), ("Ograve", "Ò"), ("Omega", "Ω"), ("Omicron", "Ο"), ("Oslash", "Ø"), ("Otilde", "Õ"), ("Ouml", "Ö"), ("P", "¶"), ("Phi", "Φ"), ("Pi", "Π"), ("Pr", "Pr"), ("Prime", "″"), ("Psi", "Ψ"), ("Rho", "Ρ"), ("Rightarrow", "⇒"), ("S", "§"), ("Scaron", "Š"), ("Sigma", "Σ"), ("THORN", "Þ"), ("Tau", "Τ"), ("Theta", "Θ"), ("USD", "$"), ("Uacute", "Ú"), ("Ucirc", "Û"), ("Ugrave", "Ù"), ("Uparrow", "⇑"), ("Upsilon", "Υ"), ("Uuml", "Ü"), ("Xi", "Ξ"), ("Yacute", "Ý"), ("Yuml", "Ÿ"), ("Zeta", "Ζ"), ("_ ", " "), ("_ ", "  "), ("_ ", "   "), ("_ ", "    "), ("_ ", "     "), ("_ ", "      "), ("_ ", "       "), ("_ ", "        "), ("_ ", "         "), ("_ ", "          "), ("_ ", "           "), ("_ ", "            "), ("_ ", "             "), ("_ ", "              "), ("_ ", "               "), ("_ ", "                "), ("_ ", "                 "), ("_ ", "                  "), ("_ ", "                   "), ("_ ", "                    "), ("aacute", "á"), ("acirc", "â"), ("acute", "´"), ("acutex", "´x"), ("aelig", "æ"), ("agrave", "à"), ("alefsym", "ℵ"), ("aleph", "ℵ"), ("alpha", "α"), ("amacr", "ā"), ("amp", "&"), ("ang", "∠"), ("angle", "∠"), ("approx", "≈"), ("arccos", "arccos"), ("arcsin", "arcsin"), ("arctan", "arctan"), ("arg", "arg"), ("aring", "å"), ("asciicirc", "^"), ("ast", "∗"), ("asymp", "≈"), ("atilde", "ã"), ("auml", "ä"), ("bdquo", "„"), ("because", "∵"), ("beta", "β"), ("beth", "ℶ"), ("blacksmile", "☻"), ("brvbar", "¦"), ("bull", "•"), ("bullet", "•"), ("cap", "∩"), ("ccedil", "ç"), ("cdot", "⋅"), ("cdots", "⋯"), ("cedil", "¸"), ("cent", "¢"), ("check", "✓"), ("checkmark", "✓"), ("chi", "χ"), ("circ", "ˆ"), ("clubs", "♣"), ("clubsuit", "♣"), ("colon", ":"), ("cong", "≅"), ("copy", "©"), ("cos", "cos"), ("cosh", "cosh"), ("cot", "cot"), ("coth", "coth"), ("crarr", "↵"), ("csc", "csc"), ("cup", "∪"), ("curren", "¤"), ("dArr", "⇓"), ("dag", "†"), ("dagger", "†"), ("dalet", "ℸ"), ("darr", "↓"), ("ddag", "‡"), ("deg", "°"), ("delta", "δ"), ("det", "det"), ("diamond", "⋄"), ("diamondsuit", "♦"), ("diams", "♦"), ("dim", "dim"), ("div", "÷"), ("dollar", "$"), ("dots", "…"), ("downarrow", "↓"), ("eacute", "é"), ("ecirc", "ê"), ("egrave", "è"), ("ell", "ℓ"), ("empty", "∅"), ("emptyset", "∅"), ("emsp", " "), ("ensp", " "), ("epsilon", "ε"), ("equal", "="), ("equiv", "≡"), ("eta", "η"), ("eth", "ð"), ("euml", "ë"), ("euro", "€"), ("exist", "∃"), ("exists", "∃"), ("exp", "exp"), ("fnof", "ƒ"), ("forall", "∀"), ("frac12", "½"), ("frac14", "¼"), ("frac34", "¾"), ("frasl", "⁄"), ("frown", "⌢"), ("frowny", "☹"), ("gamma", "γ"), ("gcd", "gcd"), ("ge", "≥"), ("geq", "≥"), ("gets", "←"), ("gg", "≫"), ("ggg", "⋙"), ("gimel", "ℷ"), ("gt", ">"), ("hArr", "⇔"), ("harr", "↔"), ("hbar", "ℏ"), ("hearts", "♥"), ("heartsuit", "♥"), ("hellip", "…"), ("hom", "hom"), ("hookleftarrow", "↵"), ("iacute", "í"), ("icirc", "î"), ("iexcl", "¡"), ("igrave", "ì"), ("image", "ℑ"), ("imath", "ı"), ("in", "∈"), ("inf", "inf"), ("infin", "∞"), ("infty", "∞"), ("inodot", "ı"), ("int", "∫"), ("iota", "ι"), ("iquest", "¿"), ("isin", "∈"), ("iuml", "ï"), ("jmath", "ȷ"), ("kappa", "κ"), ("ker", "ker"), ("lArr", "⇐"), ("lambda", "λ"), ("land", "∧"), ("lang", "⟨"), ("langle", "⟨"), ("laquo", "«"), ("larr", "←"), ("lceil", "⌈"), ("ldquo", "“"), ("le", "≤"), ("leftarrow", "←"), ("leftrightarrow", "↔"), ("leq", "≤"), ("lesseqgtr", "⋚"), ("lessgtr", "≶"), ("lfloor", "⌊"), ("lg", "lg"), ("lim", "lim"), ("liminf", "liminf"), ("limsup", "limsup"), ("ll", "≪"), ("lll", "⋘"), ("ln", "ln"), ("log", "log"), ("lor", "∨"), ("lowast", "∗"), ("loz", "◊"), ("lrm", "‎"), ("lsaquo", "‹"), ("lsquo", "‘"), ("lt", "<"), ("macr", "¯"), ("max", "max"), ("mdash", "—"), ("mho", "℧"), ("micro", "µ"), ("middot", "·"), ("min", "min"), ("minus", "−"), ("mu", "μ"), ("nabla", "∇"), ("nbsp", " "), ("ndash", "–"), ("ne", "≠"), ("neg", "¬"), ("neq", "≠"), ("nexist", "∃"), ("nexists", "∃"), ("ni", "∋"), ("not", "¬"), ("notin", "∉"), ("nsub", "⊄"), ("nsup", "⊅"), ("ntilde", "ñ"), ("nu", "ν"), ("oacute", "ó"), ("ocirc", "ô"), ("odot", "o"), ("oelig", "œ"), ("ograve", "ò"), ("oline", "‾"), ("omega", "ω"), ("omicron", "ο"), ("oplus", "⊕"), ("ordf", "ª"), ("ordm", "º"), ("oslash", "ø"), ("otilde", "õ"), ("otimes", "⊗"), ("ouml", "ö"), ("para", "¶"), ("parallel", "∥"), ("partial", "∂"), ("permil", "‰"), ("perp", "⊥"), ("phi", "φ"), ("pi", "π"), ("piv", "ϖ"), ("plus", "+"), ("plusmn", "±"), ("pm", "±"), ("pound", "£"), ("prec", "≺"), ("preccurlyeq", "≼"), ("preceq", "≼"), ("prime", "′"), ("prod", "∏"), ("prop", "∝"), ("propto", "∝"), ("psi", "ψ"), ("quot", """), ("rArr", "⇒"), ("radic", "√"), ("rang", "⟩"), ("rangle", "⟩"), ("raquo", "»"), ("rarr", "→"), ("rceil", "⌉"), ("rdquo", "”"), ("real", "ℜ"), ("reg", "®"), ("rfloor", "⌋"), ("rho", "ρ"), ("rightarrow", "→"), ("rlm", "‏"), ("rsaquo", "›"), ("rsquo", "’"), ("sad", "☹"), ("sbquo", "‚"), ("scaron", "š"), ("sdot", "⋅"), ("sec", "sec"), ("sect", "§"), ("setminus", "∖"), ("shy", "­"), ("sigma", "σ"), ("sigmaf", "ς"), ("sim", "∼"), ("simeq", "≅"), ("sin", "sin"), ("sinh", "sinh"), ("slash", "/"), ("smile", "⌣"), ("smiley", "☺"), ("spades", "♠"), ("spadesuit", "♠"), ("star", "*"), ("sub", "⊂"), ("sube", "⊆"), ("subset", "⊂"), ("succ", "≻"), ("succcurlyeq", "≽"), ("succeq", "≽"), ("sum", "∑"), ("sup", "⊃"), ("sup1", "¹"), ("sup2", "²"), ("sup3", "³"), ("supe", "⊇"), ("supset", "⊃"), ("szlig", "ß"), ("tan", "tan"), ("tanh", "tanh"), ("tau", "τ"), ("there4", "∴"), ("therefore", "∴"), ("theta", "θ"), ("thetasym", "ϑ"), ("thinsp", " "), ("thorn", "þ"), ("tilde", "~"), ("times", "×"), ("to", "→"), ("trade", "™"), ("triangleq", "≜"), ("uArr", "⇑"), ("uacute", "ú"), ("uarr", "↑"), ("ucirc", "û"), ("ugrave", "ù"), ("uml", "¨"), ("under", "_"), ("uparrow", "↑"), ("upsih", "ϒ"), ("upsilon", "υ"), ("uuml", "ü"), ("varepsilon", "ε"), ("varphi", "ϕ"), ("varpi", "ϖ"), ("varsigma", "ς"), ("vartheta", "ϑ"), ("vbar", "|"), ("vee", "∨"), ("vert", "|"), ("wedge", "∧"), ("weierp", "℘"), ("xi", "ξ"), ("yacute", "ý"), ("yen", "¥"), ("yuml", "ÿ"), ("zeta", "ζ"), ("zwj", "‍"), ("zwnj", "‌"), ]; /// The HTML for `\name`, if org knows it. pub fn lookup(name: &str) -> Option<&'static str> { ENTITIES .binary_search_by(|(n, _)| (*n).cmp(name)) .ok() .map(|i| ENTITIES[i].1) }