Imported Upstream version 1.22.4
[platform/upstream/groff.git] / src / preproc / eqn / pbox.h
1 // -*- C++ -*-
2 /* Copyright (C) 1989-2018 Free Software Foundation, Inc.
3      Written by James Clark (jjc@jclark.com)
4
5 This file is part of groff.
6
7 groff 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 3 of the License, or
10 (at your option) any later version.
11
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
19
20 extern int fat_offset;
21
22 extern int over_hang;
23 extern int accent_width;
24
25 extern int delimiter_factor;
26 extern int delimiter_shortfall;
27
28 extern int null_delimiter_space;
29 extern int script_space;
30 extern int thin_space;
31 extern int medium_space;
32 extern int thick_space;
33
34 extern int num1;
35 extern int num2;
36 // we don't use num3, because we don't have \atop
37 extern int denom1;
38 extern int denom2;
39 extern int axis_height;
40 extern int sup1;
41 extern int sup2;
42 extern int sup3;
43 extern int default_rule_thickness;
44 extern int sub1;
45 extern int sub2;
46 extern int sup_drop;
47 extern int sub_drop;
48 extern int x_height;
49 extern int big_op_spacing1;
50 extern int big_op_spacing2;
51 extern int big_op_spacing3;
52 extern int big_op_spacing4;
53 extern int big_op_spacing5;
54
55 extern int baseline_sep;
56 extern int shift_down;
57 extern int column_sep;
58 extern int matrix_side_sep;
59
60 // ms.eqn relies on this!
61
62 #define LINE_STRING "10"
63 #define MARK_OR_LINEUP_FLAG_REG "MK"
64
65 #define WIDTH_FORMAT PREFIX "w%d"
66 #define HEIGHT_FORMAT PREFIX "h%d"
67 #define DEPTH_FORMAT PREFIX "d%d"
68 #define TOTAL_FORMAT PREFIX "t%d"
69 #define SIZE_FORMAT PREFIX "z%d"
70 #define SMALL_SIZE_FORMAT PREFIX "Z%d"
71 #define SUP_RAISE_FORMAT PREFIX "p%d"
72 #define SUB_LOWER_FORMAT PREFIX "b%d"
73 #define SUB_KERN_FORMAT PREFIX "k%d"
74 #define FONT_FORMAT PREFIX "f%d"
75 #define SKEW_FORMAT PREFIX "s%d"
76 #define LEFT_WIDTH_FORMAT PREFIX "lw%d"
77 #define LEFT_DELIM_STRING_FORMAT PREFIX "l%d"
78 #define RIGHT_DELIM_STRING_FORMAT PREFIX "r%d"
79 #define SQRT_STRING_FORMAT PREFIX "sqr%d"
80 #define SQRT_WIDTH_FORMAT PREFIX "sq%d"
81 #define BASELINE_SEP_FORMAT PREFIX "bs%d"
82 // this needs two parameters, the uid and the column index
83 #define COLUMN_WIDTH_FORMAT PREFIX "cw%d,%d"
84
85 #define BAR_STRING PREFIX "sqb"
86 #define TEMP_REG PREFIX "temp"
87 #define MARK_REG PREFIX "mark"
88 #define MARK_WIDTH_REG PREFIX "mwidth"
89 #define SAVED_MARK_REG PREFIX "smark"
90 #define MAX_SIZE_REG PREFIX "mxsz"
91 #define REPEAT_APPEND_STRING_MACRO PREFIX "ras"
92 #define TOP_HEIGHT_REG PREFIX "th"
93 #define TOP_DEPTH_REG PREFIX "td"
94 #define MID_HEIGHT_REG PREFIX "mh"
95 #define MID_DEPTH_REG PREFIX "md"
96 #define BOT_HEIGHT_REG PREFIX "bh"
97 #define BOT_DEPTH_REG PREFIX "bd"
98 #define EXT_HEIGHT_REG PREFIX "eh"
99 #define EXT_DEPTH_REG PREFIX "ed"
100 #define TOTAL_HEIGHT_REG PREFIX "tot"
101 #define DELTA_REG PREFIX "delta"
102 #define DELIM_STRING PREFIX "delim"
103 #define DELIM_WIDTH_REG PREFIX "dwidth"
104 #define SAVED_FONT_REG PREFIX "sfont"
105 #define SAVED_PREV_FONT_REG PREFIX "spfont"
106 #define SAVED_INLINE_FONT_REG PREFIX "sifont"
107 #define SAVED_INLINE_PREV_FONT_REG PREFIX "sipfont"
108 #define SAVED_SIZE_REG PREFIX "ssize"
109 #define SAVED_INLINE_SIZE_REG PREFIX "sisize"
110 #define SAVED_INLINE_PREV_SIZE_REG PREFIX "sipsize"
111 #define SAVE_FONT_STRING PREFIX "sfont"
112 #define RESTORE_FONT_STRING PREFIX "rfont"
113 #define INDEX_REG PREFIX "i"
114 #define TEMP_MACRO PREFIX "tempmac"
115
116 #define DELIMITER_CHAR "\\(EQ"
117
118 const int CRAMPED_SCRIPT_STYLE = 0;
119 const int SCRIPT_STYLE = 1;
120 const int CRAMPED_DISPLAY_STYLE = 2;
121 const int DISPLAY_STYLE = 3;
122
123 extern int script_style(int);
124 extern int cramped_style(int);
125
126 const int ORDINARY_TYPE = 0;
127 const int OPERATOR_TYPE = 1;
128 const int BINARY_TYPE = 2;
129 const int RELATION_TYPE = 3;
130 const int OPENING_TYPE = 4;
131 const int CLOSING_TYPE = 5;
132 const int PUNCTUATION_TYPE = 6;
133 const int INNER_TYPE = 7;
134 const int SUPPRESS_TYPE = 8;
135
136 void set_script_size();
137
138 enum { HINT_PREV_IS_ITALIC = 01, HINT_NEXT_IS_ITALIC = 02 };
139
140 extern const char *current_roman_font;