模板:Man/doc
此頁面是Template:Man的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
此模板的文檔不存在、不全面或不能詳細描述其功能及/或其代碼中的參數。請幫助擴充並改進其文檔。 |
To be used for inserting 手冊頁 links into articles on Unix topics.
Usage
Examples
In Out {{man|3|printf}}
單一UNIX®規範第7期,由國際開放標準組織發布 – 參考,{{man|3|printf|||inline}}
{{man|3|printf|FreeBSD}}
FreeBSD庫函數(Library Functions)手冊頁 –{{man|3|printf||formatted output conversion}}
單一UNIX®規範第7期,由國際開放標準組織發布 : formatted output conversion – 參考,
Parameters
- Manual section
- Manual page name
- Source (the name of a subpage in the Template:Man 命名空間 e.g. FreeBSD. Leave blank for the current default.)
- Page description
- Style parameter; currently
inline
omits the attribution.
Available sources
Please add to this table as you write new sources!
Source Example Result default[1] {{man|cu|ls}}
單一UNIX®規範第7期,由國際開放標準組織發布 – 命令與工具(Commands & Utilities)參考,die.net {{man|1|ls|die.net}}
Linux用戶命令(User Commands)手冊頁 –Version 7 Unix {{man|1|ls|v7}}
Version 7 Unix Programmer's Manual –4.2BSD {{man|1|ls|4.2BSD}}
Template:Man/4.2BSD –4.3BSD {{man|1|ls|4.3BSD}}
Template:Man/4.3BSD –4.3BSD-Reno {{man|1|ls|4.3BSD-Reno}}
Template:Man/4.3BSD-Reno –4.4BSD-Lite2 {{man|1|ls|4.4BSD-Lite2}}
BSD通用命令(General Commands)手冊頁 –Darwin {{man|1|ls|Darwin}}
Darwin和Mac OS X通用命令(General Commands)手冊頁 –Debian {{man|1|ls|Debian}}
Debian通用命令(General Commands)手冊頁 –man.cx {{man|8|iptables|man.cx|inline}}
DragonFly {{man|1|ls|DragonFly BSD}}
DragonFly通用命令(General Commands)手冊頁 –Fedora {{man|8|dnf|Fedora}}
Fedora維護命令(Maintenance Commands)手冊頁 –FreeBSD {{man|1|ls|FreeBSD}}
FreeBSD通用命令(General Commands)手冊頁 –HP-UX {{man|1|ls|HP-UX}}
HP-UX 11i用戶命令(User Commands)手冊頁 –Inferno {{man|1|ls|Inferno}}
Inferno通用命令(General Commands)手冊頁 –IRIX {{man|1|ls|IRIX}}
IRIX 6.5用戶命令(User Commands)手冊頁 –BIND 9 {{man|1|named|BIND 9}}
Template:Man/BIND 9 –Linux[2] {{man|7|epoll|Linux}}
Linux程式設計師手冊頁 – 概述、約定及雜項(Overview, Conventions and Miscellanea) –MirOS BSD {{man|1|ls|MirOS BSD}}
MirOS BSD i386通用命令(General Commands)手冊頁 –NetBSD {{man|1|ls|NetBSD}}
NetBSD通用命令(General Commands)手冊頁 –OpenBSD {{man|1|ls|OpenBSD}}
OpenBSD通用命令(General Commands)手冊頁 –OpenSolaris {{man|1|ls|OpenSolaris}}
Template:Man/OpenSolaris –perldoc[3] {{man|1|perlrun|perldoc}}
Template:Man/perldoc –Plan 9 {{man|1|ls|Plan 9}}
Plan 9通用命令(General Commands)手冊頁 –Solaris {{man|1|ls|Solaris}}
Solaris 10用戶命令(User Commands)參考手冊頁 –SUS {{man|cu|ls|SUS}}
單一UNIX®規範第7期,由國際開放標準組織發布 – 命令與工具(Commands & Utilities)參考,SUS6 {{man|sh|putmsg|SUS6}}
Template:Man/SUS6 –
- ^ Redirects to the current default
- ^ Note: this is the Linux programmer's manual. It contains manual pages primarily from sections 2, 3, 4, 5 and 7, and does not cover the usual user utilities.
- ^ Note: this is the official documentation included with Perl. It does not contain general manual pages.
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}}
Sun Studio Developer's Manual : source-level debugging tool –
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:
attrib
for attributionurl
for URL to pagedisplay_section
for 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.