discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Paul Onyschuk <blink@bojary.koba.pl>
To: discuss@mdocml.bsd.lv
Subject: Lengthy documentation in mdoc
Date: Sat, 2 Jul 2011 21:36:26 +0200	[thread overview]
Message-ID: <20110702213626.dda0b983.blink@bojary.koba.pl> (raw)

Hello, I'm looking into rewriting THE [1] (The Hessling Editor)
documentation in mdoc (for mandoc in mind). Some explanations:

Current state:
- THE documentation contains plain text files converted to html/pdf
(bad quality output)
- man page isn't useful at all

Why mandoc?
- one format and multiple outputs with better quality
- documentation in one place (semi-formats like markdown with pandoc
or POD only complicates situation)

Before jumping at me (Why you use tool that needs so much
documentation!?), be aware that THE comes from very different culture -
mainframes.

The good thing is that every command [2] in documentation has very
man-page-like structure.

So what's the problem? As I mentioned before, THE documentation is
mainly plain text, but it's about ~12k lines long [3].

I looked into multiple scenarios:
- splitting man page like zsh
- custom section like perl modules e.g. 3pm
- one big man page

And third options seems like best of worst. Navigation of big man page
can be problematic, but splitting it up doesn't help at all. Adding
another section to man pages isn't option at all.

Another reason for one fat page, are documentation references as seen in
ADD command. I came up with idea of abusing sub-sections (every command
is sub-section) and using Sx macro for references.

Example template would look more-or-less like this:

> .Sh COMMANDS
>   (...)
> .Ss ADD
> add blank line
> .Bl -tag -width 1m
> .It Syntax:
> .Cm Add Op Ar n
> .It Description:
> If
> .Sx SET NEWLINES
> is set to ALIGNED, the cursor is positioned
>   (...)
> .It Compatibility:
> XEDIT: Compatible.
> .Pp
> KEDIT: Compatible.
> .It Default:
> 1
> .It See Also:
> .Sx SOS ADDLINE
> .It Status:
> Complete
> .El
>   (...)
> .Sh OPTIONS
> .Ss SET NEWLINES
>   (...)

This way html output and so on will use sub-sections references as
links. Although this requiers few dozen sub-sections (I wouldn't be
surprised if number is 200+).

So end users will enjoy (?) one fat man page, but developers will work
on smaller files. Every command will be separate file "cated" by
makefile at build time. It easier to work on smaller chunks.

I'm looking for opinions from people with more experience in working
with mdoc. Maybe there is better solution for this? Am I creating
another man-page abomination or using wrong tool?

Overall I wanted to ask this questions, before actual work.

btw. Thank you Kristaps and Ingo for creating/maintaining great tool
and everyone else involved with mandoc. Apologies for my "english"
writing.


[1] http://hessling-editor.sourceforge.net/
[2] http://hessling-editor.sourceforge.net/doc/comm/ADD.html
[3] http://blinkkin.github.com/the/the.man

-- 
Paul Onyschuk <blink@bojary.koba.pl>
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2011-07-02 19:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 19:36 Paul Onyschuk [this message]
2011-07-02 20:37 ` Ingo Schwarze
2011-07-02 21:14   ` Kristaps Dzonsons
2011-07-02 22:58   ` Paul Onyschuk
2011-07-03  9:31   ` Jukka Ruohonen
2011-07-03 11:38     ` Kristaps Dzonsons
2011-07-03 16:09       ` Jukka Ruohonen
2011-07-03 15:52     ` Ingo Schwarze
2011-07-05 12:24 ` Paul Onyschuk

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=20110702213626.dda0b983.blink@bojary.koba.pl \
    --to=blink@bojary.koba.pl \
    --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).