diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-12 17:58:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-12 17:58:21 +0000 |
commit | 3fec44d9300e7b532fd53472f9ad052381c17bc7 (patch) | |
tree | 5c059e3e395f9380ab660604ac93320f5f9fbd38 /html.c | |
parent | 39734eb01d30f4fff1da35538dbe086698bf9d43 (diff) | |
download | mandoc-3fec44d9300e7b532fd53472f9ad052381c17bc7.tar.gz mandoc-3fec44d9300e7b532fd53472f9ad052381c17bc7.tar.zst mandoc-3fec44d9300e7b532fd53472f9ad052381c17bc7.zip |
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.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.210 2017/03/15 11:29:53 schwarze Exp $ */ +/* $Id: html.c,v 1.211 2017/05/12 17:58:21 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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(); |