diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-04-13 19:55:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-04-13 19:55:30 +0000 |
commit | 06eb86b87d44317103ec40cf10b2ed1e9f5d0927 (patch) | |
tree | c49ba9798cf58182e84eee8156504c0944a3f36e /mandoc.1 | |
parent | 44b03451934776b1030c9d5109114e98520bb4c2 (diff) | |
download | mandoc-06eb86b87d44317103ec40cf10b2ed1e9f5d0927.tar.gz mandoc-06eb86b87d44317103ec40cf10b2ed1e9f5d0927.tar.zst mandoc-06eb86b87d44317103ec40cf10b2ed1e9f5d0927.zip |
Use TIOCGWINSZ to reduce the default -Owidth during interactive use
on terminals narrower than 79 columns and the default -Oindent on
terminals narrower than 66 columns.
Requested by and feedback from pirofti@;
mpi@ and juanfra@ also like the general direction.
Diffstat (limited to 'mandoc.1')
-rw-r--r-- | mandoc.1 | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -1,4 +1,4 @@ -.\" $Id: mandoc.1,v 1.222 2018/03/16 15:05:44 schwarze Exp $ +.\" $Id: mandoc.1,v 1.223 2018/04/13 19:55:30 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 16 2018 $ +.Dd $Mdocdate: April 13 2018 $ .Dt MANDOC 1 .Os .Sh NAME @@ -299,9 +299,6 @@ The special characters documented in .Xr mandoc_char 7 are rendered best-effort in an ASCII equivalent. .Pp -Output width is limited to 78 visible columns unless literal input lines -exceed this limit. -.Pp The following .Fl O arguments are accepted: @@ -315,6 +312,8 @@ and seven for .Xr man 7 . Increasing this is not recommended; it may result in degraded formatting, for example overfull lines or ugly line breaks. +When output is to a pager on a terminal that is less than 66 columns +wide, the default is reduced to three columns. .It Cm mdoc Format .Xr man 7 @@ -331,7 +330,12 @@ output formats in the same way as the source it was generated from. .It Cm width Ns = Ns Ar width The output width is set to -.Ar width . +.Ar width +instead of the default of 78. +When output is to a pager on a terminal that is less than 79 columns +wide, the default is reduced to one less than the terminal width. +In any case, lines that are output in literal mode are never wrapped +and may exceed the output width. .El .Ss HTML Output Output produced by |