模板:Man/doc

出自Local Chinese Wikipedia
imported>Tjmj2024年11月9日 (六) 13:39的修訂 (清理Category:需要检查替代引用的模板
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
跳至導覽 跳至搜尋

腳本錯誤:沒有「Message box」這個模塊。 Template:缺乏中文說明 To be used for inserting 手冊頁 links into articles on Unix topics.

Usage[編輯]

Examples[編輯]

In Out
{{man|3|printf}} printf – 參考,單一UNIX®規範第7期,由國際開放標準組織發佈
{{man|3|printf|||inline}} printf
{{man|3|printf|FreeBSD}} printf(3) – FreeBSD庫函數(Library Functions)手冊頁
{{man|3|printf||formatted output conversion}} printf: formatted output conversion – 參考,單一UNIX®規範第7期,由國際開放標準組織發佈

Parameters[編輯]

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

Available sources[編輯]

Please add to this table as you write new sources!

Source Example Result
default[1] Template:Tlx ls – 命令與工具(Commands & Utilities)參考,單一UNIX®規範第7期,由國際開放標準組織發佈
die.net Template:Tlx ls(1) – Linux用戶命令(User Commands)手冊頁
Version 7 Unix Template:Tlx [[[:Template:Man/v7]] ls(Template:Man/v7)] – Template:Man/v7
4.2BSD Template:Tlx [[[:Template:Man/4.2BSD]] ls(Template:Man/4.2BSD)] – Template:Man/4.2BSD
4.3BSD Template:Tlx [[[:Template:Man/4.3BSD]] ls(Template:Man/4.3BSD)] – Template:Man/4.3BSD
4.3BSD-Reno Template:Tlx [[[:Template:Man/4.3BSD-Reno]] ls(Template:Man/4.3BSD-Reno)] – Template:Man/4.3BSD-Reno
4.4BSD-Lite2 Template:Tlx [[[:Template:Man/4.4BSD-Lite2]] ls(Template:Man/4.4BSD-Lite2)] – Template:Man/4.4BSD-Lite2
Darwin Template:Tlx [[[:Template:Man/Darwin]] ls(Template:Man/Darwin)] – Template:Man/Darwin
Debian Template:Tlx [[[:Template:Man/Debian]] ls(Template:Man/Debian)] – Template:Man/Debian
man.cx Template:Tlx [[[:Template:Man/man.cx]] iptables(Template:Man/man.cx)]
DragonFly Template:Tlx [[[:Template:Man/DragonFly BSD]] ls(Template:Man/DragonFly BSD)] – Template:Man/DragonFly BSD
Fedora Template:Tlx [[[:Template:Man/Fedora]] dnf(Template:Man/Fedora)] – Template:Man/Fedora
FreeBSD Template:Tlx ls(1) – FreeBSD通用命令(General Commands)手冊頁
HP-UX Template:Tlx [[[:Template:Man/HP-UX]] ls(Template:Man/HP-UX)] – Template:Man/HP-UX
Inferno Template:Tlx [[[:Template:Man/Inferno]] ls(Template:Man/Inferno)] – Template:Man/Inferno
IRIX Template:Tlx [[[:Template:Man/IRIX]] ls(Template:Man/IRIX)] – Template:Man/IRIX
BIND 9 Template:Tlx [[[:Template:Man/BIND 9]] named(Template:Man/BIND 9)] – Template:Man/BIND 9
Linux[2] Template:Tlx epoll(7) – Linux程式設計師手冊頁 – 概述、約定及雜項(Overview, Conventions and Miscellanea)
MirOS BSD Template:Tlx [[[:Template:Man/MirOS BSD]] ls(Template:Man/MirOS BSD)] – Template:Man/MirOS BSD
NetBSD Template:Tlx [[[:Template:Man/NetBSD]] ls(Template:Man/NetBSD)] – Template:Man/NetBSD
OpenBSD Template:Tlx [[[:Template:Man/OpenBSD]] ls(Template:Man/OpenBSD)] – Template:Man/OpenBSD
OpenSolaris Template:Tlx [[[:Template:Man/OpenSolaris]] ls(Template:Man/OpenSolaris)] – Template:Man/OpenSolaris
perldoc[3] Template:Tlx [[[:Template:Man/perldoc]] perlrun(Template:Man/perldoc)] – Template:Man/perldoc
Plan 9 Template:Tlx [[[:Template:Man/Plan 9]] ls(Template:Man/Plan 9)] – Template:Man/Plan 9
Solaris Template:Tlx [[[:Template:Man/Solaris]] ls(Template:Man/Solaris)] – Template:Man/Solaris
SUS Template:Tlx ls – 命令與工具(Commands & Utilities)參考,單一UNIX®規範第7期,由國際開放標準組織發佈
SUS6 Template:Tlx [[[:Template:Man/SUS6]] putmsg(Template:Man/SUS6)] – Template:Man/SUS6
  1. Redirects to the current default
  2. 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.
  3. 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}} dbx(1): 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:

  1. Manual section
  2. Manual page name
  3. Output selector:
    • attrib for attribution
    • url for URL to page
    • display_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.