summaryrefslogtreecommitdiffstats
path: root/mandoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 14:13:00 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 14:13:00 +0000
commitfaba8b69bbb1a57a9980aa454612ab8cca95e93a (patch)
tree33fe5371dd53025f8af04366049bd8871ac78fbf /mandoc.h
parent62a9685b8f83f61948148be5fd01ec614799aeea (diff)
downloadmandoc-faba8b69bbb1a57a9980aa454612ab8cca95e93a.tar.gz
Full support for eqn positionals (above, over, sup, sub, etc.).
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/mandoc.h b/mandoc.h
index 231497e9..68ae3b02 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -306,6 +306,17 @@ enum eqn_fontt {
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
* grammar.
@@ -314,11 +325,16 @@ struct eqn_box {
enum eqn_boxt type; /* type of node */
struct eqn_box *child; /* child node */
struct eqn_box *next; /* next in tree */
+ enum eqn_post pos; /* position of next box */
char *text; /* text (or NULL) */
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_box *root; /* root mathematical expression */
int ln; /* invocation line */