beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / tex / mathcodes.h
blob1742e43cfd5bcaac6091eeae11143244f6a37c86
1 /* mathcodes.h
3 Copyright 2009-2012 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
7 LuaTeX is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
12 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License along
18 with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef MATHCODES_H
23 # define MATHCODES_H
25 /* this is a flag for |scan_delimiter| */
27 # define no_mathcode 0
28 # define tex_mathcode 8
29 # define umath_mathcode 21
30 # define umathnum_mathcode 22
32 typedef struct mathcodeval {
33 int class_value;
34 int family_value;
35 int character_value;
36 } mathcodeval;
38 void set_math_code(int n, int mathclass, int mathfamily, int mathcharacter, quarterword gl);
40 mathcodeval get_math_code(int n);
41 int get_math_code_num(int n);
42 int get_del_code_num(int n);
43 mathcodeval scan_mathchar(int extcode);
44 mathcodeval scan_delimiter_as_mathchar(int extcode);
46 mathcodeval mathchar_from_integer(int value, int extcode);
47 void show_mathcode_value(mathcodeval d);
49 typedef struct delcodeval {
50 int class_value;
51 int small_family_value;
52 int small_character_value;
53 int large_family_value;
54 int large_character_value;
55 } delcodeval;
57 void set_del_code(int n, int smathfamily, int smathcharacter, int lmathfamily, int lmathcharacter, quarterword gl);
59 delcodeval get_del_code(int n);
61 void unsave_math_codes(quarterword grouplevel);
62 void initialize_math_codes(void);
63 void dump_math_codes(void);
64 void undump_math_codes(void);
66 #endif