From 649dab7767736385ee7f2c1b882372a9de74ddfb Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 27 May 2012 18:02:49 +0000 Subject: 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@ --- term.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 4ca15ed6..3dadb7e4 100644 --- a/term.c +++ b/term.c @@ -1,7 +1,7 @@ -/* $Id: term.c,v 1.201 2011/09/21 09:57:13 schwarze Exp $ */ +/* $Id: term.c,v 1.202 2012/05/27 18:02:49 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010, 2011 Ingo Schwarze + * Copyright (c) 2010, 2011, 2012 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -316,7 +316,10 @@ term_vspace(struct termp *p) term_newln(p); p->viscol = 0; - (*p->endline)(p); + if (0 < p->skipvsp) + p->skipvsp--; + else + (*p->endline)(p); } void -- cgit v1.2.3-56-ge451