Template:Man
: {{{4}}} – {{{5}}}
To be used for inserting manual page links into articles on Unix topics.
Contents
Usage
Examples
In Out {{man|3|printf}}: {{{4}}} – {{{5}}} {{man|3|printf|||inline}}– inline {{man|3|printf|FreeBSD}}: {{{4}}} – {{{5}}} {{man|3|printf||formatted output conversion}}: formatted output conversion – {{{5}}}
Parameters
- Manual section
- Manual page name
- Source (the name of a subpage in the Template:Man namespace e.g. FreeBSD. Leave blank for the current default.)
- Page description
- Style parameter; currently
inlineomits the attribution.
Available sources
Please add to this table as you write new sources!
Source Example Result default[1] {{man|1|ls}}: {{{4}}} – {{{5}}} die.net {{man|1|ls|die.net}}: {{{4}}} – {{{5}}} Version 6 Unix {{man|1|ls|v6}}: {{{4}}} – {{{5}}} Version 7 Unix {{man|1|ls|v7}}: {{{4}}} – {{{5}}} 4.2BSD {{man|1|ls|4.2BSD}}: {{{4}}} – {{{5}}} 4.3BSD {{man|1|ls|4.3BSD}}: {{{4}}} – {{{5}}} 4.3BSD-Reno {{man|1|ls|4.3BSD-Reno}}: {{{4}}} – {{{5}}} 4.4BSD-Lite2 {{man|1|ls|4.4BSD-Lite2}}: {{{4}}} – {{{5}}} 9front {{man|1|ls|9front}}: {{{4}}} – {{{5}}} Darwin {{man|1|ls|Darwin}}: {{{4}}} – {{{5}}} Debian {{man|1|ls|Debian}}: {{{4}}} – {{{5}}} man.cx {{man|8|iptables|man.cx|inline}}– inline DragonFly BSD {{man|1|ls|DragonFly BSD}}: {{{4}}} – {{{5}}} FreeBSD {{man|1|ls|FreeBSD}}: {{{4}}} – {{{5}}} HP-UX {{man|1|ls|HP-UX}}: {{{4}}} – {{{5}}} Inferno {{man|1|ls|Inferno}}: {{{4}}} – {{{5}}} IRIX {{man|1|ls|IRIX}}: {{{4}}} – {{{5}}} BIND 9 {{man|1|named|BIND 9}}: {{{4}}} – {{{5}}} Linux[2] {{man|7|epoll|Linux}}: {{{4}}} – {{{5}}} ManKier[2] {{man|1|ls|ManKier}}: {{{4}}} – {{{5}}} MirOS BSD {{man|1|ls|MirOS BSD}}: {{{4}}} – {{{5}}} NetBSD {{man|1|ls|NetBSD}}: {{{4}}} – {{{5}}} OpenBSD {{man|1|ls|OpenBSD}}: {{{4}}} – {{{5}}} OpenSolaris {{man|1|ls|OpenSolaris}}: {{{4}}} – {{{5}}} perldoc[3] {{man|1|perlrun|perldoc}}: {{{4}}} – {{{5}}} Plan 9 {{man|1|ls|Plan 9}}: {{{4}}} – {{{5}}} Solaris {{man|1|ls|Solaris}}: {{{4}}} – {{{5}}} SUS[4] {{man|cu|ls|SUS}}SUS6[4] {{man|sh|putmsg|SUS6}}
- ↑ Redirects to the current default
- ↑ 2.0 2.1 Note: this covers all sections, including section 1 of the Linux user's manual and sections 2, 3, 4, 5, 6, 7, and 8 of the Linux programmer's manual.
- ↑ Note: this is the official documentation included with Perl. It does not contain general manual pages.
- ↑ 4.0 4.1 Note: the SUS pages use a non-numerical chapter system. A simple mapping is in place for human comfort.
Other sources
Occasionally you will come across manual pages for which writing a source is overkill. In this case you can use Template:man/format directly with a URL for formatting:
In Out {{man/format|1|dbx|http://.../dbx.1.html|source-level debugging tool|[[Sun Studio]] Developer's Manual}}: source-level debugging tool – Sun Studio Developer's Manual
The interface of Template:man/format is therefore externally visible and needs to be kept constant.
Hacking
Writing sources
A source takes three parameters:
- Manual section
- Manual page name
- Output selector:
attribfor attributionurlfor URL to pagedisplay_sectionfor section to display in parentheses.
See Template:Man/die.net for an example; see Template:Man/FreeBSD for a demonstration of varying the attribution by manual section.
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.