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
 * die.net ||||
 * default ||||
 * Darwin||||
 * FreeBSD||||
 * Linux||||
 * NetBSD||||
 * OpenBSD||||
 * Plan 9||||
 * SUS||||
 * Solaris||||
 * }
 * NetBSD||||
 * OpenBSD||||
 * Plan 9||||
 * SUS||||
 * Solaris||||
 * }
 * SUS||||
 * Solaris||||
 * }
 * }

|| 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.