summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-12 17:58:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-12 17:58:21 +0000
commitb5dc2a38cb6196ba190ee2a75bc4d0cb0e0856ea (patch)
tree1b0fbf6fb91332a4b5a9b2365e959aa466971a11 /html.c
parent05c1408b281441f3ec02a7ae478be405fab9635a (diff)
downloadmandoc-b5dc2a38cb6196ba190ee2a75bc4d0cb0e0856ea.tar.gz
Make the tag column in .Bl -tag lists wider:
1. I forgot about the 2n padding between tag and body. 2. The factor 1.1 was too small for bold fold, make it *1.15 + 1n. Ugliness spotted by tb@.
Diffstat (limited to 'html.c')
-rw-r--r--html.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/html.c b/html.c
index ed076eaa..b55a1ecc 100644
--- a/html.c
+++ b/html.c
@@ -609,15 +609,21 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
SCALE_VS_INIT(su, i);
break;
case 'w':
- case 'W':
if ((arg2 = va_arg(ap, char *)) == NULL)
break;
su = &mysu;
a2width(arg2, su);
- /* Increase width to make even bold text fit. */
- su->scale *= 1.1;
- if (fmt[-1] == 'W')
+ if (*fmt == '+') {
+ /* Increase to make even bold text fit. */
+ su->scale *= 1.15;
+ /* Add padding. */
+ su->scale += 3.0;
+ fmt++;
+ }
+ if (*fmt == '-') {
su->scale *= -1.0;
+ fmt++;
+ }
break;
default:
abort();