Template:Man/doc

To be used for inserting manual page links into articles on Unix topics.

Examples

 * {|class="wikitable"

!In !! Out
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }

Parameters

 * 1) Manual section
 * 2) Manual page name
 * 3) Source (the name of a subpage in the Template:Man namespace e.g. FreeBSD. Leave blank for the current default.)
 * 4) Page description
 * 5) Style parameter; currently   omits the attribution.

Available sources
Please add to this table as you write new sources!
 * {|class="wikitable"

!Source!!Example!!Result
 * default ||||
 * die.net||||
 * Version 6 Unix||||
 * Version 7 Unix||||
 * 4.2BSD||||
 * 4.3BSD||||
 * 4.3BSD-Reno||||
 * 4.4BSD-Lite2||||
 * 9front||||
 * Darwin||||
 * Debian||||
 * man.cx||||
 * DragonFly BSD||||
 * FreeBSD||||
 * HP-UX||||
 * Inferno||||
 * IRIX||||
 * Linux ||||
 * ManKier ||||
 * MirOS BSD||||
 * NetBSD||||
 * OpenBSD||||
 * OpenSolaris||||
 * perldoc ||||
 * Plan 9||||
 * Solaris||||
 * SUS ||||
 * SUS6 ||||
 * }
 * HP-UX||||
 * Inferno||||
 * IRIX||||
 * Linux ||||
 * ManKier ||||
 * MirOS BSD||||
 * NetBSD||||
 * OpenBSD||||
 * OpenSolaris||||
 * perldoc ||||
 * Plan 9||||
 * Solaris||||
 * SUS ||||
 * SUS6 ||||
 * }
 * OpenSolaris||||
 * perldoc ||||
 * Plan 9||||
 * Solaris||||
 * SUS ||||
 * SUS6 ||||
 * }
 * Solaris||||
 * SUS ||||
 * SUS6 ||||
 * }
 * SUS6 ||||
 * }

|| The interface of Template:man/format is therefore externally visible and needs to be kept constant.
 * }

Writing sources
A source takes three parameters: See Template:Man/die.net for an example; see Template:Man/FreeBSD for a demonstration of varying the attribution by manual section.
 * 1) Manual section
 * 2) Manual page name
 * 3) Output selector:
 * 4) * for attribution
 * 5) * for URL to page
 * 6) * for section to display in parentheses.

Internals
Template:man handles choosing the default source and calling it for URL and attribution; the default source is Template:man/default, which is a template redirect currently to Template:man/die.net. Template:man/format actually formats the link and descriptions into a nice-looking link+auxilia in Unix style.