summaryrefslogtreecommitdiffstats
path: root/eqn.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 14:05:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 14:05:11 +0000
commitd6dd8aa69b82d133439dd5f648f21afc723ce7ef (patch)
treedfa60281353822f03d401020fdf338bb2ee3f96d /eqn.c
parente043d8c809b13f0720f27dcca52588d79f954ac0 (diff)
downloadmandoc-d6dd8aa69b82d133439dd5f648f21afc723ce7ef.tar.gz
Parse from/to clauses in eqn.
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/eqn.c b/eqn.c
index 6fb9e236..a012af0d 100644
--- a/eqn.c
+++ b/eqn.c
@@ -195,13 +195,14 @@ static const struct eqnstr eqnfonts[EQNFONT__MAX] = {
};
static const struct eqnstr eqnposs[EQNPOS__MAX] = {
- { "", 0 }, /* EQNPOS_NONE */
+ { NULL, 0 }, /* EQNPOS_NONE */
{ "over", 4 }, /* EQNPOS_OVER */
{ "sup", 3 }, /* EQNPOS_SUP */
{ NULL, 0 }, /* EQNPOS_SUPSUB */
{ "sub", 3 }, /* EQNPOS_SUB */
{ "to", 2 }, /* EQNPOS_TO */
{ "from", 4 }, /* EQNPOS_FROM */
+ { NULL, 0 }, /* EQNPOS_FROMTO */
};
static const struct eqnstr eqnpiles[EQNPILE__MAX] = {
@@ -591,6 +592,10 @@ eqn_box(struct eqn_node *ep, struct eqn_box *last)
NULL != last->last->prev &&
EQNPOS_SUB == last->last->prev->pos)
last->last->prev->pos = EQNPOS_SUBSUP;
+ else if (EQNPOS_TO == i &&
+ NULL != last->last->prev &&
+ EQNPOS_FROM == last->last->prev->pos)
+ last->last->prev->pos = EQNPOS_FROMTO;
else
last->last->pos = (enum eqn_post)i;