Adapt src/pre-eqn (src/preproc/eqn)
[s-roff.git] / src / pre-eqn / pbox.h
blob4381a2f6fc0297110976d0e9028fe3db88c41442
1 /*@
2 * Copyright (c) 2014 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 1989 - 1992 Free Software Foundation, Inc.
5 * Written by James Clark (jjc@jclark.com)
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 2, or (at your option) any later
10 * version.
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.
17 * You should have received a copy of the GNU General Public License along
18 * with groff; see the file COPYING. If not, write to the Free Software
19 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef _PBOX_H
22 #define _PBOX_H
24 extern int fat_offset;
26 extern int over_hang;
27 extern int accent_width;
29 extern int delimiter_factor;
30 extern int delimiter_shortfall;
32 extern int null_delimiter_space;
33 extern int script_space;
34 extern int thin_space;
35 extern int medium_space;
36 extern int thick_space;
38 extern int num1;
39 extern int num2;
40 // we don't use num3, because we don't have \atop
41 extern int denom1;
42 extern int denom2;
43 extern int axis_height;
44 extern int sup1;
45 extern int sup2;
46 extern int sup3;
47 extern int default_rule_thickness;
48 extern int sub1;
49 extern int sub2;
50 extern int sup_drop;
51 extern int sub_drop;
52 extern int x_height;
53 extern int big_op_spacing1;
54 extern int big_op_spacing2;
55 extern int big_op_spacing3;
56 extern int big_op_spacing4;
57 extern int big_op_spacing5;
59 extern int baseline_sep;
60 extern int shift_down;
61 extern int column_sep;
62 extern int matrix_side_sep;
64 // ms.eqn relies on this!
66 #define LINE_STRING "10"
67 #define MARK_OR_LINEUP_FLAG_REG "MK"
69 #define WIDTH_FORMAT PREFIX "w%d"
70 #define HEIGHT_FORMAT PREFIX "h%d"
71 #define DEPTH_FORMAT PREFIX "d%d"
72 #define TOTAL_FORMAT PREFIX "t%d"
73 #define SIZE_FORMAT PREFIX "z%d"
74 #define SMALL_SIZE_FORMAT PREFIX "Z%d"
75 #define SUP_RAISE_FORMAT PREFIX "p%d"
76 #define SUB_LOWER_FORMAT PREFIX "b%d"
77 #define SUB_KERN_FORMAT PREFIX "k%d"
78 #define FONT_FORMAT PREFIX "f%d"
79 #define SKEW_FORMAT PREFIX "s%d"
80 #define LEFT_WIDTH_FORMAT PREFIX "lw%d"
81 #define LEFT_DELIM_STRING_FORMAT PREFIX "l%d"
82 #define RIGHT_DELIM_STRING_FORMAT PREFIX "r%d"
83 #define SQRT_STRING_FORMAT PREFIX "sqr%d"
84 #define SQRT_WIDTH_FORMAT PREFIX "sq%d"
85 #define BASELINE_SEP_FORMAT PREFIX "bs%d"
86 // this needs two parameters, the uid and the column index
87 #define COLUMN_WIDTH_FORMAT PREFIX "cw%d,%d"
89 #define BAR_STRING PREFIX "sqb"
90 #define TEMP_REG PREFIX "temp"
91 #define MARK_REG PREFIX "mark"
92 #define MARK_WIDTH_REG PREFIX "mwidth"
93 #define SAVED_MARK_REG PREFIX "smark"
94 #define MAX_SIZE_REG PREFIX "mxsz"
95 #define REPEAT_APPEND_STRING_MACRO PREFIX "ras"
96 #define TOP_HEIGHT_REG PREFIX "th"
97 #define TOP_DEPTH_REG PREFIX "td"
98 #define MID_HEIGHT_REG PREFIX "mh"
99 #define MID_DEPTH_REG PREFIX "md"
100 #define BOT_HEIGHT_REG PREFIX "bh"
101 #define BOT_DEPTH_REG PREFIX "bd"
102 #define EXT_HEIGHT_REG PREFIX "eh"
103 #define EXT_DEPTH_REG PREFIX "ed"
104 #define TOTAL_HEIGHT_REG PREFIX "tot"
105 #define DELTA_REG PREFIX "delta"
106 #define DELIM_STRING PREFIX "delim"
107 #define DELIM_WIDTH_REG PREFIX "dwidth"
108 #define SAVED_FONT_REG PREFIX "sfont"
109 #define SAVED_PREV_FONT_REG PREFIX "spfont"
110 #define SAVED_INLINE_FONT_REG PREFIX "sifont"
111 #define SAVED_INLINE_PREV_FONT_REG PREFIX "sipfont"
112 #define SAVED_SIZE_REG PREFIX "ssize"
113 #define SAVED_INLINE_SIZE_REG PREFIX "sisize"
114 #define SAVED_INLINE_PREV_SIZE_REG PREFIX "sipsize"
115 #define SAVE_FONT_STRING PREFIX "sfont"
116 #define RESTORE_FONT_STRING PREFIX "rfont"
117 #define INDEX_REG PREFIX "i"
118 #define TEMP_MACRO PREFIX "tempmac"
120 #define DELIMITER_CHAR "\\(EQ"
122 const int CRAMPED_SCRIPT_STYLE = 0;
123 const int SCRIPT_STYLE = 1;
124 const int CRAMPED_DISPLAY_STYLE = 2;
125 const int DISPLAY_STYLE = 3;
127 extern int script_style(int);
128 extern int cramped_style(int);
130 const int ORDINARY_TYPE = 0;
131 const int OPERATOR_TYPE = 1;
132 const int BINARY_TYPE = 2;
133 const int RELATION_TYPE = 3;
134 const int OPENING_TYPE = 4;
135 const int CLOSING_TYPE = 5;
136 const int PUNCTUATION_TYPE = 6;
137 const int INNER_TYPE = 7;
138 const int SUPPRESS_TYPE = 8;
140 void set_script_size();
142 enum { HINT_PREV_IS_ITALIC = 01, HINT_NEXT_IS_ITALIC = 02 };
144 extern const char *current_roman_font;
146 #endif // _PBOX_H
147 // s-it2-mode