discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: Re: pod2mdoc, docbook2mdoc
Date: Thu, 03 Apr 2014 14:33:50 +0200	[thread overview]
Message-ID: <533D552E.1080407@bsd.lv> (raw)
In-Reply-To: <20140403121738.GA6386@danbala.tuwien.ac.at>

Thomas,

Thanks for the suggestions!  In general, most of these fall into the 
"Smarts" category.  My aim is to start with simple markup and 
properness, then get into the smarty stuff.  The biggest improvement 
since the last version is in non-library applications (e.g. 
libssl/src/doc/apps).

> Some suggestions:
> * foo() -> .Fn foo

I know that pod2man does this--that'd be an easy smart.

> * too many Ns before punctuation

This is a big one, but complicated to handle properly.  Getting the 
spacing right was really a nightmare.  Consider:

B<foo>B< bar>
B<foo >B<bar>
B<foo B<bar Z<>><B foo> >

and so on.  pod2mdoc does fine with all but one combination noted in the 
manual.  As mandoc(1) will ignore the superfluous "Nm", it's safer to 
leave it as-is than try to be smarter.

> * section number is 1 instead of 3 (not sure how to detect that)

perlpod says that, absent a suffix of ".pm", the manual should be 
considered a section 1.  I guess that ".pod" should be treated 
similarly--can you verify that?  I also have a #define for which section 
should be the Perl module section.  OpenBSD has 3p.  (And a note that 
pod2mdoc needs to be changed if it's redefined.)

> * .Bd -literal + #include <foo> + Ed -> .In foo

Yes, this is TODO for more Smarts.

> * splitting up the functions in the SYNOPSIS the same way is probably too much effort?

Same thing: more Smarts...

> Related question:
> How do people use Sy vs. Dv?

I use Dv for preprocessor symbols and NULL.  I've never used Sy on my 
own.  A fairly low-hanging smart would be to decorate NULL.

> I personally always mark up NULL as a Dv and similarly for most other
> defined C symbols.

Best,

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

  reply	other threads:[~2014-04-03 12:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sfid-H20140330-202333-+022.64-1@spamfilter.osbf.lua>
2014-03-30 18:23 ` Kristaps Dzonsons
2014-03-31  9:09   ` Thomas Klausner
2014-03-31 10:30     ` Kristaps Dzonsons
2014-03-31 16:13       ` Ingo Schwarze
2014-03-31 19:40         ` Kristaps Dzonsons
2014-03-31 20:57           ` Ingo Schwarze
2014-03-31 21:30             ` Thomas Klausner
2014-03-31 21:54               ` Kristaps Dzonsons
2014-03-31 22:21                 ` Ingo Schwarze
2014-03-31 22:31                   ` Thomas Klausner
2014-04-03 12:02                     ` Kristaps Dzonsons
2014-04-03 12:17                       ` Thomas Klausner
2014-04-03 12:33                         ` Kristaps Dzonsons [this message]
2014-04-03 13:53                           ` Ingo Schwarze
2014-04-03 16:51                             ` Kristaps Dzonsons
2014-04-03 22:06                             ` Thomas Klausner
2014-04-04 13:43                               ` Kristaps Dzonsons

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=533D552E.1080407@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).