summaryrefslogtreecommitdiffstats
path: root/tbl_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-05-27 18:02:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-05-27 18:02:49 +0000
commit9cb145fd314aa82570045efbf93cbba5301762b5 (patch)
treeda4a15ed191b22febd4a4a989143ad126f4c7061 /tbl_term.c
parentfb13aa623b3cf28e077ca2d095f527be1fd24fb0 (diff)
downloadmandoc-9cb145fd314aa82570045efbf93cbba5301762b5.tar.gz
Fix the vertical spacing around tbl(7) instances in man(7).
Groff forces the document author to manually request sufficient spacing after .TE - that is, at least .sp 1v after a table with the "box" option and at least .sp 2v after a table with the "doublebox" option - or else it clobbers the box. I consider that insane, so i'm not imitating groff in that respect. Instead, i add at least as much vertical space as groff, or more where required to avoid clobbering the box. Consequently, output will be identical for input that looks sane with groff, and mandoc will make output look better for input that looks bad with groff. "Please check them in and I'll look into them later!" kristaps@
Diffstat (limited to 'tbl_term.c')
-rw-r--r--tbl_term.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tbl_term.c b/tbl_term.c
index 94f6ecc3..7d28711f 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -171,10 +171,14 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
if (TBL_SPAN_LAST & sp->flags) {
if (TBL_OPT_DBOX & sp->tbl->opts ||
- TBL_OPT_BOX & sp->tbl->opts)
+ TBL_OPT_BOX & sp->tbl->opts) {
tbl_hframe(tp, sp, 0);
- if (TBL_OPT_DBOX & sp->tbl->opts)
+ tp->skipvsp = 1;
+ }
+ if (TBL_OPT_DBOX & sp->tbl->opts) {
tbl_hframe(tp, sp, 1);
+ tp->skipvsp = 2;
+ }
assert(tp->tbl.cols);
free(tp->tbl.cols);
tp->tbl.cols = NULL;