discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Warren Block <wblock@wonkity.com>
To: discuss@mdocml.bsd.lv
Subject: Re: Formatting long commands in examples
Date: Mon, 15 Dec 2014 16:28:50 -0700 (MST)	[thread overview]
Message-ID: <alpine.BSF.2.11.1412151627260.25441@wonkity.com> (raw)
In-Reply-To: <20141214065314.GA13217@iris.usta.de>

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

      reply	other threads:[~2014-12-15 23:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14  1:15 Warren Block
2014-12-14  6:53 ` Ingo Schwarze
2014-12-15 23:28   ` Warren Block [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.BSF.2.11.1412151627260.25441@wonkity.com \
    --to=wblock@wonkity.com \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).