aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--eqn.c9
-rw-r--r--mandoc.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/eqn.c b/eqn.c
index cc402880..7bb956d5 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.46 2014/09/28 11:32:08 kristaps Exp $ */
+/* $Id: eqn.c,v 1.47 2014/09/28 14:05:11 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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;
diff --git a/mandoc.h b/mandoc.h
index eff67b81..bf1c061b 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.157 2014/09/28 11:32:08 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.158 2014/09/28 14:05:11 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -340,6 +340,7 @@ enum eqn_post {
EQNPOS_SUB,
EQNPOS_TO,
EQNPOS_FROM,
+ EQNPOS_FROMTO,
EQNPOS__MAX
};