diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 18:52:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 18:52:51 +0000 |
commit | 47db65ad999dc86c2eee8b1ea8c9066a5accae10 (patch) | |
tree | ae7ccce86359ee4c7dcca76a383a74955dd2401a | |
parent | 11d090857365b38952fcebea7015e2d8b3bcf3e9 (diff) | |
download | mandoc-47db65ad999dc86c2eee8b1ea8c9066a5accae10.tar.gz |
Give man(7) section and subsection headers hanging indentation.
Reduces groff-mandoc differences in base by about 2.5% due to
various Perl manuals having long section titles.
Quirk found in argtable2(3).
-rw-r--r-- | man_term.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -768,9 +768,15 @@ pre_SS(DECL_ARGS) case ROFFT_HEAD: term_fontrepl(p, TERMFONT_BOLD); p->offset = term_len(p, 3); + p->rmargin = mt->offset; + p->trailspace = mt->offset; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; break; case ROFFT_BODY: p->offset = mt->offset; + p->rmargin = p->maxrmargin; + p->trailspace = 0; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); break; default: break; @@ -823,9 +829,15 @@ pre_SH(DECL_ARGS) case ROFFT_HEAD: term_fontrepl(p, TERMFONT_BOLD); p->offset = 0; + p->rmargin = mt->offset; + p->trailspace = mt->offset; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; break; case ROFFT_BODY: p->offset = mt->offset; + p->rmargin = p->maxrmargin; + p->trailspace = 0; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); break; default: break; |