version 1.85, 2011/07/21 13:18:24 |
version 1.88, 2011/07/21 15:21:13 |
Line 298 enum eqn_markt { |
|
Line 298 enum eqn_markt { |
|
EQNMARK__MAX |
EQNMARK__MAX |
}; |
}; |
|
|
/* |
enum eqn_fontt { |
|
EQNFONT_NONE = 0, |
|
EQNFONT_ROMAN, |
|
EQNFONT_BOLD, |
|
EQNFONT_ITALIC, |
|
EQNFONT__MAX |
|
}; |
|
|
|
enum eqn_post { |
|
EQNPOS_NONE = 0, |
|
EQNPOS_OVER, |
|
EQNPOS_SUP, |
|
EQNPOS_SUB, |
|
EQNPOS_TO, |
|
EQNPOS_FROM, |
|
EQNPOS_ABOVE, |
|
EQNPOS__MAX |
|
}; |
|
|
|
/* |
* A "box" is a parsed mathematical expression as defined by the eqn.7 |
* A "box" is a parsed mathematical expression as defined by the eqn.7 |
* grammar. |
* grammar. |
*/ |
*/ |
struct eqn_box { |
struct eqn_box { |
|
int size; /* font size of expression */ |
|
#define EQN_DEFSIZE INT_MIN |
enum eqn_boxt type; /* type of node */ |
enum eqn_boxt type; /* type of node */ |
struct eqn_box *child; /* child node */ |
struct eqn_box *child; /* child node */ |
struct eqn_box *next; /* next in tree */ |
struct eqn_box *next; /* next in tree */ |
|
enum eqn_post pos; /* position of next box */ |
char *text; /* text (or NULL) */ |
char *text; /* text (or NULL) */ |
enum eqn_markt mark; /* whether 'marked' */ |
enum eqn_markt mark; /* a mark about the box */ |
|
enum eqn_fontt font; /* font of box */ |
}; |
}; |
|
|
|
/* |
|
* An equation consists of a tree of expressions starting at a given |
|
* line and position. |
|
*/ |
struct eqn { |
struct eqn { |
struct eqn_box *root; /* root mathematical expression */ |
struct eqn_box *root; /* root mathematical expression */ |
int ln; /* invocation line */ |
int ln; /* invocation line */ |