Tom Christiansen wrote: > In-Reply-To: Message from Nicholas Clark <nick@ccl4.org> > of "Tue, 06 Apr 2010 13:52:19 BST." > <20100406125219.GT9998@plum.flirble.org> > >>> BTW, the reason why examples like this: >>> >>> # 0 1 2 3 4 5 6 7 8 >>> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = >>> localtime(time); >>> >>> are *not* written >>> >>> >>> # 0 1 2 3 4 5 6 7 8 >>> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = >>> localtime(time); >>> >>> is due to the default nroff line length. > >> What is the default nroff line length? > > It depends on your system, but it's often 6.5i. On others, > it may be determined by your screen size. > > A good rule of thumb is to try to keep the total line, including > the leading whitespace indent that the -man macros add, to under > 80 columns in nroff. > > If you set your terminal to 80 columns wide, you can see the > wraps pretty quickly. It doesn't look so good. > > This checks for those and reports which lines are too long and by > how much, after discarding the overstrikes: > > nroff -man file | perl -nle 's/.\cH//g; print length," $.: $_" if length>79' > >> And do we have any sort of Pod linter in core that will warn if our >> preformatted sections are "too" wide, such that they'd render to badly >> formatted man page? > > podchecker? > > --tom > I hacked podchecker to do this; it takes a long time and shows around 12K lines that are longer than this (79 - 8, which is the nroff indent that I've always found).Thread Previous | Thread Next