[MPlayer-dev-eng] man page rewrite

Jonas Jermann jjermann at gmx.net
Thu Sep 5 14:17:36 CEST 2002


Hi

I'm almost ready to start with the manpage rewrite (will only 
take a few hours).

I wrote a manpage.txt guide for the man page, if it's wanted,
I'll commit it too (tech). Maybe a general documentation.txt
would be better (for tech,wishlist,html,manpage), donno.

To the questions/comments:
    - May I start commiting?
    - mplayer.1.new is just a testing version (-cdda,-vc examples)
    - Should I commit in small pieces or all-in-one (IMO
      translator don't need to convert it anyway).
    - Some settings look great for man but bad for html. I took 
      the html compliant version.
    - The man page doesn't (didn't) comply with the standard in 
      some points (eg. italic parameters), but IMHO it looks ugly 
      so I let the old version.
    - I proposed a section order change based on Diego's idea
      (player, demuxer, osd, audio, video, decoding, encoding)
    - See manpage.txt for more details (comments are welcome)


Regards
    Jonas
-------------- next part --------------
A documentation about MPlayer's man page
========================================


About the documentation
-----------------------
This guide should be used as a reference for questions about the man page
structure. It's not a strict guide but we recommend following it to get a
uniform man page.


What belongs to the man page?
-----------------------------
    - option descriptions (all)
    - usage (options, config files, controls, slave mode)
    - basic examples


What doesn't belong to the man page?
------------------------------------
    - instructions of a process (installation, encoding, etc)
    - detailed valuations or hints
    - tutorials, guides


How should patches look like?
-----------------------------
Follow the rules in patches.txt, they apply to the man page too.
Exceptions are:
    - Cosmetic patches are allowed but should be done seperately from the real
      changes, be marked as cosmetic changes and shouldn't change the general
      style without reasons/permissions
    - The same applies for spellchecks


The structure
-------------
The options are divided into the the layer they belong to. The only exception
is the OSD/SUB section. Inside the section they're alphabetically ordered.

(Header)
    Not visible, copyright and author informations.
(Macro definitions)
    Not visible, some macro defintions.
NAME
    The manpage is used for both: mplayer and mencoder.
SYNOPSIS
    A description of MPlayer's playtree.
DESCRIPTION
    A general description of MPlayer, MEncoder, GMPlayer and its features.
GENERAL NOTES
    Some general notes about the options and a description of the config file
    format.
PLAYER OPTIONS (MPLAYER ONLY)
    Option descriptions about the user interface (mplayer only).
DEMUXER/STREAM OPTIONS
    Option descriptions about the demuxer and stream layer.
OSD/SUB OPTIONS
    This section is special: It contains all description about subtitles and
    OSD. It is independent of the usual layer separation and was created
    because of its size. The options may therefore come from any layer.
AUDIO OUTPUT OPTIONS (MPLAYER ONLY)
    Option descriptions about the audio output layer (ao) (mplayer only).
VIDEO OUTPUT OPTIONS (MPLAYER ONLY)
    Option descriptions about the video output layer (vo) (mplayer only).
DECODING/FILTERING OPTIONS
    Options about the decoding and filter layer (ad,vd,vf,pl).
ENCODING OPTIONS (MENCODER ONLY)
    Encoding option descriptions (ve) (mencoder only).
KEYBOARD CONTROL
    A description of MPlayer's input system and the default keyboard controls.
SLAVE MODE PROTOCOL
    A description about the slave mode protocol (-slave).
FILES
    A list and description of all installed/used files/directories.
EXAMPLES
    Basic examples. Again: no long descriptions/processes.
BUGS
AUTHORS
STANDARD DISCLAIMER


The man page/groff format
-------------------------
Just read this and rtfs:
    http://www.tldp.org/HOWTO/mini/Man-Page.html
    man 7 man
    man 7 groff


Directives for the internal "style"
-----------------------------------
It was kept simple but there are still certain directives/rules to get a
uniform man page. The best way is to read (and understand) the source.

General:
    - No line should contain more than 79 characters
    - Used commands: .TH, .SH, .TP, .IP, .[R]B, .I, .br, .RS, .RE, macro
                     definitions, comments
    - Don't forget the quotation marks around expressions or the backslash
      before a '-' if it's needed.

Separations:
    - Sections (.SH)   2 newlines before (3 visible because of .SH)
    - Options          not (it's done automatically over .TP)
    - Sub options      not (it's done automatically over .IP)
                       should be be separated over a comment (.) at the
                       beginning and the end to make the man page readable ;)
    - Examples         1 newline before
    - Big parts        better use .P (paragraph) or .br (equal to html's <BR>)
                       instead of newlines
    - In general       no newlines
                       never more than 2 spaces between anything

Option description:
    - Option and/or suboption parameters should be short and descriptive.
    - If the option is between a certain range, it should be specified at the
      beginning (eg. <0\-100> or <\-100 \- 100>)
    - All optional things are but between angular paranthesis ([])
    - Obsolete options are followed by (OBSOLETE), beta options by
      (BETA CODE), etc
    - MPlayer only options in a section which isn't marked this way
      are followed by (MPLAYER only)
    - Add hints to other options if they belong to each other
      eg. (\-vo zr only) or (see \-alang option too)
    - If a non trivial default parameter exist, write it down
      eg. (default: 24)
    - Options inside a section are all alphabetically ordered
    - Examples and notes at the end

Macro definitions (see beginning of man page):
    - SS      SS is the starting value of the suboption column
    - .IPs    Add new suboption (we use .TP for normal options and .IP for
              the rest)
    - .RSs    Begin of suboptions, end with .RE
    - .RSss   Begin of suboptions in a suboption
    - .REss   End of suboptions in a suboption

Options, sub options, examples structure:
    - Normal options (note the '<' and '>'):

      [...]
      .TP
      .B \-option <parameters>
      description
      [...]

    - Sub options:

      [...]
      description. Available options are:
      .
      .RSs
      .IPs "subopt1=<value>"
      description1
      .IPs "subopt2=<value>"
      description2
      [...]
      .IPs "last subopt=<value>"
      last description
      .RE
      .
      [...]

    - Sub options in sub options:

      [...]
      .IPs "subopt1=<value>"
      description1
      .RSss
      subsubopt1: description1
      .br
      subsubopt2: description2
      [...]
      .REss
      [...]

    - Examples (like sub options, note: no '.', newline before and ':' after
      .I EXAMPLE, .PD 0 before and .PD 1 after the examples):

      [...]
      
      .I EXAMPLE:
      .PD 0
      .RSs
      .IP "-option used parameters"
      description
      [...]
      .RE
      .PD 1
      [...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer.1.new.gz
Type: application/octet-stream
Size: 20892 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020905/2df228cc/attachment.obj>


More information about the MPlayer-dev-eng mailing list