From 610da288ad1c36332f5bc333692f49e2326fa30d Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 21 Jul 2011 14:13:00 +0000 Subject: Full support for eqn positionals (above, over, sup, sub, etc.). --- mandoc.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 4e14f44f..cd29e688 100644 --- a/mandoc.h +++ b/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.86 2011/07/21 13:37:04 kristaps Exp $ */ +/* $Id: mandoc.h,v 1.87 2011/07/21 14:13:00 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * @@ -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 */ -- cgit v1.2.3-56-ge451