Merge branch 'entity_properties'
All checks were successful
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded

This commit is contained in:
Tom Alexander 2023-10-09 10:33:20 -04:00
commit ea29ad8667
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
10 changed files with 1407 additions and 467 deletions

View File

@ -1,5 +1,11 @@
(dolist (var org-entities)
(when (listp var)
(message "\"%s\"," (nth 0 var))
)
(dolist (var (sort (seq-filter 'listp org-entities)
(lambda (x y) (> (length (nth 0 x)) (length (nth 0 y))))))
(message "EntityDefinition {name: %s, latex_math_mode: %s, latex: %s, html: %s, ascii: %s, utf8: %s},"
(prin1-to-string (nth 0 var))
(if (nth 2 var) "true" "false")
(prin1-to-string (nth 1 var))
(prin1-to-string (nth 3 var))
(prin1-to-string (nth 4 var))
(prin1-to-string (nth 6 var))
)
)

View File

@ -0,0 +1,414 @@
\Agrave{}
\agrave{}
\Aacute{}
\aacute{}
\Acirc{}
\acirc{}
\Amacr{}
\amacr{}
\Atilde{}
\atilde{}
\Auml{}
\auml{}
\Aring{}
\AA{}
\aring{}
\AElig{}
\aelig{}
\Ccedil{}
\ccedil{}
\Egrave{}
\egrave{}
\Eacute{}
\eacute{}
\Ecirc{}
\ecirc{}
\Euml{}
\euml{}
\Igrave{}
\igrave{}
\Iacute{}
\iacute{}
\Idot{}
\inodot{}
\Icirc{}
\icirc{}
\Iuml{}
\iuml{}
\Ntilde{}
\ntilde{}
\Ograve{}
\ograve{}
\Oacute{}
\oacute{}
\Ocirc{}
\ocirc{}
\Otilde{}
\otilde{}
\Ouml{}
\ouml{}
\Oslash{}
\oslash{}
\OElig{}
\oelig{}
\Scaron{}
\scaron{}
\szlig{}
\Ugrave{}
\ugrave{}
\Uacute{}
\uacute{}
\Ucirc{}
\ucirc{}
\Uuml{}
\uuml{}
\Yacute{}
\yacute{}
\Yuml{}
\yuml{}
\fnof{}
\real{}
\image{}
\weierp{}
\ell{}
\imath{}
\jmath{}
\Alpha{}
\alpha{}
\Beta{}
\beta{}
\Gamma{}
\gamma{}
\Delta{}
\delta{}
\Epsilon{}
\epsilon{}
\varepsilon{}
\Zeta{}
\zeta{}
\Eta{}
\eta{}
\Theta{}
\theta{}
\thetasym{}
\vartheta{}
\Iota{}
\iota{}
\Kappa{}
\kappa{}
\Lambda{}
\lambda{}
\Mu{}
\mu{}
\nu{}
\Nu{}
\Xi{}
\xi{}
\Omicron{}
\omicron{}
\Pi{}
\pi{}
\Rho{}
\rho{}
\Sigma{}
\sigma{}
\sigmaf{}
\varsigma{}
\Tau{}
\Upsilon{}
\upsih{}
\upsilon{}
\Phi{}
\phi{}
\varphi{}
\Chi{}
\chi{}
\acutex{}
\Psi{}
\psi{}
\tau{}
\Omega{}
\omega{}
\piv{}
\varpi{}
\partial{}
\alefsym{}
\aleph{}
\gimel{}
\beth{}
\dalet{}
\ETH{}
\eth{}
\THORN{}
\thorn{}
\dots{}
\cdots{}
\hellip{}
\middot{}
\iexcl{}
\iquest{}
\shy{}
\ndash{}
\mdash{}
\quot{}
\acute{}
\ldquo{}
\rdquo{}
\bdquo{}
\lsquo{}
\rsquo{}
\sbquo{}
\laquo{}
\raquo{}
\lsaquo{}
\rsaquo{}
\circ{}
\vert{}
\vbar{}
\brvbar{}
\S{}
\sect{}
\P{}
\para{}
\amp{}
\lt{}
\gt{}
\tilde{}
\slash{}
\plus{}
\under{}
\equal{}
\asciicirc{}
\dagger{}
\dag{}
\Dagger{}
\ddag{}
\nbsp{}
\ensp{}
\emsp{}
\thinsp{}
\curren{}
\cent{}
\pound{}
\yen{}
\euro{}
\EUR{}
\dollar{}
\USD{}
\copy{}
\reg{}
\trade{}
\minus{}
\pm{}
\plusmn{}
\times{}
\frasl{}
\colon{}
\div{}
\frac12{}
\frac14{}
\frac34{}
\permil{}
\sup1{}
\sup2{}
\sup3{}
\radic{}
\sum{}
\prod{}
\micro{}
\macr{}
\deg{}
\prime{}
\Prime{}
\infin{}
\infty{}
\prop{}
\propto{}
\not{}
\neg{}
\land{}
\wedge{}
\lor{}
\vee{}
\cap{}
\cup{}
\smile{}
\frown{}
\int{}
\therefore{}
\there4{}
\because{}
\sim{}
\cong{}
\simeq{}
\asymp{}
\approx{}
\ne{}
\neq{}
\equiv{}
\triangleq{}
\le{}
\leq{}
\ge{}
\geq{}
\lessgtr{}
\lesseqgtr{}
\ll{}
\Ll{}
\lll{}
\gg{}
\Gg{}
\ggg{}
\prec{}
\preceq{}
\preccurlyeq{}
\succ{}
\succeq{}
\succcurlyeq{}
\sub{}
\subset{}
\sup{}
\supset{}
\nsub{}
\sube{}
\nsup{}
\supe{}
\setminus{}
\forall{}
\exist{}
\exists{}
\nexist{}
\nexists{}
\empty{}
\emptyset{}
\isin{}
\in{}
\notin{}
\ni{}
\nabla{}
\ang{}
\angle{}
\perp{}
\parallel{}
\sdot{}
\cdot{}
\lceil{}
\rceil{}
\lfloor{}
\rfloor{}
\lang{}
\rang{}
\langle{}
\rangle{}
\hbar{}
\mho{}
\larr{}
\leftarrow{}
\gets{}
\lArr{}
\Leftarrow{}
\uarr{}
\uparrow{}
\uArr{}
\Uparrow{}
\rarr{}
\to{}
\rightarrow{}
\rArr{}
\Rightarrow{}
\darr{}
\downarrow{}
\dArr{}
\Downarrow{}
\harr{}
\leftrightarrow{}
\hArr{}
\Leftrightarrow{}
\crarr{}
\hookleftarrow{}
\arccos{}
\arcsin{}
\arctan{}
\arg{}
\cos{}
\cosh{}
\cot{}
\coth{}
\csc{}
\deg{}
\det{}
\dim{}
\exp{}
\gcd{}
\hom{}
\inf{}
\ker{}
\lg{}
\lim{}
\liminf{}
\limsup{}
\ln{}
\log{}
\max{}
\min{}
\Pr{}
\sec{}
\sin{}
\sinh{}
\sup{}
\tan{}
\tanh{}
\bull{}
\bullet{}
\star{}
\lowast{}
\ast{}
\odot{}
\oplus{}
\otimes{}
\check{}
\checkmark{}
\ordf{}
\ordm{}
\cedil{}
\oline{}
\uml{}
\zwnj{}
\zwj{}
\lrm{}
\rlm{}
\smiley{}
\blacksmile{}
\sad{}
\frowny{}
\clubs{}
\clubsuit{}
\spades{}
\spadesuit{}
\hearts{}
\heartsuit{}
\diams{}
\diamondsuit{}
\diamond{}
\Diamond{}
\loz{}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}
\_ {}

View File

@ -0,0 +1,414 @@
\Agrave
\agrave
\Aacute
\aacute
\Acirc
\acirc
\Amacr
\amacr
\Atilde
\atilde
\Auml
\auml
\Aring
\AA
\aring
\AElig
\aelig
\Ccedil
\ccedil
\Egrave
\egrave
\Eacute
\eacute
\Ecirc
\ecirc
\Euml
\euml
\Igrave
\igrave
\Iacute
\iacute
\Idot
\inodot
\Icirc
\icirc
\Iuml
\iuml
\Ntilde
\ntilde
\Ograve
\ograve
\Oacute
\oacute
\Ocirc
\ocirc
\Otilde
\otilde
\Ouml
\ouml
\Oslash
\oslash
\OElig
\oelig
\Scaron
\scaron
\szlig
\Ugrave
\ugrave
\Uacute
\uacute
\Ucirc
\ucirc
\Uuml
\uuml
\Yacute
\yacute
\Yuml
\yuml
\fnof
\real
\image
\weierp
\ell
\imath
\jmath
\Alpha
\alpha
\Beta
\beta
\Gamma
\gamma
\Delta
\delta
\Epsilon
\epsilon
\varepsilon
\Zeta
\zeta
\Eta
\eta
\Theta
\theta
\thetasym
\vartheta
\Iota
\iota
\Kappa
\kappa
\Lambda
\lambda
\Mu
\mu
\nu
\Nu
\Xi
\xi
\Omicron
\omicron
\Pi
\pi
\Rho
\rho
\Sigma
\sigma
\sigmaf
\varsigma
\Tau
\Upsilon
\upsih
\upsilon
\Phi
\phi
\varphi
\Chi
\chi
\acutex
\Psi
\psi
\tau
\Omega
\omega
\piv
\varpi
\partial
\alefsym
\aleph
\gimel
\beth
\dalet
\ETH
\eth
\THORN
\thorn
\dots
\cdots
\hellip
\middot
\iexcl
\iquest
\shy
\ndash
\mdash
\quot
\acute
\ldquo
\rdquo
\bdquo
\lsquo
\rsquo
\sbquo
\laquo
\raquo
\lsaquo
\rsaquo
\circ
\vert
\vbar
\brvbar
\S
\sect
\P
\para
\amp
\lt
\gt
\tilde
\slash
\plus
\under
\equal
\asciicirc
\dagger
\dag
\Dagger
\ddag
\nbsp
\ensp
\emsp
\thinsp
\curren
\cent
\pound
\yen
\euro
\EUR
\dollar
\USD
\copy
\reg
\trade
\minus
\pm
\plusmn
\times
\frasl
\colon
\div
\frac12
\frac14
\frac34
\permil
\sup1
\sup2
\sup3
\radic
\sum
\prod
\micro
\macr
\deg
\prime
\Prime
\infin
\infty
\prop
\propto
\not
\neg
\land
\wedge
\lor
\vee
\cap
\cup
\smile
\frown
\int
\therefore
\there4
\because
\sim
\cong
\simeq
\asymp
\approx
\ne
\neq
\equiv
\triangleq
\le
\leq
\ge
\geq
\lessgtr
\lesseqgtr
\ll
\Ll
\lll
\gg
\Gg
\ggg
\prec
\preceq
\preccurlyeq
\succ
\succeq
\succcurlyeq
\sub
\subset
\sup
\supset
\nsub
\sube
\nsup
\supe
\setminus
\forall
\exist
\exists
\nexist
\nexists
\empty
\emptyset
\isin
\in
\notin
\ni
\nabla
\ang
\angle
\perp
\parallel
\sdot
\cdot
\lceil
\rceil
\lfloor
\rfloor
\lang
\rang
\langle
\rangle
\hbar
\mho
\larr
\leftarrow
\gets
\lArr
\Leftarrow
\uarr
\uparrow
\uArr
\Uparrow
\rarr
\to
\rightarrow
\rArr
\Rightarrow
\darr
\downarrow
\dArr
\Downarrow
\harr
\leftrightarrow
\hArr
\Leftrightarrow
\crarr
\hookleftarrow
\arccos
\arcsin
\arctan
\arg
\cos
\cosh
\cot
\coth
\csc
\deg
\det
\dim
\exp
\gcd
\hom
\inf
\ker
\lg
\lim
\liminf
\limsup
\ln
\log
\max
\min
\Pr
\sec
\sin
\sinh
\sup
\tan
\tanh
\bull
\bullet
\star
\lowast
\ast
\odot
\oplus
\otimes
\check
\checkmark
\ordf
\ordm
\cedil
\oline
\uml
\zwnj
\zwj
\lrm
\rlm
\smiley
\blacksmile
\sad
\frowny
\clubs
\clubsuit
\spades
\spadesuit
\hearts
\heartsuit
\diams
\diamondsuit
\diamond
\Diamond
\loz
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_
\_

View File

@ -159,3 +159,24 @@ pub(crate) fn compare_property_list_of_quoted_string<
}
Ok(None)
}
pub(crate) fn compare_property_boolean<'b, 's, 'x, R, RG: Fn(R) -> bool>(
emacs: &'b Token<'s>,
rust_node: R,
emacs_field: &'x str,
rust_value_getter: RG,
) -> Result<Option<(DiffStatus, Option<String>)>, Box<dyn std::error::Error>> {
// get_property already converts nil to None.
let value = get_property(emacs, emacs_field)?.is_some();
let rust_value = rust_value_getter(rust_node);
if rust_value != value {
let this_status = DiffStatus::Bad;
let message = Some(format!(
"{} mismatch (emacs != rust) {:?} != {:?}",
emacs_field, value, rust_value
));
Ok(Some((this_status, message)))
} else {
Ok(None)
}
}

View File

@ -5,7 +5,9 @@ use std::collections::BTreeSet;
use std::collections::HashSet;
use super::compare_field::compare_identity;
use super::compare_field::compare_noop;
use super::compare_field::compare_property_always_nil;
use super::compare_field::compare_property_boolean;
use super::compare_field::compare_property_list_of_quoted_string;
use super::compare_field::compare_property_quoted_string;
use super::compare_field::compare_property_unquoted_atom;
@ -3115,10 +3117,57 @@ fn compare_entity<'b, 's>(
emacs: &'b Token<'s>,
rust: &'b Entity<'s>,
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
let this_status = DiffStatus::Good;
let message = None;
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :name :latex :latex-math-p :html :ascii :latin1 :utf-8 :use-brackets-p
if let Some((new_status, new_message)) = compare_properties!(
emacs,
rust,
(
EmacsField::Required(":name"),
|r| Some(r.name),
compare_property_quoted_string
),
(
EmacsField::Required(":latex"),
|r| Some(r.latex),
compare_property_quoted_string
),
(
EmacsField::Required(":latex-math-p"),
|r| r.latex_math_mode,
compare_property_boolean
),
(
EmacsField::Required(":html"),
|r| Some(r.html),
compare_property_quoted_string
),
(
EmacsField::Required(":ascii"),
|r| Some(r.ascii),
compare_property_quoted_string
),
(
// latin1... like I give a shit.
EmacsField::Required(":latin1"),
compare_identity,
compare_noop
),
(
EmacsField::Required(":utf-8"),
|r| Some(r.utf8),
compare_property_quoted_string
),
(
EmacsField::Required(":use-brackets-p"),
|r| r.use_brackets,
compare_property_boolean
)
)? {
this_status = new_status;
message = new_message;
}
Ok(DiffResult {
status: this_status,

444
src/context/constants.rs Normal file
View File

@ -0,0 +1,444 @@
use super::global_settings::EntityDefinition;
pub(crate) const DEFAULT_ORG_LINK_PARAMETERS: [&'static str; 23] = [
"id",
"eww",
"rmail",
"mhe",
"irc",
"info",
"gnus",
"docview",
"bibtex",
"bbdb",
"w3m",
"doi",
"file+sys",
"file+emacs",
"shell",
"news",
"mailto",
"https",
"http",
"ftp",
"help",
"file",
"elisp",
];
pub(crate) const DEFAULT_ORG_ENTITIES: [EntityDefinition<'static>; 414] = [
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{10.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{9.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{9.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{8.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{8.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{7.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{7.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "leftrightarrow", latex_math_mode: true, latex: "\\leftrightarrow", html: "&harr;", ascii: "<->", utf8: ""},
EntityDefinition {name: "Leftrightarrow", latex_math_mode: true, latex: "\\Leftrightarrow", html: "&hArr;", ascii: "<=>", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{6.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "hookleftarrow", latex_math_mode: true, latex: "\\hookleftarrow", html: "&crarr;", ascii: "<-'", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{6.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{5.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "preccurlyeq", latex_math_mode: true, latex: "\\preccurlyeq", html: "&prcue;", ascii: "[precedes or equal]", utf8: ""},
EntityDefinition {name: "succcurlyeq", latex_math_mode: true, latex: "\\succcurlyeq", html: "&sccue;", ascii: "[succeeds or equal]", utf8: ""},
EntityDefinition {name: "diamondsuit", latex_math_mode: true, latex: "\\diamondsuit", html: "&diams;", ascii: "[diamonds]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{5.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "varepsilon", latex_math_mode: true, latex: "\\varepsilon", html: "&epsilon;", ascii: "varepsilon", utf8: "ε"},
EntityDefinition {name: "rightarrow", latex_math_mode: true, latex: "\\rightarrow", html: "&rarr;", ascii: "->", utf8: ""},
EntityDefinition {name: "Rightarrow", latex_math_mode: true, latex: "\\Rightarrow", html: "&rArr;", ascii: "=>", utf8: ""},
EntityDefinition {name: "blacksmile", latex_math_mode: true, latex: "\\ddot\\smile", html: "&#9787;", ascii: ":-)", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{4.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "asciicirc", latex_math_mode: false, latex: "\\textasciicircum{}", html: "^", ascii: "^", utf8: "^"},
EntityDefinition {name: "therefore", latex_math_mode: true, latex: "\\therefore", html: "&there4;", ascii: "[therefore]", utf8: ""},
EntityDefinition {name: "triangleq", latex_math_mode: true, latex: "\\triangleq", html: "&triangleq;", ascii: "[defined to]", utf8: ""},
EntityDefinition {name: "lesseqgtr", latex_math_mode: true, latex: "\\lesseqgtr", html: "&lesseqgtr;", ascii: "[less than or equal or greater than or equal]", utf8: ""},
EntityDefinition {name: "leftarrow", latex_math_mode: true, latex: "\\leftarrow", html: "&larr;", ascii: "<-", utf8: ""},
EntityDefinition {name: "Leftarrow", latex_math_mode: true, latex: "\\Leftarrow", html: "&lArr;", ascii: "<=", utf8: ""},
EntityDefinition {name: "downarrow", latex_math_mode: true, latex: "\\downarrow", html: "&darr;", ascii: "[downarrow]", utf8: ""},
EntityDefinition {name: "Downarrow", latex_math_mode: true, latex: "\\Downarrow", html: "&dArr;", ascii: "[dbldownarrow]", utf8: ""},
EntityDefinition {name: "checkmark", latex_math_mode: true, latex: "\\checkmark", html: "&check;", ascii: "[checkmark]", utf8: ""},
EntityDefinition {name: "spadesuit", latex_math_mode: true, latex: "\\spadesuit", html: "&spades;", ascii: "[spades]", utf8: ""},
EntityDefinition {name: "heartsuit", latex_math_mode: true, latex: "\\heartsuit", html: "&heartsuit;", ascii: "[hearts]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{4.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "thetasym", latex_math_mode: true, latex: "\\vartheta", html: "&thetasym;", ascii: "theta", utf8: "ϑ"},
EntityDefinition {name: "vartheta", latex_math_mode: true, latex: "\\vartheta", html: "&thetasym;", ascii: "theta", utf8: "ϑ"},
EntityDefinition {name: "varsigma", latex_math_mode: true, latex: "\\varsigma", html: "&sigmaf;", ascii: "varsigma", utf8: "ς"},
EntityDefinition {name: "setminus", latex_math_mode: true, latex: "\\setminus", html: "&setminus;", ascii: "\" ", utf8: ""},
EntityDefinition {name: "emptyset", latex_math_mode: true, latex: "\\emptyset", html: "&empty;", ascii: "[empty set]", utf8: ""},
EntityDefinition {name: "parallel", latex_math_mode: true, latex: "\\parallel", html: "&parallel;", ascii: "||", utf8: ""},
EntityDefinition {name: "clubsuit", latex_math_mode: true, latex: "\\clubsuit", html: "&clubs;", ascii: "[clubs]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{3.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "Epsilon", latex_math_mode: false, latex: "E", html: "&Epsilon;", ascii: "Epsilon", utf8: "Ε"},
EntityDefinition {name: "epsilon", latex_math_mode: true, latex: "\\epsilon", html: "&epsilon;", ascii: "epsilon", utf8: "ε"},
EntityDefinition {name: "Omicron", latex_math_mode: false, latex: "O", html: "&Omicron;", ascii: "Omicron", utf8: "Ο"},
EntityDefinition {name: "omicron", latex_math_mode: false, latex: "\\textit{o}", html: "&omicron;", ascii: "omicron", utf8: "ο"},
EntityDefinition {name: "Upsilon", latex_math_mode: true, latex: "\\Upsilon", html: "&Upsilon;", ascii: "Upsilon", utf8: "Υ"},
EntityDefinition {name: "upsilon", latex_math_mode: true, latex: "\\upsilon", html: "&upsilon;", ascii: "upsilon", utf8: "υ"},
EntityDefinition {name: "partial", latex_math_mode: true, latex: "\\partial", html: "&part;", ascii: "[partial differential]", utf8: ""},
EntityDefinition {name: "alefsym", latex_math_mode: true, latex: "\\aleph", html: "&alefsym;", ascii: "aleph", utf8: ""},
EntityDefinition {name: "because", latex_math_mode: true, latex: "\\because", html: "&because;", ascii: "[because]", utf8: ""},
EntityDefinition {name: "lessgtr", latex_math_mode: true, latex: "\\lessgtr", html: "&lessgtr;", ascii: "[less than or greater than]", utf8: ""},
EntityDefinition {name: "nexists", latex_math_mode: true, latex: "\\nexists", html: "&exist;", ascii: "[there does not exists]", utf8: ""},
EntityDefinition {name: "uparrow", latex_math_mode: true, latex: "\\uparrow", html: "&uarr;", ascii: "[uparrow]", utf8: ""},
EntityDefinition {name: "Uparrow", latex_math_mode: true, latex: "\\Uparrow", html: "&uArr;", ascii: "[dbluparrow]", utf8: ""},
EntityDefinition {name: "diamond", latex_math_mode: true, latex: "\\diamondsuit", html: "&diamond;", ascii: "[diamond]", utf8: ""},
EntityDefinition {name: "Diamond", latex_math_mode: true, latex: "\\diamondsuit", html: "&diamond;", ascii: "[diamond]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{3.0em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "Agrave", latex_math_mode: false, latex: "\\`{A}", html: "&Agrave;", ascii: "A", utf8: "À"},
EntityDefinition {name: "agrave", latex_math_mode: false, latex: "\\`{a}", html: "&agrave;", ascii: "a", utf8: "à"},
EntityDefinition {name: "Aacute", latex_math_mode: false, latex: "\\'{A}", html: "&Aacute;", ascii: "A", utf8: "Á"},
EntityDefinition {name: "aacute", latex_math_mode: false, latex: "\\'{a}", html: "&aacute;", ascii: "a", utf8: "á"},
EntityDefinition {name: "Atilde", latex_math_mode: false, latex: "\\~{A}", html: "&Atilde;", ascii: "A", utf8: "Ã"},
EntityDefinition {name: "atilde", latex_math_mode: false, latex: "\\~{a}", html: "&atilde;", ascii: "a", utf8: "ã"},
EntityDefinition {name: "Ccedil", latex_math_mode: false, latex: "\\c{C}", html: "&Ccedil;", ascii: "C", utf8: "Ç"},
EntityDefinition {name: "ccedil", latex_math_mode: false, latex: "\\c{c}", html: "&ccedil;", ascii: "c", utf8: "ç"},
EntityDefinition {name: "Egrave", latex_math_mode: false, latex: "\\`{E}", html: "&Egrave;", ascii: "E", utf8: "È"},
EntityDefinition {name: "egrave", latex_math_mode: false, latex: "\\`{e}", html: "&egrave;", ascii: "e", utf8: "è"},
EntityDefinition {name: "Eacute", latex_math_mode: false, latex: "\\'{E}", html: "&Eacute;", ascii: "E", utf8: "É"},
EntityDefinition {name: "eacute", latex_math_mode: false, latex: "\\'{e}", html: "&eacute;", ascii: "e", utf8: "é"},
EntityDefinition {name: "Igrave", latex_math_mode: false, latex: "\\`{I}", html: "&Igrave;", ascii: "I", utf8: "Ì"},
EntityDefinition {name: "igrave", latex_math_mode: false, latex: "\\`{i}", html: "&igrave;", ascii: "i", utf8: "ì"},
EntityDefinition {name: "Iacute", latex_math_mode: false, latex: "\\'{I}", html: "&Iacute;", ascii: "I", utf8: "Í"},
EntityDefinition {name: "iacute", latex_math_mode: false, latex: "\\'{i}", html: "&iacute;", ascii: "i", utf8: "í"},
EntityDefinition {name: "inodot", latex_math_mode: false, latex: "\\i", html: "&inodot;", ascii: "i", utf8: "ı"},
EntityDefinition {name: "Ntilde", latex_math_mode: false, latex: "\\~{N}", html: "&Ntilde;", ascii: "N", utf8: "Ñ"},
EntityDefinition {name: "ntilde", latex_math_mode: false, latex: "\\~{n}", html: "&ntilde;", ascii: "n", utf8: "ñ"},
EntityDefinition {name: "Ograve", latex_math_mode: false, latex: "\\`{O}", html: "&Ograve;", ascii: "O", utf8: "Ò"},
EntityDefinition {name: "ograve", latex_math_mode: false, latex: "\\`{o}", html: "&ograve;", ascii: "o", utf8: "ò"},
EntityDefinition {name: "Oacute", latex_math_mode: false, latex: "\\'{O}", html: "&Oacute;", ascii: "O", utf8: "Ó"},
EntityDefinition {name: "oacute", latex_math_mode: false, latex: "\\'{o}", html: "&oacute;", ascii: "o", utf8: "ó"},
EntityDefinition {name: "Otilde", latex_math_mode: false, latex: "\\~{O}", html: "&Otilde;", ascii: "O", utf8: "Õ"},
EntityDefinition {name: "otilde", latex_math_mode: false, latex: "\\~{o}", html: "&otilde;", ascii: "o", utf8: "õ"},
EntityDefinition {name: "Oslash", latex_math_mode: false, latex: "\\O", html: "&Oslash;", ascii: "O", utf8: "Ø"},
EntityDefinition {name: "oslash", latex_math_mode: false, latex: "\\o{}", html: "&oslash;", ascii: "o", utf8: "ø"},
EntityDefinition {name: "Scaron", latex_math_mode: false, latex: "\\v{S}", html: "&Scaron;", ascii: "S", utf8: "Š"},
EntityDefinition {name: "scaron", latex_math_mode: false, latex: "\\v{s}", html: "&scaron;", ascii: "s", utf8: "š"},
EntityDefinition {name: "Ugrave", latex_math_mode: false, latex: "\\`{U}", html: "&Ugrave;", ascii: "U", utf8: "Ù"},
EntityDefinition {name: "ugrave", latex_math_mode: false, latex: "\\`{u}", html: "&ugrave;", ascii: "u", utf8: "ù"},
EntityDefinition {name: "Uacute", latex_math_mode: false, latex: "\\'{U}", html: "&Uacute;", ascii: "U", utf8: "Ú"},
EntityDefinition {name: "uacute", latex_math_mode: false, latex: "\\'{u}", html: "&uacute;", ascii: "u", utf8: "ú"},
EntityDefinition {name: "Yacute", latex_math_mode: false, latex: "\\'{Y}", html: "&Yacute;", ascii: "Y", utf8: "Ý"},
EntityDefinition {name: "yacute", latex_math_mode: false, latex: "\\'{y}", html: "&yacute;", ascii: "y", utf8: "ý"},
EntityDefinition {name: "weierp", latex_math_mode: true, latex: "\\wp", html: "&weierp;", ascii: "P", utf8: ""},
EntityDefinition {name: "Lambda", latex_math_mode: true, latex: "\\Lambda", html: "&Lambda;", ascii: "Lambda", utf8: "Λ"},
EntityDefinition {name: "lambda", latex_math_mode: true, latex: "\\lambda", html: "&lambda;", ascii: "lambda", utf8: "λ"},
EntityDefinition {name: "sigmaf", latex_math_mode: true, latex: "\\varsigma", html: "&sigmaf;", ascii: "sigmaf", utf8: "ς"},
EntityDefinition {name: "varphi", latex_math_mode: true, latex: "\\varphi", html: "&varphi;", ascii: "varphi", utf8: "φ"},
EntityDefinition {name: "acutex", latex_math_mode: true, latex: "\\acute x", html: "&acute;x", ascii: "'x", utf8: "𝑥́"},
EntityDefinition {name: "hellip", latex_math_mode: false, latex: "\\dots{}", html: "&hellip;", ascii: "...", utf8: ""},
EntityDefinition {name: "middot", latex_math_mode: false, latex: "\\textperiodcentered{}", html: "&middot;", ascii: ".", utf8: "·"},
EntityDefinition {name: "iquest", latex_math_mode: false, latex: "?`", html: "&iquest;", ascii: "?", utf8: "¿"},
EntityDefinition {name: "lsaquo", latex_math_mode: false, latex: "\\guilsinglleft{}", html: "&lsaquo;", ascii: "<", utf8: ""},
EntityDefinition {name: "rsaquo", latex_math_mode: false, latex: "\\guilsinglright{}", html: "&rsaquo;", ascii: ">", utf8: ""},
EntityDefinition {name: "brvbar", latex_math_mode: false, latex: "\\textbrokenbar{}", html: "&brvbar;", ascii: "|", utf8: "¦"},
EntityDefinition {name: "dagger", latex_math_mode: false, latex: "\\textdagger{}", html: "&dagger;", ascii: "[dagger]", utf8: ""},
EntityDefinition {name: "Dagger", latex_math_mode: false, latex: "\\textdaggerdbl{}", html: "&Dagger;", ascii: "[doubledagger]", utf8: ""},
EntityDefinition {name: "thinsp", latex_math_mode: false, latex: "\\hspace*{.2em}", html: "&thinsp;", ascii: " ", utf8: ""},
EntityDefinition {name: "curren", latex_math_mode: false, latex: "\\textcurrency{}", html: "&curren;", ascii: "curr.", utf8: "¤"},
EntityDefinition {name: "dollar", latex_math_mode: false, latex: "\\$", html: "$", ascii: "$", utf8: "$"},
EntityDefinition {name: "plusmn", latex_math_mode: false, latex: "\\textpm{}", html: "&plusmn;", ascii: "+-", utf8: "±"},
EntityDefinition {name: "frac12", latex_math_mode: false, latex: "\\textonehalf{}", html: "&frac12;", ascii: "1/2", utf8: "½"},
EntityDefinition {name: "frac14", latex_math_mode: false, latex: "\\textonequarter{}", html: "&frac14;", ascii: "1/4", utf8: "¼"},
EntityDefinition {name: "frac34", latex_math_mode: false, latex: "\\textthreequarters{}", html: "&frac34;", ascii: "3/4", utf8: "¾"},
EntityDefinition {name: "permil", latex_math_mode: false, latex: "\\textperthousand{}", html: "&permil;", ascii: "per thousand", utf8: ""},
EntityDefinition {name: "propto", latex_math_mode: true, latex: "\\propto", html: "&prop;", ascii: "[proportional to]", utf8: ""},
EntityDefinition {name: "there4", latex_math_mode: true, latex: "\\therefore", html: "&there4;", ascii: "[therefore]", utf8: ""},
EntityDefinition {name: "approx", latex_math_mode: true, latex: "\\approx", html: "&asymp;", ascii: "[almost equal to]", utf8: ""},
EntityDefinition {name: "preceq", latex_math_mode: true, latex: "\\preceq", html: "&prcue;", ascii: "[precedes or equal]", utf8: ""},
EntityDefinition {name: "succeq", latex_math_mode: true, latex: "\\succeq", html: "&sccue;", ascii: "[succeeds or equal]", utf8: ""},
EntityDefinition {name: "subset", latex_math_mode: true, latex: "\\subset", html: "&sub;", ascii: "[subset of]", utf8: ""},
EntityDefinition {name: "supset", latex_math_mode: true, latex: "\\supset", html: "&sup;", ascii: "[superset of]", utf8: ""},
EntityDefinition {name: "forall", latex_math_mode: true, latex: "\\forall", html: "&forall;", ascii: "[for all]", utf8: ""},
EntityDefinition {name: "exists", latex_math_mode: true, latex: "\\exists", html: "&exist;", ascii: "[there exists]", utf8: ""},
EntityDefinition {name: "nexist", latex_math_mode: true, latex: "\\nexists", html: "&exist;", ascii: "[there does not exists]", utf8: ""},
EntityDefinition {name: "lfloor", latex_math_mode: true, latex: "\\lfloor", html: "&lfloor;", ascii: "[left floor]", utf8: ""},
EntityDefinition {name: "rfloor", latex_math_mode: true, latex: "\\rfloor", html: "&rfloor;", ascii: "[right floor]", utf8: ""},
EntityDefinition {name: "langle", latex_math_mode: true, latex: "\\langle", html: "&lang;", ascii: "<", utf8: ""},
EntityDefinition {name: "rangle", latex_math_mode: true, latex: "\\rangle", html: "&rang;", ascii: ">", utf8: ""},
EntityDefinition {name: "arccos", latex_math_mode: true, latex: "\\arccos", html: "arccos", ascii: "arccos", utf8: "arccos"},
EntityDefinition {name: "arcsin", latex_math_mode: true, latex: "\\arcsin", html: "arcsin", ascii: "arcsin", utf8: "arcsin"},
EntityDefinition {name: "arctan", latex_math_mode: true, latex: "\\arctan", html: "arctan", ascii: "arctan", utf8: "arctan"},
EntityDefinition {name: "liminf", latex_math_mode: true, latex: "\\liminf", html: "liminf", ascii: "liminf", utf8: "liminf"},
EntityDefinition {name: "limsup", latex_math_mode: true, latex: "\\limsup", html: "limsup", ascii: "limsup", utf8: "limsup"},
EntityDefinition {name: "bullet", latex_math_mode: false, latex: "\\textbullet{}", html: "&bull;", ascii: "*", utf8: ""},
EntityDefinition {name: "lowast", latex_math_mode: true, latex: "\\ast", html: "&lowast;", ascii: "*", utf8: ""},
EntityDefinition {name: "otimes", latex_math_mode: true, latex: "\\otimes", html: "&otimes;", ascii: "[circled times]", utf8: ""},
EntityDefinition {name: "smiley", latex_math_mode: true, latex: "\\ddot\\smile", html: "&#9786;", ascii: ":-)", utf8: ""},
EntityDefinition {name: "frowny", latex_math_mode: true, latex: "\\ddot\\frown", html: "&#9785;", ascii: ":-(", utf8: ""},
EntityDefinition {name: "spades", latex_math_mode: true, latex: "\\spadesuit", html: "&spades;", ascii: "[spades]", utf8: ""},
EntityDefinition {name: "hearts", latex_math_mode: true, latex: "\\heartsuit", html: "&hearts;", ascii: "[hearts]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{2.5em}", html: "&ensp;&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "Acirc", latex_math_mode: false, latex: "\\^{A}", html: "&Acirc;", ascii: "A", utf8: "Â"},
EntityDefinition {name: "acirc", latex_math_mode: false, latex: "\\^{a}", html: "&acirc;", ascii: "a", utf8: "â"},
EntityDefinition {name: "Amacr", latex_math_mode: false, latex: "\\={A}", html: "&Amacr;", ascii: "A", utf8: "Ã"},
EntityDefinition {name: "amacr", latex_math_mode: false, latex: "\\={a}", html: "&amacr;", ascii: "a", utf8: "ã"},
EntityDefinition {name: "Aring", latex_math_mode: false, latex: "\\AA{}", html: "&Aring;", ascii: "A", utf8: "Å"},
EntityDefinition {name: "aring", latex_math_mode: false, latex: "\\aa{}", html: "&aring;", ascii: "a", utf8: "å"},
EntityDefinition {name: "AElig", latex_math_mode: false, latex: "\\AE{}", html: "&AElig;", ascii: "AE", utf8: "Æ"},
EntityDefinition {name: "aelig", latex_math_mode: false, latex: "\\ae{}", html: "&aelig;", ascii: "ae", utf8: "æ"},
EntityDefinition {name: "Ecirc", latex_math_mode: false, latex: "\\^{E}", html: "&Ecirc;", ascii: "E", utf8: "Ê"},
EntityDefinition {name: "ecirc", latex_math_mode: false, latex: "\\^{e}", html: "&ecirc;", ascii: "e", utf8: "ê"},
EntityDefinition {name: "Icirc", latex_math_mode: false, latex: "\\^{I}", html: "&Icirc;", ascii: "I", utf8: "Î"},
EntityDefinition {name: "icirc", latex_math_mode: false, latex: "\\^{i}", html: "&icirc;", ascii: "i", utf8: "î"},
EntityDefinition {name: "Ocirc", latex_math_mode: false, latex: "\\^{O}", html: "&Ocirc;", ascii: "O", utf8: "Ô"},
EntityDefinition {name: "ocirc", latex_math_mode: false, latex: "\\^{o}", html: "&ocirc;", ascii: "o", utf8: "ô"},
EntityDefinition {name: "OElig", latex_math_mode: false, latex: "\\OE{}", html: "&OElig;", ascii: "OE", utf8: "Œ"},
EntityDefinition {name: "oelig", latex_math_mode: false, latex: "\\oe{}", html: "&oelig;", ascii: "oe", utf8: "œ"},
EntityDefinition {name: "szlig", latex_math_mode: false, latex: "\\ss{}", html: "&szlig;", ascii: "ss", utf8: "ß"},
EntityDefinition {name: "Ucirc", latex_math_mode: false, latex: "\\^{U}", html: "&Ucirc;", ascii: "U", utf8: "Û"},
EntityDefinition {name: "ucirc", latex_math_mode: false, latex: "\\^{u}", html: "&ucirc;", ascii: "u", utf8: "û"},
EntityDefinition {name: "image", latex_math_mode: true, latex: "\\Im", html: "&image;", ascii: "I", utf8: ""},
EntityDefinition {name: "imath", latex_math_mode: true, latex: "\\imath", html: "&imath;", ascii: "[dotless i]", utf8: "ı"},
EntityDefinition {name: "jmath", latex_math_mode: true, latex: "\\jmath", html: "&jmath;", ascii: "[dotless j]", utf8: "ȷ"},
EntityDefinition {name: "Alpha", latex_math_mode: false, latex: "A", html: "&Alpha;", ascii: "Alpha", utf8: "Α"},
EntityDefinition {name: "alpha", latex_math_mode: true, latex: "\\alpha", html: "&alpha;", ascii: "alpha", utf8: "α"},
EntityDefinition {name: "Gamma", latex_math_mode: true, latex: "\\Gamma", html: "&Gamma;", ascii: "Gamma", utf8: "Γ"},
EntityDefinition {name: "gamma", latex_math_mode: true, latex: "\\gamma", html: "&gamma;", ascii: "gamma", utf8: "γ"},
EntityDefinition {name: "Delta", latex_math_mode: true, latex: "\\Delta", html: "&Delta;", ascii: "Delta", utf8: "Δ"},
EntityDefinition {name: "delta", latex_math_mode: true, latex: "\\delta", html: "&delta;", ascii: "delta", utf8: "δ"},
EntityDefinition {name: "Theta", latex_math_mode: true, latex: "\\Theta", html: "&Theta;", ascii: "Theta", utf8: "Θ"},
EntityDefinition {name: "theta", latex_math_mode: true, latex: "\\theta", html: "&theta;", ascii: "theta", utf8: "θ"},
EntityDefinition {name: "Kappa", latex_math_mode: false, latex: "K", html: "&Kappa;", ascii: "Kappa", utf8: "Κ"},
EntityDefinition {name: "kappa", latex_math_mode: true, latex: "\\kappa", html: "&kappa;", ascii: "kappa", utf8: "κ"},
EntityDefinition {name: "Sigma", latex_math_mode: true, latex: "\\Sigma", html: "&Sigma;", ascii: "Sigma", utf8: "Σ"},
EntityDefinition {name: "sigma", latex_math_mode: true, latex: "\\sigma", html: "&sigma;", ascii: "sigma", utf8: "σ"},
EntityDefinition {name: "upsih", latex_math_mode: true, latex: "\\Upsilon", html: "&upsih;", ascii: "upsilon", utf8: "ϒ"},
EntityDefinition {name: "Omega", latex_math_mode: true, latex: "\\Omega", html: "&Omega;", ascii: "Omega", utf8: "Ω"},
EntityDefinition {name: "omega", latex_math_mode: true, latex: "\\omega", html: "&omega;", ascii: "omega", utf8: "ω"},
EntityDefinition {name: "varpi", latex_math_mode: true, latex: "\\varpi", html: "&piv;", ascii: "omega-pi", utf8: "ϖ"},
EntityDefinition {name: "aleph", latex_math_mode: true, latex: "\\aleph", html: "&aleph;", ascii: "aleph", utf8: ""},
EntityDefinition {name: "gimel", latex_math_mode: true, latex: "\\gimel", html: "&gimel;", ascii: "gimel", utf8: ""},
EntityDefinition {name: "dalet", latex_math_mode: true, latex: "\\daleth", html: "&daleth;", ascii: "dalet", utf8: "ד"},
EntityDefinition {name: "THORN", latex_math_mode: false, latex: "\\TH{}", html: "&THORN;", ascii: "TH", utf8: "Þ"},
EntityDefinition {name: "thorn", latex_math_mode: false, latex: "\\th{}", html: "&thorn;", ascii: "th", utf8: "þ"},
EntityDefinition {name: "cdots", latex_math_mode: true, latex: "\\cdots{}", html: "&ctdot;", ascii: "...", utf8: ""},
EntityDefinition {name: "iexcl", latex_math_mode: false, latex: "!`", html: "&iexcl;", ascii: "!", utf8: "¡"},
EntityDefinition {name: "ndash", latex_math_mode: false, latex: "--", html: "&ndash;", ascii: "-", utf8: ""},
EntityDefinition {name: "mdash", latex_math_mode: false, latex: "---", html: "&mdash;", ascii: "--", utf8: ""},
EntityDefinition {name: "acute", latex_math_mode: false, latex: "\\textasciiacute{}", html: "&acute;", ascii: "'", utf8: "´"},
EntityDefinition {name: "ldquo", latex_math_mode: false, latex: "\\textquotedblleft{}", html: "&ldquo;", ascii: "\"", utf8: ""},
EntityDefinition {name: "rdquo", latex_math_mode: false, latex: "\\textquotedblright{}", html: "&rdquo;", ascii: "\"", utf8: ""},
EntityDefinition {name: "bdquo", latex_math_mode: false, latex: "\\quotedblbase{}", html: "&bdquo;", ascii: "\"", utf8: ""},
EntityDefinition {name: "lsquo", latex_math_mode: false, latex: "\\textquoteleft{}", html: "&lsquo;", ascii: "`", utf8: ""},
EntityDefinition {name: "rsquo", latex_math_mode: false, latex: "\\textquoteright{}", html: "&rsquo;", ascii: "'", utf8: ""},
EntityDefinition {name: "sbquo", latex_math_mode: false, latex: "\\quotesinglbase{}", html: "&sbquo;", ascii: ",", utf8: ""},
EntityDefinition {name: "laquo", latex_math_mode: false, latex: "\\guillemotleft{}", html: "&laquo;", ascii: "<<", utf8: "«"},
EntityDefinition {name: "raquo", latex_math_mode: false, latex: "\\guillemotright{}", html: "&raquo;", ascii: ">>", utf8: "»"},
EntityDefinition {name: "tilde", latex_math_mode: false, latex: "\\textasciitilde{}", html: "~", ascii: "~", utf8: "~"},
EntityDefinition {name: "slash", latex_math_mode: false, latex: "/", html: "/", ascii: "/", utf8: "/"},
EntityDefinition {name: "under", latex_math_mode: false, latex: "\\_", html: "_", ascii: "_", utf8: "_"},
EntityDefinition {name: "equal", latex_math_mode: false, latex: "=", html: "=", ascii: "=", utf8: "="},
EntityDefinition {name: "pound", latex_math_mode: false, latex: "\\pounds{}", html: "&pound;", ascii: "pound", utf8: "£"},
EntityDefinition {name: "trade", latex_math_mode: false, latex: "\\texttrademark{}", html: "&trade;", ascii: "TM", utf8: ""},
EntityDefinition {name: "minus", latex_math_mode: true, latex: "-", html: "&minus;", ascii: "-", utf8: ""},
EntityDefinition {name: "times", latex_math_mode: false, latex: "\\texttimes{}", html: "&times;", ascii: "*", utf8: "×"},
EntityDefinition {name: "frasl", latex_math_mode: false, latex: "/", html: "&frasl;", ascii: "/", utf8: ""},
EntityDefinition {name: "colon", latex_math_mode: true, latex: "\\colon", html: ":", ascii: ":", utf8: ":"},
EntityDefinition {name: "radic", latex_math_mode: true, latex: "\\sqrt{\\,}", html: "&radic;", ascii: "[square root]", utf8: ""},
EntityDefinition {name: "micro", latex_math_mode: false, latex: "\\textmu{}", html: "&micro;", ascii: "micro", utf8: "µ"},
EntityDefinition {name: "prime", latex_math_mode: true, latex: "\\prime", html: "&prime;", ascii: "'", utf8: ""},
EntityDefinition {name: "Prime", latex_math_mode: true, latex: "\\prime{}\\prime", html: "&Prime;", ascii: "''", utf8: ""},
EntityDefinition {name: "infin", latex_math_mode: true, latex: "\\infty", html: "&infin;", ascii: "[infinity]", utf8: ""},
EntityDefinition {name: "infty", latex_math_mode: true, latex: "\\infty", html: "&infin;", ascii: "[infinity]", utf8: ""},
EntityDefinition {name: "wedge", latex_math_mode: true, latex: "\\wedge", html: "&and;", ascii: "[logical and]", utf8: ""},
EntityDefinition {name: "smile", latex_math_mode: true, latex: "\\smile", html: "&smile;", ascii: "[cup product]", utf8: ""},
EntityDefinition {name: "frown", latex_math_mode: true, latex: "\\frown", html: "&frown;", ascii: "[Cap product]", utf8: ""},
EntityDefinition {name: "simeq", latex_math_mode: true, latex: "\\simeq", html: "&cong;", ascii: "[approx. equal to]", utf8: ""},
EntityDefinition {name: "asymp", latex_math_mode: true, latex: "\\asymp", html: "&asymp;", ascii: "[almost equal to]", utf8: ""},
EntityDefinition {name: "equiv", latex_math_mode: true, latex: "\\equiv", html: "&equiv;", ascii: "[identical to]", utf8: ""},
EntityDefinition {name: "exist", latex_math_mode: true, latex: "\\exists", html: "&exist;", ascii: "[there exists]", utf8: ""},
EntityDefinition {name: "empty", latex_math_mode: true, latex: "\\emptyset", html: "&empty;", ascii: "[empty set]", utf8: ""},
EntityDefinition {name: "notin", latex_math_mode: true, latex: "\\notin", html: "&notin;", ascii: "[not an element of]", utf8: ""},
EntityDefinition {name: "nabla", latex_math_mode: true, latex: "\\nabla", html: "&nabla;", ascii: "[nabla]", utf8: ""},
EntityDefinition {name: "angle", latex_math_mode: true, latex: "\\angle", html: "&ang;", ascii: "[angle]", utf8: ""},
EntityDefinition {name: "lceil", latex_math_mode: true, latex: "\\lceil", html: "&lceil;", ascii: "[left ceiling]", utf8: ""},
EntityDefinition {name: "rceil", latex_math_mode: true, latex: "\\rceil", html: "&rceil;", ascii: "[right ceiling]", utf8: ""},
EntityDefinition {name: "crarr", latex_math_mode: true, latex: "\\hookleftarrow", html: "&crarr;", ascii: "<-'", utf8: ""},
EntityDefinition {name: "oplus", latex_math_mode: true, latex: "\\oplus", html: "&oplus;", ascii: "[circled plus]", utf8: ""},
EntityDefinition {name: "check", latex_math_mode: true, latex: "\\checkmark", html: "&checkmark;", ascii: "[checkmark]", utf8: ""},
EntityDefinition {name: "cedil", latex_math_mode: false, latex: "\\c{}", html: "&cedil;", ascii: "[cedilla]", utf8: "¸"},
EntityDefinition {name: "oline", latex_math_mode: true, latex: "\\overline{~}", html: "&oline;", ascii: "[overline]", utf8: ""},
EntityDefinition {name: "clubs", latex_math_mode: true, latex: "\\clubsuit", html: "&clubs;", ascii: "[clubs]", utf8: ""},
EntityDefinition {name: "diams", latex_math_mode: true, latex: "\\diamondsuit", html: "&diams;", ascii: "[diamonds]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{2.0em}", html: "&ensp;&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "Auml", latex_math_mode: false, latex: "\\\"{A}", html: "&Auml;", ascii: "Ae", utf8: "Ä"},
EntityDefinition {name: "auml", latex_math_mode: false, latex: "\\\"{a}", html: "&auml;", ascii: "ae", utf8: "ä"},
EntityDefinition {name: "Euml", latex_math_mode: false, latex: "\\\"{E}", html: "&Euml;", ascii: "E", utf8: "Ë"},
EntityDefinition {name: "euml", latex_math_mode: false, latex: "\\\"{e}", html: "&euml;", ascii: "e", utf8: "ë"},
EntityDefinition {name: "Idot", latex_math_mode: false, latex: "\\.{I}", html: "&idot;", ascii: "I", utf8: "İ"},
EntityDefinition {name: "Iuml", latex_math_mode: false, latex: "\\\"{I}", html: "&Iuml;", ascii: "I", utf8: "Ï"},
EntityDefinition {name: "iuml", latex_math_mode: false, latex: "\\\"{i}", html: "&iuml;", ascii: "i", utf8: "ï"},
EntityDefinition {name: "Ouml", latex_math_mode: false, latex: "\\\"{O}", html: "&Ouml;", ascii: "Oe", utf8: "Ö"},
EntityDefinition {name: "ouml", latex_math_mode: false, latex: "\\\"{o}", html: "&ouml;", ascii: "oe", utf8: "ö"},
EntityDefinition {name: "Uuml", latex_math_mode: false, latex: "\\\"{U}", html: "&Uuml;", ascii: "Ue", utf8: "Ü"},
EntityDefinition {name: "uuml", latex_math_mode: false, latex: "\\\"{u}", html: "&uuml;", ascii: "ue", utf8: "ü"},
EntityDefinition {name: "Yuml", latex_math_mode: false, latex: "\\\"{Y}", html: "&Yuml;", ascii: "Y", utf8: "Ÿ"},
EntityDefinition {name: "yuml", latex_math_mode: false, latex: "\\\"{y}", html: "&yuml;", ascii: "y", utf8: "ÿ"},
EntityDefinition {name: "fnof", latex_math_mode: false, latex: "\\textit{f}", html: "&fnof;", ascii: "f", utf8: "ƒ"},
EntityDefinition {name: "real", latex_math_mode: true, latex: "\\Re", html: "&real;", ascii: "R", utf8: ""},
EntityDefinition {name: "Beta", latex_math_mode: false, latex: "B", html: "&Beta;", ascii: "Beta", utf8: "Β"},
EntityDefinition {name: "beta", latex_math_mode: true, latex: "\\beta", html: "&beta;", ascii: "beta", utf8: "β"},
EntityDefinition {name: "Zeta", latex_math_mode: false, latex: "Z", html: "&Zeta;", ascii: "Zeta", utf8: "Ζ"},
EntityDefinition {name: "zeta", latex_math_mode: true, latex: "\\zeta", html: "&zeta;", ascii: "zeta", utf8: "ζ"},
EntityDefinition {name: "Iota", latex_math_mode: false, latex: "I", html: "&Iota;", ascii: "Iota", utf8: "Ι"},
EntityDefinition {name: "iota", latex_math_mode: true, latex: "\\iota", html: "&iota;", ascii: "iota", utf8: "ι"},
EntityDefinition {name: "beth", latex_math_mode: true, latex: "\\beth", html: "&beth;", ascii: "beth", utf8: "ב"},
EntityDefinition {name: "dots", latex_math_mode: false, latex: "\\dots{}", html: "&hellip;", ascii: "...", utf8: ""},
EntityDefinition {name: "quot", latex_math_mode: false, latex: "\\textquotedbl{}", html: "&quot;", ascii: "\"", utf8: "\""},
EntityDefinition {name: "circ", latex_math_mode: false, latex: "\\^{}", html: "&circ;", ascii: "^", utf8: ""},
EntityDefinition {name: "vert", latex_math_mode: true, latex: "\\vert{}", html: "&vert;", ascii: "|", utf8: "|"},
EntityDefinition {name: "vbar", latex_math_mode: false, latex: "|", html: "|", ascii: "|", utf8: "|"},
EntityDefinition {name: "sect", latex_math_mode: false, latex: "\\S", html: "&sect;", ascii: "section", utf8: "§"},
EntityDefinition {name: "para", latex_math_mode: false, latex: "\\P{}", html: "&para;", ascii: "paragraph", utf8: ""},
EntityDefinition {name: "plus", latex_math_mode: false, latex: "+", html: "+", ascii: "+", utf8: "+"},
EntityDefinition {name: "ddag", latex_math_mode: false, latex: "\\ddag{}", html: "&Dagger;", ascii: "[doubledagger]", utf8: ""},
EntityDefinition {name: "nbsp", latex_math_mode: false, latex: "~", html: "&nbsp;", ascii: " ", utf8: " "},
EntityDefinition {name: "ensp", latex_math_mode: false, latex: "\\hspace*{.5em}", html: "&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "emsp", latex_math_mode: false, latex: "\\hspace*{1em}", html: "&emsp;", ascii: " ", utf8: ""},
EntityDefinition {name: "cent", latex_math_mode: false, latex: "\\textcent{}", html: "&cent;", ascii: "cent", utf8: "¢"},
EntityDefinition {name: "euro", latex_math_mode: false, latex: "\\texteuro{}", html: "&euro;", ascii: "EUR", utf8: ""},
EntityDefinition {name: "copy", latex_math_mode: false, latex: "\\textcopyright{}", html: "&copy;", ascii: "(c)", utf8: "©"},
EntityDefinition {name: "sup1", latex_math_mode: false, latex: "\\textonesuperior{}", html: "&sup1;", ascii: "^1", utf8: "¹"},
EntityDefinition {name: "sup2", latex_math_mode: false, latex: "\\texttwosuperior{}", html: "&sup2;", ascii: "^2", utf8: "²"},
EntityDefinition {name: "sup3", latex_math_mode: false, latex: "\\textthreesuperior{}", html: "&sup3;", ascii: "^3", utf8: "³"},
EntityDefinition {name: "prod", latex_math_mode: true, latex: "\\prod", html: "&prod;", ascii: "[product]", utf8: ""},
EntityDefinition {name: "macr", latex_math_mode: false, latex: "\\textasciimacron{}", html: "&macr;", ascii: "[macron]", utf8: "¯"},
EntityDefinition {name: "prop", latex_math_mode: true, latex: "\\propto", html: "&prop;", ascii: "[proportional to]", utf8: ""},
EntityDefinition {name: "land", latex_math_mode: true, latex: "\\land", html: "&and;", ascii: "[logical and]", utf8: ""},
EntityDefinition {name: "cong", latex_math_mode: true, latex: "\\cong", html: "&cong;", ascii: "[approx. equal to]", utf8: ""},
EntityDefinition {name: "prec", latex_math_mode: true, latex: "\\prec", html: "&pr;", ascii: "[precedes]", utf8: ""},
EntityDefinition {name: "succ", latex_math_mode: true, latex: "\\succ", html: "&sc;", ascii: "[succeeds]", utf8: ""},
EntityDefinition {name: "nsub", latex_math_mode: true, latex: "\\not\\subset", html: "&nsub;", ascii: "[not a subset of]", utf8: ""},
EntityDefinition {name: "sube", latex_math_mode: true, latex: "\\subseteq", html: "&sube;", ascii: "[subset of or equal to]", utf8: ""},
EntityDefinition {name: "nsup", latex_math_mode: true, latex: "\\not\\supset", html: "&nsup;", ascii: "[not a superset of]", utf8: ""},
EntityDefinition {name: "supe", latex_math_mode: true, latex: "\\supseteq", html: "&supe;", ascii: "[superset of or equal to]", utf8: ""},
EntityDefinition {name: "isin", latex_math_mode: true, latex: "\\in", html: "&isin;", ascii: "[element of]", utf8: ""},
EntityDefinition {name: "perp", latex_math_mode: true, latex: "\\perp", html: "&perp;", ascii: "[up tack]", utf8: ""},
EntityDefinition {name: "sdot", latex_math_mode: true, latex: "\\cdot", html: "&sdot;", ascii: "[dot]", utf8: ""},
EntityDefinition {name: "cdot", latex_math_mode: true, latex: "\\cdot", html: "&sdot;", ascii: "[dot]", utf8: ""},
EntityDefinition {name: "lang", latex_math_mode: true, latex: "\\langle", html: "&lang;", ascii: "<", utf8: ""},
EntityDefinition {name: "rang", latex_math_mode: true, latex: "\\rangle", html: "&rang;", ascii: ">", utf8: ""},
EntityDefinition {name: "hbar", latex_math_mode: true, latex: "\\hbar", html: "&hbar;", ascii: "hbar", utf8: ""},
EntityDefinition {name: "larr", latex_math_mode: true, latex: "\\leftarrow", html: "&larr;", ascii: "<-", utf8: ""},
EntityDefinition {name: "gets", latex_math_mode: true, latex: "\\gets", html: "&larr;", ascii: "<-", utf8: ""},
EntityDefinition {name: "lArr", latex_math_mode: true, latex: "\\Leftarrow", html: "&lArr;", ascii: "<=", utf8: ""},
EntityDefinition {name: "uarr", latex_math_mode: true, latex: "\\uparrow", html: "&uarr;", ascii: "[uparrow]", utf8: ""},
EntityDefinition {name: "uArr", latex_math_mode: true, latex: "\\Uparrow", html: "&uArr;", ascii: "[dbluparrow]", utf8: ""},
EntityDefinition {name: "rarr", latex_math_mode: true, latex: "\\rightarrow", html: "&rarr;", ascii: "->", utf8: ""},
EntityDefinition {name: "rArr", latex_math_mode: true, latex: "\\Rightarrow", html: "&rArr;", ascii: "=>", utf8: ""},
EntityDefinition {name: "darr", latex_math_mode: true, latex: "\\downarrow", html: "&darr;", ascii: "[downarrow]", utf8: ""},
EntityDefinition {name: "dArr", latex_math_mode: true, latex: "\\Downarrow", html: "&dArr;", ascii: "[dbldownarrow]", utf8: ""},
EntityDefinition {name: "harr", latex_math_mode: true, latex: "\\leftrightarrow", html: "&harr;", ascii: "<->", utf8: ""},
EntityDefinition {name: "hArr", latex_math_mode: true, latex: "\\Leftrightarrow", html: "&hArr;", ascii: "<=>", utf8: ""},
EntityDefinition {name: "cosh", latex_math_mode: true, latex: "\\cosh", html: "cosh", ascii: "cosh", utf8: "cosh"},
EntityDefinition {name: "coth", latex_math_mode: true, latex: "\\coth", html: "coth", ascii: "coth", utf8: "coth"},
EntityDefinition {name: "sinh", latex_math_mode: true, latex: "\\sinh", html: "sinh", ascii: "sinh", utf8: "sinh"},
EntityDefinition {name: "tanh", latex_math_mode: true, latex: "\\tanh", html: "tanh", ascii: "tanh", utf8: "tanh"},
EntityDefinition {name: "bull", latex_math_mode: false, latex: "\\textbullet{}", html: "&bull;", ascii: "*", utf8: ""},
EntityDefinition {name: "star", latex_math_mode: true, latex: "\\star", html: "*", ascii: "*", utf8: ""},
EntityDefinition {name: "odot", latex_math_mode: true, latex: "\\odot", html: "o", ascii: "[circled dot]", utf8: "ʘ"},
EntityDefinition {name: "ordf", latex_math_mode: false, latex: "\\textordfeminine{}", html: "&ordf;", ascii: "_a_", utf8: "ª"},
EntityDefinition {name: "ordm", latex_math_mode: false, latex: "\\textordmasculine{}", html: "&ordm;", ascii: "_o_", utf8: "º"},
EntityDefinition {name: "zwnj", latex_math_mode: false, latex: "\\/{}", html: "&zwnj;", ascii: "", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{1.5em}", html: "&ensp;&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "ell", latex_math_mode: true, latex: "\\ell", html: "&ell;", ascii: "ell", utf8: ""},
EntityDefinition {name: "Eta", latex_math_mode: false, latex: "H", html: "&Eta;", ascii: "Eta", utf8: "Η"},
EntityDefinition {name: "eta", latex_math_mode: true, latex: "\\eta", html: "&eta;", ascii: "eta", utf8: "η"},
EntityDefinition {name: "Rho", latex_math_mode: false, latex: "P", html: "&Rho;", ascii: "Rho", utf8: "Ρ"},
EntityDefinition {name: "rho", latex_math_mode: true, latex: "\\rho", html: "&rho;", ascii: "rho", utf8: "ρ"},
EntityDefinition {name: "Tau", latex_math_mode: false, latex: "T", html: "&Tau;", ascii: "Tau", utf8: "Τ"},
EntityDefinition {name: "Phi", latex_math_mode: true, latex: "\\Phi", html: "&Phi;", ascii: "Phi", utf8: "Φ"},
EntityDefinition {name: "phi", latex_math_mode: true, latex: "\\phi", html: "&phi;", ascii: "phi", utf8: "ɸ"},
EntityDefinition {name: "Chi", latex_math_mode: false, latex: "X", html: "&Chi;", ascii: "Chi", utf8: "Χ"},
EntityDefinition {name: "chi", latex_math_mode: true, latex: "\\chi", html: "&chi;", ascii: "chi", utf8: "χ"},
EntityDefinition {name: "Psi", latex_math_mode: true, latex: "\\Psi", html: "&Psi;", ascii: "Psi", utf8: "Ψ"},
EntityDefinition {name: "psi", latex_math_mode: true, latex: "\\psi", html: "&psi;", ascii: "psi", utf8: "ψ"},
EntityDefinition {name: "tau", latex_math_mode: true, latex: "\\tau", html: "&tau;", ascii: "tau", utf8: "τ"},
EntityDefinition {name: "piv", latex_math_mode: true, latex: "\\varpi", html: "&piv;", ascii: "omega-pi", utf8: "ϖ"},
EntityDefinition {name: "ETH", latex_math_mode: false, latex: "\\DH{}", html: "&ETH;", ascii: "D", utf8: "Ð"},
EntityDefinition {name: "eth", latex_math_mode: false, latex: "\\dh{}", html: "&eth;", ascii: "dh", utf8: "ð"},
EntityDefinition {name: "shy", latex_math_mode: false, latex: "\\-", html: "&shy;", ascii: "", utf8: ""},
EntityDefinition {name: "amp", latex_math_mode: false, latex: "\\&", html: "&amp;", ascii: "&", utf8: "&"},
EntityDefinition {name: "dag", latex_math_mode: false, latex: "\\dag{}", html: "&dagger;", ascii: "[dagger]", utf8: ""},
EntityDefinition {name: "yen", latex_math_mode: false, latex: "\\textyen{}", html: "&yen;", ascii: "yen", utf8: "¥"},
EntityDefinition {name: "EUR", latex_math_mode: false, latex: "\\texteuro{}", html: "&euro;", ascii: "EUR", utf8: ""},
EntityDefinition {name: "USD", latex_math_mode: false, latex: "\\$", html: "$", ascii: "$", utf8: "$"},
EntityDefinition {name: "reg", latex_math_mode: false, latex: "\\textregistered{}", html: "&reg;", ascii: "(r)", utf8: "®"},
EntityDefinition {name: "div", latex_math_mode: false, latex: "\\textdiv{}", html: "&divide;", ascii: "/", utf8: "÷"},
EntityDefinition {name: "sum", latex_math_mode: true, latex: "\\sum", html: "&sum;", ascii: "[sum]", utf8: ""},
EntityDefinition {name: "deg", latex_math_mode: false, latex: "\\textdegree{}", html: "&deg;", ascii: "degree", utf8: "°"},
EntityDefinition {name: "not", latex_math_mode: false, latex: "\\textlnot{}", html: "&not;", ascii: "[angled dash]", utf8: "¬"},
EntityDefinition {name: "neg", latex_math_mode: true, latex: "\\neg{}", html: "&not;", ascii: "[angled dash]", utf8: "¬"},
EntityDefinition {name: "lor", latex_math_mode: true, latex: "\\lor", html: "&or;", ascii: "[logical or]", utf8: ""},
EntityDefinition {name: "vee", latex_math_mode: true, latex: "\\vee", html: "&or;", ascii: "[logical or]", utf8: ""},
EntityDefinition {name: "cap", latex_math_mode: true, latex: "\\cap", html: "&cap;", ascii: "[intersection]", utf8: ""},
EntityDefinition {name: "cup", latex_math_mode: true, latex: "\\cup", html: "&cup;", ascii: "[union]", utf8: ""},
EntityDefinition {name: "int", latex_math_mode: true, latex: "\\int", html: "&int;", ascii: "[integral]", utf8: ""},
EntityDefinition {name: "sim", latex_math_mode: true, latex: "\\sim", html: "&sim;", ascii: "~", utf8: ""},
EntityDefinition {name: "neq", latex_math_mode: true, latex: "\\neq", html: "&ne;", ascii: "[not equal to]", utf8: ""},
EntityDefinition {name: "leq", latex_math_mode: true, latex: "\\le", html: "&le;", ascii: "<=", utf8: ""},
EntityDefinition {name: "geq", latex_math_mode: true, latex: "\\ge", html: "&ge;", ascii: ">=", utf8: ""},
EntityDefinition {name: "lll", latex_math_mode: true, latex: "\\lll", html: "&Ll;", ascii: "<<<", utf8: ""},
EntityDefinition {name: "ggg", latex_math_mode: true, latex: "\\ggg", html: "&Gg;", ascii: ">>>", utf8: ""},
EntityDefinition {name: "sub", latex_math_mode: true, latex: "\\subset", html: "&sub;", ascii: "[subset of]", utf8: ""},
EntityDefinition {name: "sup", latex_math_mode: true, latex: "\\supset", html: "&sup;", ascii: "[superset of]", utf8: ""},
EntityDefinition {name: "ang", latex_math_mode: true, latex: "\\angle", html: "&ang;", ascii: "[angle]", utf8: ""},
EntityDefinition {name: "mho", latex_math_mode: true, latex: "\\mho", html: "&mho;", ascii: "mho", utf8: ""},
EntityDefinition {name: "arg", latex_math_mode: true, latex: "\\arg", html: "arg", ascii: "arg", utf8: "arg"},
EntityDefinition {name: "cos", latex_math_mode: true, latex: "\\cos", html: "cos", ascii: "cos", utf8: "cos"},
EntityDefinition {name: "cot", latex_math_mode: true, latex: "\\cot", html: "cot", ascii: "cot", utf8: "cot"},
EntityDefinition {name: "csc", latex_math_mode: true, latex: "\\csc", html: "csc", ascii: "csc", utf8: "csc"},
EntityDefinition {name: "deg", latex_math_mode: true, latex: "\\deg", html: "&deg;", ascii: "deg", utf8: "deg"},
EntityDefinition {name: "det", latex_math_mode: true, latex: "\\det", html: "det", ascii: "det", utf8: "det"},
EntityDefinition {name: "dim", latex_math_mode: true, latex: "\\dim", html: "dim", ascii: "dim", utf8: "dim"},
EntityDefinition {name: "exp", latex_math_mode: true, latex: "\\exp", html: "exp", ascii: "exp", utf8: "exp"},
EntityDefinition {name: "gcd", latex_math_mode: true, latex: "\\gcd", html: "gcd", ascii: "gcd", utf8: "gcd"},
EntityDefinition {name: "hom", latex_math_mode: true, latex: "\\hom", html: "hom", ascii: "hom", utf8: "hom"},
EntityDefinition {name: "inf", latex_math_mode: true, latex: "\\inf", html: "inf", ascii: "inf", utf8: "inf"},
EntityDefinition {name: "ker", latex_math_mode: true, latex: "\\ker", html: "ker", ascii: "ker", utf8: "ker"},
EntityDefinition {name: "lim", latex_math_mode: true, latex: "\\lim", html: "lim", ascii: "lim", utf8: "lim"},
EntityDefinition {name: "log", latex_math_mode: true, latex: "\\log", html: "log", ascii: "log", utf8: "log"},
EntityDefinition {name: "max", latex_math_mode: true, latex: "\\max", html: "max", ascii: "max", utf8: "max"},
EntityDefinition {name: "min", latex_math_mode: true, latex: "\\min", html: "min", ascii: "min", utf8: "min"},
EntityDefinition {name: "sec", latex_math_mode: true, latex: "\\sec", html: "sec", ascii: "sec", utf8: "sec"},
EntityDefinition {name: "sin", latex_math_mode: true, latex: "\\sin", html: "sin", ascii: "sin", utf8: "sin"},
EntityDefinition {name: "sup", latex_math_mode: true, latex: "\\sup", html: "&sup;", ascii: "sup", utf8: "sup"},
EntityDefinition {name: "tan", latex_math_mode: true, latex: "\\tan", html: "tan", ascii: "tan", utf8: "tan"},
EntityDefinition {name: "ast", latex_math_mode: true, latex: "\\ast", html: "&lowast;", ascii: "*", utf8: "*"},
EntityDefinition {name: "uml", latex_math_mode: false, latex: "\\textasciidieresis{}", html: "&uml;", ascii: "[diaeresis]", utf8: "¨"},
EntityDefinition {name: "zwj", latex_math_mode: false, latex: "", html: "&zwj;", ascii: "", utf8: ""},
EntityDefinition {name: "lrm", latex_math_mode: false, latex: "", html: "&lrm;", ascii: "", utf8: ""},
EntityDefinition {name: "rlm", latex_math_mode: false, latex: "", html: "&rlm;", ascii: "", utf8: ""},
EntityDefinition {name: "sad", latex_math_mode: true, latex: "\\ddot\\frown", html: "&#9785;", ascii: ":-(", utf8: ""},
EntityDefinition {name: "loz", latex_math_mode: true, latex: "\\lozenge", html: "&loz;", ascii: "[lozenge]", utf8: ""},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{1.0em}", html: "&ensp;&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "AA", latex_math_mode: false, latex: "\\AA{}", html: "&Aring;", ascii: "A", utf8: "Å"},
EntityDefinition {name: "Mu", latex_math_mode: false, latex: "M", html: "&Mu;", ascii: "Mu", utf8: "Μ"},
EntityDefinition {name: "mu", latex_math_mode: true, latex: "\\mu", html: "&mu;", ascii: "mu", utf8: "μ"},
EntityDefinition {name: "nu", latex_math_mode: true, latex: "\\nu", html: "&nu;", ascii: "nu", utf8: "ν"},
EntityDefinition {name: "Nu", latex_math_mode: false, latex: "N", html: "&Nu;", ascii: "Nu", utf8: "Ν"},
EntityDefinition {name: "Xi", latex_math_mode: true, latex: "\\Xi", html: "&Xi;", ascii: "Xi", utf8: "Ξ"},
EntityDefinition {name: "xi", latex_math_mode: true, latex: "\\xi", html: "&xi;", ascii: "xi", utf8: "ξ"},
EntityDefinition {name: "Pi", latex_math_mode: true, latex: "\\Pi", html: "&Pi;", ascii: "Pi", utf8: "Π"},
EntityDefinition {name: "pi", latex_math_mode: true, latex: "\\pi", html: "&pi;", ascii: "pi", utf8: "π"},
EntityDefinition {name: "lt", latex_math_mode: false, latex: "\\textless{}", html: "&lt;", ascii: "<", utf8: "<"},
EntityDefinition {name: "gt", latex_math_mode: false, latex: "\\textgreater{}", html: "&gt;", ascii: ">", utf8: ">"},
EntityDefinition {name: "pm", latex_math_mode: false, latex: "\\textpm{}", html: "&plusmn;", ascii: "+-", utf8: "±"},
EntityDefinition {name: "ne", latex_math_mode: true, latex: "\\ne", html: "&ne;", ascii: "[not equal to]", utf8: ""},
EntityDefinition {name: "le", latex_math_mode: true, latex: "\\le", html: "&le;", ascii: "<=", utf8: ""},
EntityDefinition {name: "ge", latex_math_mode: true, latex: "\\ge", html: "&ge;", ascii: ">=", utf8: ""},
EntityDefinition {name: "ll", latex_math_mode: true, latex: "\\ll", html: "&Lt;", ascii: "<<", utf8: ""},
EntityDefinition {name: "Ll", latex_math_mode: true, latex: "\\lll", html: "&Ll;", ascii: "<<<", utf8: ""},
EntityDefinition {name: "gg", latex_math_mode: true, latex: "\\gg", html: "&Gt;", ascii: ">>", utf8: ""},
EntityDefinition {name: "Gg", latex_math_mode: true, latex: "\\ggg", html: "&Gg;", ascii: ">>>", utf8: ""},
EntityDefinition {name: "in", latex_math_mode: true, latex: "\\in", html: "&isin;", ascii: "[element of]", utf8: ""},
EntityDefinition {name: "ni", latex_math_mode: true, latex: "\\ni", html: "&ni;", ascii: "[contains as member]", utf8: ""},
EntityDefinition {name: "to", latex_math_mode: true, latex: "\\to", html: "&rarr;", ascii: "->", utf8: ""},
EntityDefinition {name: "lg", latex_math_mode: true, latex: "\\lg", html: "lg", ascii: "lg", utf8: "lg"},
EntityDefinition {name: "ln", latex_math_mode: true, latex: "\\ln", html: "ln", ascii: "ln", utf8: "ln"},
EntityDefinition {name: "Pr", latex_math_mode: true, latex: "\\Pr", html: "Pr", ascii: "Pr", utf8: "Pr"},
EntityDefinition {name: "_ ", latex_math_mode: false, latex: "\\hspace*{0.5em}", html: "&ensp;", ascii: " ", utf8: ""},
EntityDefinition {name: "S", latex_math_mode: false, latex: "\\S", html: "&sect;", ascii: "section", utf8: "§"},
EntityDefinition {name: "P", latex_math_mode: false, latex: "\\P{}", html: "&para;", ascii: "paragraph", utf8: ""},
];

View File

@ -1,6 +1,8 @@
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use super::constants::DEFAULT_ORG_ENTITIES;
use super::constants::DEFAULT_ORG_LINK_PARAMETERS;
use super::FileAccessInterface;
use super::LocalFileAccessInterface;
use crate::types::IndentationLevel;
@ -34,11 +36,6 @@ pub struct GlobalSettings<'g, 's> {
/// Corresponds to org-footnote-section elisp variable.
pub footnote_section: &'g str,
/// The label format for references inside src/example blocks.
///
/// Corresponds to org-coderef-label-format elisp variable.
pub coderef_label_format: &'g str,
/// The allowed protocols for links (for example, the "https" in "https://foo.bar/").
///
/// Corresponds to org-link-parameters elisp variable.
@ -50,10 +47,28 @@ pub struct GlobalSettings<'g, 's> {
///
/// This is set by including #+LINK in the org-mode document.
pub link_templates: BTreeMap<String, String>,
/// The special characters that can be written in org-mode like \infin for the infinity symbol.
///
/// MUST be sorted with the largest names first. Otherwise the parser may match a shorter substring of a longer entity.
///
/// Corresponds to org-entities elisp variable.
pub entities: &'g [EntityDefinition<'s>],
}
pub const DEFAULT_TAB_WIDTH: IndentationLevel = 8;
#[derive(Debug, Clone)]
pub struct EntityDefinition<'a> {
pub name: &'a str,
pub latex_math_mode: bool,
pub latex: &'a str,
pub html: &'a str,
pub ascii: &'a str,
// Skipping latin1 because it is detrimental to the future. If anyone out there is using latin1, take a long look in the mirror and change your ways.
pub utf8: &'a str,
}
impl<'g, 's> GlobalSettings<'g, 's> {
fn new() -> GlobalSettings<'g, 's> {
GlobalSettings {
@ -67,9 +82,9 @@ impl<'g, 's> GlobalSettings<'g, 's> {
tab_width: DEFAULT_TAB_WIDTH,
odd_levels_only: HeadlineLevelFilter::default(),
footnote_section: "Footnotes",
coderef_label_format: "(ref:%s)",
link_parameters: &DEFAULT_ORG_LINK_PARAMETERS,
link_templates: BTreeMap::new(),
entities: &DEFAULT_ORG_ENTITIES,
}
}
}
@ -91,29 +106,3 @@ impl Default for HeadlineLevelFilter {
HeadlineLevelFilter::OddEven
}
}
const DEFAULT_ORG_LINK_PARAMETERS: [&'static str; 23] = [
"id",
"eww",
"rmail",
"mhe",
"irc",
"info",
"gnus",
"docview",
"bibtex",
"bbdb",
"w3m",
"doi",
"file+sys",
"file+emacs",
"shell",
"news",
"mailto",
"https",
"http",
"ftp",
"help",
"file",
"elisp",
];

View File

@ -1,6 +1,7 @@
use crate::error::Res;
use crate::parser::OrgSource;
mod constants;
mod context;
mod exiting;
mod file_access_interface;
@ -25,6 +26,7 @@ pub(crate) use context::HasAffiliatedKeywordInner;
pub(crate) use exiting::ExitClass;
pub use file_access_interface::FileAccessInterface;
pub use file_access_interface::LocalFileAccessInterface;
pub use global_settings::EntityDefinition;
pub use global_settings::GlobalSettings;
pub use global_settings::HeadlineLevelFilter;
pub use global_settings::DEFAULT_TAB_WIDTH;

View File

@ -2,12 +2,15 @@ use nom::branch::alt;
use nom::bytes::complete::tag;
use nom::character::complete::satisfy;
use nom::combinator::eof;
use nom::combinator::map;
use nom::combinator::peek;
use nom::combinator::recognize;
use nom::combinator::verify;
use nom::sequence::tuple;
use super::org_source::OrgSource;
use super::util::maybe_consume_object_trailing_whitespace_if_not_exiting;
use crate::context::EntityDefinition;
use crate::context::RefContext;
use crate::error::CustomError;
use crate::error::MyError;
@ -15,430 +18,13 @@ use crate::error::Res;
use crate::parser::util::get_consumed;
use crate::types::Entity;
// TODO: Make this a user-provided variable corresponding to elisp's org-entities
const ORG_ENTITIES: [&'static str; 413] = [
"Agrave",
"agrave",
"Aacute",
"aacute",
"Acirc",
"acirc",
"Amacr",
"amacr",
"Atilde",
"atilde",
"Auml",
"auml",
"Aring",
"AA",
"aring",
"AElig",
"aelig",
"Ccedil",
"ccedil",
"Egrave",
"egrave",
"Eacute",
"eacute",
"Ecirc",
"ecirc",
"Euml",
"euml",
"Igrave",
"igrave",
"Iacute",
"iacute",
"Idot",
"inodot",
"Icirc",
"icirc",
"Iuml",
"iuml",
"Ntilde",
"ntilde",
"Ograve",
"ograve",
"Oacute",
"oacute",
"Ocirc",
"ocirc",
"Otilde",
"otilde",
"Ouml",
"ouml",
"Oslash",
"oslash",
"OElig",
"oelig",
"Scaron",
"scaron",
"szlig",
"Ugrave",
"ugrave",
"Uacute",
"uacute",
"Ucirc",
"ucirc",
"Uuml",
"uuml",
"Yacute",
"yacute",
"Yuml",
"yuml",
"fnof",
"real",
"image",
"weierp",
"ell",
"imath",
"jmath",
"Alpha",
"alpha",
"Beta",
"beta",
"Gamma",
"gamma",
"Delta",
"delta",
"Epsilon",
"epsilon",
"varepsilon",
"Zeta",
"zeta",
"Eta",
"eta",
"Theta",
"theta",
"thetasym",
"vartheta",
"Iota",
"iota",
"Kappa",
"kappa",
"Lambda",
"lambda",
"Mu",
"mu",
"nu",
"Nu",
"Xi",
"xi",
"Omicron",
"omicron",
"Pi",
"pi",
"Rho",
"rho",
"Sigma",
"sigma",
"sigmaf",
"varsigma",
"Tau",
"Upsilon",
"upsih",
"upsilon",
"Phi",
"phi",
"varphi",
"Chi",
"chi",
"acutex",
"Psi",
"psi",
"tau",
"Omega",
"omega",
"piv",
"varpi",
"partial",
"alefsym",
"aleph",
"gimel",
"beth",
"dalet",
"ETH",
"eth",
"THORN",
"thorn",
"dots",
"cdots",
"hellip",
"middot",
"iexcl",
"iquest",
"shy",
"ndash",
"mdash",
"quot",
"acute",
"ldquo",
"rdquo",
"bdquo",
"lsquo",
"rsquo",
"sbquo",
"laquo",
"raquo",
"lsaquo",
"rsaquo",
"circ",
"vert",
"vbar",
"brvbar",
"S",
"sect",
"amp",
"lt",
"gt",
"tilde",
"slash",
"plus",
"under",
"equal",
"asciicirc",
"dagger",
"dag",
"Dagger",
"ddag",
"nbsp",
"ensp",
"emsp",
"thinsp",
"curren",
"cent",
"pound",
"yen",
"euro",
"EUR",
"dollar",
"USD",
"copy",
"reg",
"trade",
"minus",
"pm",
"plusmn",
"times",
"frasl",
"colon",
"div",
"frac12",
"frac14",
"frac34",
"permil",
"sup1",
"sup2",
"sup3",
"radic",
"sum",
"prod",
"micro",
"macr",
"deg",
"prime",
"Prime",
"infin",
"infty",
"prop",
"propto",
"not",
"neg",
"land",
"wedge",
"lor",
"vee",
"cap",
"cup",
"smile",
"frown",
"int",
"therefore",
"there4",
"because",
"sim",
"cong",
"simeq",
"asymp",
"approx",
"ne",
"neq",
"equiv",
"triangleq",
"le",
"leq",
"ge",
"geq",
"lessgtr",
"lesseqgtr",
"ll",
"Ll",
"lll",
"gg",
"Gg",
"ggg",
"prec",
"preceq",
"preccurlyeq",
"succ",
"succeq",
"succcurlyeq",
"sub",
"subset",
"sup",
"supset",
"nsub",
"sube",
"nsup",
"supe",
"setminus",
"forall",
"exist",
"exists",
"nexist",
"nexists",
"empty",
"emptyset",
"isin",
"in",
"notin",
"ni",
"nabla",
"ang",
"angle",
"perp",
"parallel",
"sdot",
"cdot",
"lceil",
"rceil",
"lfloor",
"rfloor",
"lang",
"rang",
"langle",
"rangle",
"hbar",
"mho",
"larr",
"leftarrow",
"gets",
"lArr",
"Leftarrow",
"uarr",
"uparrow",
"uArr",
"Uparrow",
"rarr",
"to",
"rightarrow",
"rArr",
"Rightarrow",
"darr",
"downarrow",
"dArr",
"Downarrow",
"harr",
"leftrightarrow",
"hArr",
"Leftrightarrow",
"crarr",
"hookleftarrow",
"arccos",
"arcsin",
"arctan",
"arg",
"cos",
"cosh",
"cot",
"coth",
"csc",
"deg",
"det",
"dim",
"exp",
"gcd",
"hom",
"inf",
"ker",
"lg",
"lim",
"liminf",
"limsup",
"ln",
"log",
"max",
"min",
"Pr",
"sec",
"sin",
"sinh",
"sup",
"tan",
"tanh",
"bull",
"bullet",
"star",
"lowast",
"ast",
"odot",
"oplus",
"otimes",
"check",
"checkmark",
"para",
"ordf",
"ordm",
"cedil",
"oline",
"uml",
"zwnj",
"zwj",
"lrm",
"rlm",
"smiley",
"blacksmile",
"sad",
"frowny",
"clubs",
"clubsuit",
"spades",
"spadesuit",
"hearts",
"heartsuit",
"diams",
"diamondsuit",
"diamond",
"Diamond",
"loz",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
"_ ",
];
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
pub(crate) fn entity<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Entity<'s>> {
let (remaining, _) = tag("\\")(input)?;
let (remaining, entity_name) = name(context, remaining)?;
let (remaining, (entity_definition, entity_name, use_brackets)) = name(context, remaining)?;
let (remaining, _trailing_whitespace) =
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
@ -448,25 +34,33 @@ pub(crate) fn entity<'b, 'g, 'r, 's>(
remaining,
Entity {
source: source.into(),
entity_name: entity_name.into(),
name: entity_name.into(),
latex_math_mode: entity_definition.latex_math_mode,
latex: entity_definition.latex,
html: entity_definition.html,
ascii: entity_definition.ascii,
utf8: entity_definition.utf8,
use_brackets,
},
))
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn name<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
// TODO: This should be defined by org-entities and optionally org-entities-user
for entity in ORG_ENTITIES {
) -> Res<OrgSource<'s>, (&'g EntityDefinition<'s>, OrgSource<'s>, bool)> {
for entity in context.get_global_settings().entities {
let result = tuple((
tag::<_, _, CustomError<_>>(entity),
alt((tag("{}"), peek(recognize(entity_end)))),
tag::<_, _, CustomError<_>>(entity.name),
alt((
verify(map(tag("{}"), |_| true), |_| !entity.name.ends_with(" ")),
map(peek(recognize(entity_end)), |_| false),
)),
))(input);
match result {
Ok((remaining, (ent, _))) => {
return Ok((remaining, ent));
Ok((remaining, (ent, use_brackets))) => {
return Ok((remaining, (entity, ent, use_brackets)));
}
Err(_) => {}
}

View File

@ -167,7 +167,14 @@ pub struct OrgMacro<'s> {
#[derive(Debug, PartialEq)]
pub struct Entity<'s> {
pub source: &'s str,
pub entity_name: &'s str,
pub name: &'s str,
pub latex_math_mode: bool,
pub latex: &'s str,
pub html: &'s str,
pub ascii: &'s str,
// Skipping latin1 because it is detrimental to the future. If anyone out there is using latin1, take a long look in the mirror and change your ways.
pub utf8: &'s str,
pub use_brackets: bool,
}
#[derive(Debug, PartialEq)]