diff options
author | 2014-10-09 15:59:08 +0000 | |
---|---|---|
committer | 2014-10-09 15:59:08 +0000 | |
commit | a3108a0a5cf9406eb1a0c601e030ce036c88793d (patch) | |
tree | e267dc3cb3983fcb4f46e0d805fc621902979c60 /usr.bin/mandoc/eqn_html.c | |
parent | initial bits of MathML rendering for eqn(7) -Thtml; (diff) | |
download | wireguard-openbsd-a3108a0a5cf9406eb1a0c601e030ce036c88793d.tar.xz wireguard-openbsd-a3108a0a5cf9406eb1a0c601e030ce036c88793d.zip |
parse and render "from" and "to" clauses in eqn, and render matrices;
written by kristaps@ during EuroBSDCon
Diffstat (limited to 'usr.bin/mandoc/eqn_html.c')
-rw-r--r-- | usr.bin/mandoc/eqn_html.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/usr.bin/mandoc/eqn_html.c b/usr.bin/mandoc/eqn_html.c index 004b7457cf4..8c75cb5e6ae 100644 --- a/usr.bin/mandoc/eqn_html.c +++ b/usr.bin/mandoc/eqn_html.c @@ -1,4 +1,4 @@ -/* $Id: eqn_html.c,v 1.3 2014/10/09 15:49:09 schwarze Exp $ */ +/* $Id: eqn_html.c,v 1.4 2014/10/09 15:59:08 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -84,6 +84,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. @@ -103,19 +108,26 @@ eqn_box(struct html *p, const struct eqn_box *bp, int next) * single or double following expression. */ switch (bp->pos) { + case (EQNPOS_TO): + post = print_otag(p, TAG_MOVER, 0, NULL); + break; case (EQNPOS_SUP): post = print_otag(p, TAG_MSUP, 0, NULL); break; case (EQNPOS_FROM): - /* FALLTHROUGH */ + post = print_otag(p, TAG_MUNDER, 0, NULL); + break; case (EQNPOS_SUB): post = print_otag(p, TAG_MSUB, 0, NULL); break; case (EQNPOS_OVER): post = print_otag(p, TAG_MFRAC, 0, NULL); break; + case (EQNPOS_FROMTO): + post = print_otag(p, TAG_MUNDEROVER, 0, NULL); + skiptwo = 1; + break; case (EQNPOS_SUBSUP): - /* This requires two elements. */ post = print_otag(p, TAG_MSUBSUP, 0, NULL); skiptwo = 1; break; |