From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o63GRbCo024085 for ; Sat, 3 Jul 2010 12:27:38 -0400 (EDT) Received: from smtp-2.sys.kth.se (localhost [127.0.0.1]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 8349F14C133 for ; Sat, 3 Jul 2010 18:27:32 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([127.0.0.1]) by smtp-2.sys.kth.se (smtp-2.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0FOK4lQ3Qu1k for ; Sat, 3 Jul 2010 18:27:21 +0200 (CEST) X-KTH-Auth: kristaps [130.237.221.96] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: discuss@mdocml.bsd.lv Received: from [130.237.221.96] (ctime.pdc.kth.se [130.237.221.96]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 6E07014C022 for ; Sat, 3 Jul 2010 18:27:21 +0200 (CEST) Message-ID: <4C2F644F.3070307@bsd.lv> Date: Sat, 03 Jul 2010 18:24:47 +0200 From: Kristaps Dzonsons User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 To: discuss@mdocml.bsd.lv Subject: Re: desired .Bk semantics? References: <20100702234320.GC6026@iris.usta.de> <20100703065442.GA5970@bramka.kerhand.co.uk> <4C2F2CA9.2030209@bsd.lv> <20100703141126.GB20174@bramka.kerhand.co.uk> In-Reply-To: <20100703141126.GB20174@bramka.kerhand.co.uk> Content-Type: multipart/mixed; boundary="------------070805050401080308010301" This is a multi-part message in MIME format. --------------070805050401080308010301 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > i agree (with kristaps). > >> What we should do is ignore `Bk' and follow an easy algorithm for >> SYNOPSIS mode regarding breaking between children. This, I think, is >> easier for us and manual writers alike. >> > > absolutely! SYNOPSIS is a hugely important part of the page - it's the > first thing people see. and we don;t want it looking like shit. and we > don;t want man page writers fannying around trying to make it look ok. > it should just work sanely. > >> Is `Bk' used often outside of this where .nr nS 1 is otherwise >> unacceptable (like those OpenBSD .9 manuals)? >> > > it is a synopsis-only thing. obviously we sometimes have mini synopses > outside the main SYNOPSIS section. in those cases we could currently > find Bk. i'm not aware of any other places it would normally occur. Ingo and Jason, I propose the following. I've enclosed a patch that demonstrates this. First, I disabled `Bk' completely. Second, when `Op' or `Oo' is encountered with MDOC_SYNPRETTY (i.e., in a SYNOPSIS section or with ".nr nS 1"), spaces are made non-breaking. Example (mandoc -Owidth=70 ssh.1): SYNOPSIS ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] Note: this is after removing the escaped spaces that the manual author had added here and there. Example (mandoc -Owidth=70 spamd.8): spamd [-45bdv] [-B maxblack] [-c maxcon] [-G passtime:greyexp:whiteexp] [-h hostname] [-l address] [-M address] [-n name] [-p port] [-S secs] [-s secs] [-w window] [-Y synctarget] [-y synclisten] This removes the `Bk' mess and gives a nice, regular algorithm for formatting in MDOC_SYNPRETTY. It can/will be trivially extended to the function macros, Fa and Fn and family. Thoughts? Kristaps --------------070805050401080308010301 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="patch.txt" SW5kZXg6IG1kb2NfdGVybS5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC91c3Ivdmhvc3Rz L21kb2Ntb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