aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 14:06:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 14:06:09 +0000
commitc74c8fc0039c665280a44e7cac275672b7045885 (patch)
treef3082af161e9444304a7cd3a65f8658c97b56318 /eqn_html.c
parent7acc90b842aabe0b6da7a3041b0a210a151ef85f (diff)
downloadmandoc-c74c8fc0039c665280a44e7cac275672b7045885.tar.gz
mandoc-c74c8fc0039c665280a44e7cac275672b7045885.tar.zst
mandoc-c74c8fc0039c665280a44e7cac275672b7045885.zip
Crudely accomodate for matrices by way of adjacent tables. We don't do this
nicely right now because eqn uses column ordering. Also add from/to support and to support.
Diffstat (limited to 'eqn_html.c')
-rw-r--r--eqn_html.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/eqn_html.c b/eqn_html.c
index fd77b919..135ff992 100644
--- a/eqn_html.c
+++ b/eqn_html.c
@@ -1,4 +1,4 @@
-/* $Id: eqn_html.c,v 1.5 2014/09/28 13:34:15 kristaps Exp $ */
+/* $Id: eqn_html.c,v 1.6 2014/09/28 14:06:09 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -88,6 +88,11 @@ eqn_box(struct html *p, const struct eqn_box *bp, int next)
pilet = print_otag(p, TAG_MTR, 0, NULL);
print_otag(p, TAG_MTD, 0, NULL);
}
+ if (NULL != bp->parent && bp->parent->type == EQN_MATRIX) {
+ pilet = print_otag(p, TAG_MTABLE, 0, NULL);
+ print_otag(p, TAG_MTR, 0, NULL);
+ print_otag(p, TAG_MTD, 0, NULL);
+ }
/*
* If we're establishing a pile, start the table mode now.
@@ -107,6 +112,8 @@ eqn_box(struct html *p, const struct eqn_box *bp, int next)
* single or double following expression.
*/
switch (bp->pos) {
+ case (EQNPOS_TO):
+ /* FALLTHROUGH */
case (EQNPOS_SUP):
post = print_otag(p, TAG_MSUP, 0, NULL);
break;
@@ -118,6 +125,8 @@ eqn_box(struct html *p, const struct eqn_box *bp, int next)
case (EQNPOS_OVER):
post = print_otag(p, TAG_MFRAC, 0, NULL);
break;
+ case (EQNPOS_FROMTO):
+ /* FALLTHROUGH */
case (EQNPOS_SUBSUP):
/* This requires two elements. */
post = print_otag(p, TAG_MSUBSUP, 0, NULL);