3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS
12 #include "ControlMath.h"
14 char const * function_names[] = {
15 "arccos", "arcsin", "arctan", "arg", "bmod",
16 "cos", "cosh", "cot", "coth", "csc", "deg",
17 "det", "dim", "exp", "gcd", "hom", "inf", "ker",
18 "lg", "lim", "liminf", "limsup", "ln", "log",
19 "max", "min", "sec", "sin", "sinh", "sup",
23 int const nr_function_names = sizeof(function_names) / sizeof(char const *) - 1;
25 char const * latex_arrow[] = {
26 "downarrow", "leftarrow", "Downarrow", "Leftarrow",
27 "hookleftarrow", "rightarrow", "uparrow", "Rightarrow", "Uparrow",
28 "hookrightarrow", "updownarrow", "Leftrightarrow", "leftharpoonup",
29 "rightharpoonup", "rightleftharpoons", "leftrightarrow", "Updownarrow",
30 "leftharpoondown", "rightharpoondown", "mapsto",
31 "Longleftarrow", "Longrightarrow", "Longleftrightarrow",
32 "longleftrightarrow", "longleftarrow", "longrightarrow", "longmapsto",
33 "nwarrow", "nearrow", "swarrow", "searrow", "",
36 int const nr_latex_arrow = sizeof(latex_arrow) / sizeof(char const *);
38 char const * latex_bop[] = {
39 "pm", "cap", "diamond", "oplus",
40 "mp", "cup", "bigtriangleup", "ominus",
41 "times", "uplus", "bigtriangledown", "otimes",
42 "div", "sqcap", "triangleright", "oslash",
43 "cdot", "sqcup", "triangleleft", "odot",
44 "star", "vee", "amalg", "bigcirc",
45 "setminus", "wedge", "dagger", "circ",
46 "bullet", "wr", "ddagger", ""
49 int const nr_latex_bop = sizeof(latex_bop) / sizeof(char const *);
51 char const * latex_brel[] = {
52 "leq", "geq", "equiv", "models",
53 "prec", "succ", "sim", "perp",
54 "preceq", "succeq", "simeq", "mid",
55 "ll", "gg", "asymp", "parallel",
56 "subset", "supset", "approx", "smile",
57 "subseteq", "supseteq", "cong", "frown",
58 "sqsubseteq", "sqsupseteq", "doteq", "neq",
59 "in", "ni", "propto", "notin",
60 "vdash", "dashv", "bowtie", ""
63 int const nr_latex_brel = sizeof(latex_brel) / sizeof(char const *);
65 char const * latex_dots[] = {
66 "ldots", "cdots", "vdots", "ddots"
69 int const nr_latex_dots = sizeof(latex_dots) / sizeof(char const *);
71 char const * latex_greek[] = {
72 "Gamma", "Delta", "Theta", "Lambda", "Xi", "Pi",
73 "Sigma", "Upsilon", "Phi", "Psi", "Omega",
74 "alpha", "beta", "gamma", "delta", "epsilon", "varepsilon", "zeta",
75 "eta", "theta", "vartheta", "iota", "kappa", "lambda", "mu",
76 "nu", "xi", "pi", "varpi", "rho", "sigma", "varsigma",
77 "tau", "upsilon", "phi", "varphi", "chi", "psi", "omega", ""
80 int const nr_latex_greek = sizeof(latex_greek) / sizeof(char const *);
82 char const * latex_misc[] = {
83 "nabla", "partial", "infty", "prime", "ell",
84 "emptyset", "exists", "forall", "imath", "jmath",
85 "Re", "Im", "aleph", "wp", "hbar",
86 "angle", "top", "bot", "Vert", "neg",
87 "flat", "natural", "sharp", "surd", "triangle",
88 "diamondsuit", "heartsuit", "clubsuit", "spadesuit",
89 "textrm Å", "textrm Ø", "mathcircumflex", "_",
91 "mathbb N", "mathbb Z", "mathbb Q",
92 "mathbb R", "mathbb C", "mathbb H",
93 "mathcal F", "mathcal L",
94 "mathcal H", "mathcal O", ""
97 int const nr_latex_misc = sizeof(latex_misc) / sizeof(char const *);
99 char const * latex_varsz[] = {
100 "sum", "int", "oint",
101 "prod", "coprod", "bigsqcup",
102 "bigotimes", "bigodot", "bigoplus",
103 "bigcap", "bigcup", "biguplus",
104 "bigvee", "bigwedge", ""
107 int const nr_latex_varsz = sizeof(latex_varsz) / sizeof(char const *);
109 char const * latex_ams_misc[] = {
110 "digamma", "varkappa", "beth", "daleth", "gimel",
111 "ulcorner", "urcorner", "llcorner", "lrcorner",
112 "hbar", "hslash", "vartriangle",
113 "triangledown", "square", "lozenge",
114 "circledS", "angle", "measuredangle",
115 "nexists", "mho", "Finv",
116 "Game", "Bbbk", "backprime",
117 "varnothing", "blacktriangle", "blacktriangledown",
118 "blacksquare", "blacklozenge", "bigstar",
119 "sphericalangle", "complement", "eth",
120 "diagup", "diagdown", ""
123 int const nr_latex_ams_misc = sizeof(latex_ams_misc) / sizeof(char const *);
125 char const * latex_ams_arrows[] = {
126 "dashrightarrow", "dashleftarrow", "leftleftarrows",
127 "leftrightarrows", "Lleftarrow", "twoheadleftarrow",
128 "leftarrowtail", "looparrowleft", "leftrightharpoons",
129 "curvearrowleft", "circlearrowleft", "Lsh",
130 "upuparrows", "upharpoonleft", "downharpoonleft",
131 "multimap", "leftrightsquigarrow", "rightrightarrows",
132 "rightleftarrows", "rightrightarrows", "rightleftarrows",
133 "twoheadrightarrow", "rightarrowtail", "looparrowright",
134 "rightleftharpoons", "curvearrowright", "circlearrowright",
135 "Rsh", "downdownarrows", "upharpoonright",
136 "downharpoonright", "rightsquigarrow",
137 "nleftarrow", "nrightarrow", "nLeftarrow",
138 "nRightarrow", "nleftrightarrow", "nLeftrightarrow", ""
141 int const nr_latex_ams_arrows = sizeof(latex_ams_arrows) / sizeof(char const *);
143 char const * latex_ams_rel[] = {
144 "leqq", "leqslant", "eqslantless", "eqslantgtr", "gtrsim", "gtrapprox",
145 "lesssim", "lessapprox", "approxeq", "gtrdot", "ggg", "gtrless",
146 "lessdot", "lll", "lessgtr", "gtreqless", "gtreqqless", "eqcirc",
147 "lesseqgtr", "lesseqqgtr", "doteqdot", "circeq", "triangleq", "thicksim",
148 "risingdotseq", "fallingdotseq", "backsim", "thickapprox", "supseteqq", "Supset",
149 "backsimeq", "subseteqq", "Subset","sqsupset", "succcurlyeq", "curlyeqsucc",
150 "sqsubset", "preccurlyeq", "curlyeqprec", "succsim", "succapprox", "vartriangleright",
151 "precsim", "precapprox", "vartriangleleft", "trianglerighteq", "Vdash", "shortmid",
152 "trianglelefteq", "vDash", "Vvdash", "shortparallel", "between", "pitchfork",
153 "smallsmile", "smallfrown", "bumpeq", "varpropto", "blacktriangleleft", "therefore",
154 "Bumpeq", "geqq", "geqslant", "backepsilon", "blacktriangleright", "because", ""
157 int const nr_latex_ams_rel = sizeof(latex_ams_rel) / sizeof(char const *);
159 char const * latex_ams_nrel[] = {
160 "nless", "nleq", "nleqslant", "ngeqslant", "ngeqq", "gneq",
161 "nleqq", "lneq", "lneqq","gneqq", "gvertneqq", "gnsim",
162 "lvertneqq", "lnsim", "lnapprox", "gnapprox", "nsucc", "nsucceq",
163 "nprec", "npreceq", "precnsim","succnsim", "succnapprox", "ncong",
164 "precnapprox", "nsim", "nshortmid", "nshortparallel", "nparallel", "nvDash",
166 "nmid", "nvdash", "nvDash","nVDash", "ntriangleright", "ntrianglerighteq",
167 "ntriangleleft", "ntrianglelefteq", "nsubseteq", "nsupseteq", "nsupseteqq", "supsetneq",
168 "subsetneq", "varsubsetneq", "subsetneqq", "varsupsetneq", "supsetneqq", "varsupsetneqq",
169 "varsubsetneqq", "ngtr", "ngeq","", "", ""
172 int const nr_latex_ams_nrel = sizeof(latex_ams_nrel) / sizeof(char const *);
175 char const * latex_ams_ops[] = {
176 "dotplus", "smallsetminus", "Cap",
177 "Cup", "barwedge", "veebar",
178 "doublebarwedge", "boxminus", "boxtimes",
179 "boxdot", "boxplus", "divideontimes",
180 "ltimes", "rtimes", "leftthreetimes",
181 "rightthreetimes", "curlywedge", "curlyvee",
182 "circleddash", "circledast", "circledcirc",
183 "centerdot", "intercal", ""
186 int const nr_latex_ams_ops = sizeof(latex_ams_ops) / sizeof(char const *);