discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: "discuss@mdocml.bsd.lv" <discuss@mdocml.bsd.lv>
Subject: Re: Giving up on emulating SYNOPSIS vspace.
Date: Mon, 07 Jun 2010 13:12:15 +0200	[thread overview]
Message-ID: <4C0CD40F.70402@bsd.lv> (raw)
In-Reply-To: <20100606234253.GA24356@bramka.kerhand.co.uk>

> i propose you do whatever you think makes sense: a simple synopsis with
> workable rules is preferable to a bug-compatible groff.

Done and committed.  Ingo, please let me know if you experience fall-out
and we can tweak as necessary.  If it's ok, I'll tag the version and we
can move on.

From mdoc.7 (note, by the way, mandoc(1) has a new output option
-Owidth=xxx that allows me to paste this into this mail so nicely):

       SYNOPSIS
       Documents the utility invocation syntax, function call
       syntax, or device configuration.

       For the first, utilities (sections 1, 6, and 8), this is
       generally structured as follows:

             .Nm foo
             .Op Fl v
             .Op Fl o Ar file
             .Op Ar
             .Nm bar
             .Op Fl v
             .Op Fl o Ar file
             .Op Ar

       For the second, function calls (sections 2, 3, 9):

             .Vt extern const char *global;
             .In header.h
             .Ft "char *"
             .Fn foo "const char *src"
             .Ft "char *"
             .Fn bar "const char *src"

       And for the third, configurations (section 4):

             .Cd "it* at isa? port 0x2e"
             .Cd "it* at isa? port 0x4e"

       Manuals not in these sections generally don't need a
       SYNOPSIS.

       Some macros are displayed differently in the SYNOPSIS
       section, particularly Nm, Cd, Fd, Fn, Fo, In, Vt, and Ft.
       All of these macros are output on their own line.  If two
       such dissimilar macros are pair-wise invoked (except for Ft
       before Fo or Fn), they are separated by a vertical space,
       unless in the case of Fo, Fn, and Ft, which are always
       separated by vertical space.


> i know you don;t want to talk about the simpler cases but i have to add:
> can we make synopsis nice please? Bk/Ek is broken, and we need a nice
> synopsis. are we far away? let's take this from openbsd's isakmpd.8:
> 
> 	isakmpd [-46adKLnSTv] [-c config-file] [-D class=level] [-f fifo] [-i
> 	pid-file] [-l packetlog-file] [-N udpencap-port] [-p listen-port] [-R
> 	report-file]
> 
> i'd like this, by default:
> 
> 	isakmpd [-46adKLnSTv] [-c config-file] [-D class=level] [-f fifo]
> 		[-i pid-file] [-l packetlog-file] [-N udpencap-port]
> 		[-p listen-port] [-R report-file]
> 
> ignore any crappy Bk/Ek stuff. just format nicely please. it's a real
> killer for mandoc right now, i feel. by the way, it's how groff
> currently formats it. i've no idea if it's coincidence or sth else.

One of the reasons of fixing vertical spacing was to pave the way for
this.  Before doing so, there was too much chaos between -T[x]html and
-Tascii in the various macro handlers.  It's much nicer now.

Thanks,

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2010-06-07 11:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-06 23:18 Kristaps Dzonsons
2010-06-06 23:42 ` Jason McIntyre
2010-06-07 11:12   ` Kristaps Dzonsons [this message]
2010-06-07 23:26     ` Ingo Schwarze
2010-06-07 23:42       ` Kristaps Dzonsons
2010-06-08  0:06         ` Ingo Schwarze
2010-06-08  9:13           ` OT: Vt vs. Ft/Fn (WAS: Giving up on emulating SYNOPSIS vspace.) Kristaps Dzonsons
2010-06-08 10:02             ` Thomas Klausner
2010-06-08 12:06               ` Kristaps Dzonsons
2010-06-12 18:05                 ` Vt vs. Ft/Fn Ingo Schwarze
2010-06-07  0:35 ` Giving up on emulating SYNOPSIS vspace Ingo Schwarze

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=4C0CD40F.70402@bsd.lv \
    --to=kristaps@bsd.lv \
    --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).