From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wonkity.com (wonkity.com [67.158.26.137]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 9385765a; for ; Mon, 15 Dec 2014 18:28:59 -0500 (EST) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id sBFNSvsq025807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 15 Dec 2014 16:28:58 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id sBFNSoOR025793 for ; Mon, 15 Dec 2014 16:28:57 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 15 Dec 2014 16:28:50 -0700 (MST) From: Warren Block To: discuss@mdocml.bsd.lv Subject: Re: Formatting long commands in examples In-Reply-To: <20141214065314.GA13217@iris.usta.de> Message-ID: References: <20141214065314.GA13217@iris.usta.de> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 15 Dec 2014 16:28:58 -0700 (MST) On Sun, 14 Dec 2014, Ingo Schwarze wrote: > My recommendation for displaying complete example command lines, > in general, is indeed .Dl. When that gets too long and wraps, > you can sometimes improve formatting by breaking it into a multi-line > literal display, in a way permitted by the syntax of the target > language, in this case, sh(1). So my recommendation would be: > > .Dd December 14, 2014 > .Dt TEST 1 > .Os > .Sh NAME > .Nm test > .Nd for Warren > .Sh DESCRIPTION > .Bd -literal -offset indent > binmiscctl add mips64elf \e > --interpreter "/usr/local/bin/qemu-mips64-static" \e > --magic "\ex7f\ex45\ex4c\ex46\ex02\ex02\ex01\ex00\ex00\ex00\e > \ex00\ex00\ex00\ex00\ex00\ex00\ex00\ex02\ex00\ex08" \e > --mask "\exff\exff\exff\exff\exff\exff\exff\ex00\exff\exff\e > \exff\exff\exff\exff\exff\exff\exff\exfe\exff\exff" \e > --size 20 --set-enabled > .Ed > >> Is there a "least bad" way? > > The above seems good rather than least bad, does it? > > It is fully portable and formats byte-for-byte identically > with groff and mandoc. Perfect! Thank you! -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv