模板:ISBN/doc
| File:Edit-copy green.svg | 此頁面是Template:ISBN的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
| File:Lua-Logo.svg | 此模板使用Lua語言: |
用法[編輯]
使用此模板為Special:網絡書源創建一個或多個國際標準書號連結,一般包含「ISBN」前綴。模板支持10位和13位的ISBN(有無連字符皆可)。
示例[編輯]
{{ISBN|0-7475-3269-9}}
結果:
以及:
{{ISBN|978-1-4133-0454-1}}
結果:
一個想法是從「魔術連結」語法切換到更明確的語法。
如果給出多個ISBN,模板將使用頓號分隔它們:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1}}
結果:
ISBN 978-1-4133-0454-1、978-1-4133-0454-1、978-1-4133-0454-1
另外,最後兩個列表項之間的連接詞可以使用 leadout= 參數定義:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|leadout=和}}
結果:
ISBN 978-1-4133-0454-1、978-1-4133-0454-1 和 978-1-4133-0454-1
如果不想使前綴「ISBN」連結出現(例如在較長的列表中),則可以使用 plainlink=yes 參數:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes}}
結果:
978-1-4133-0454-1、978-1-4133-0454-1、978-1-4133-0454-1
(或者可以使用{{ISBNT}}模板。)
plainlink 和 leadout 參數可以同時使用:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes|leadout=以及}}
結果:
978-1-4133-0454-1、978-1-4133-0454-1 以及 978-1-4133-0454-1
格式化[編輯]
模板保留輸入值的格式,例如:
{{ISBN|978-1-4133-0454-1|978141330454-1|978 1-41330-454-1}}
結果:
ISBN 978-1-4133-0454-1、978141330454-1、978 1-41330-454-1
錯誤檢查[編輯]
模板使用Module:Check isxn驗證ISBN。如果ISBN無效,此模板仍會生成連結,但會將條目添加至Category:ISBN錯誤的頁面。
由於有時出版物使用了無效的ISBN,因此可以使用參數禁用個別ISBN的有效性檢查。為此,可將 invalid?=yes (用參數編號1至9替換?)添加到模板中。在這種情況下,條目將添加至Category:列出無效ISBN的頁面。
- {{ISBN|1-4133-0451-0}} 顯示為 ISBN 1-4133-0451-0 {{ISBN}}參數錯誤:ISBN無效。
- {{ISBN|1-4133-0451-0|invalid1=yes}} 顯示為 ISBN 1-4133-0451-0
- {{ISBN|1-4133-0451-0|invalid1=no}} 顯示為 ISBN 1-4133-0451-0 {{ISBN}}參數錯誤:ISBN無效。
參見[編輯]
- Wikipedia:ISBN
- {{ISBNT}},不顯示前綴的ISBN連結
- {{Listed Invalid ISBN}},連結一個雖無效但在原始出版物中打印的ISBN。
- {{PMID}}
- {{IETF RFC}}
- {{ISMN}}
- {{ISSN}}
- {{Catalog lookup link}}
模板數據[編輯]
<templatedata> { "params": { "1": { "label": "ISBN #1", "description": "列表中的第一個ISBN", "example": "0-674-01181-3", "type": "string", "required": true, "suggested": true }, "2": { "label": "ISBN #2", "description": "列表中的第二個ISBN", "example": "0-674-04200-3", "type": "string", "suggested": true }, "3": { "label": "ISBN #3", "description": "列表中的第三個ISBN", "example": "0-674-01169-3", "type": "string" }, "4": { "label": "ISBN #4", "description": "列表中的第四個ISBN", "example": "0-674-01181-6", "type": "string" }, "5": { "label": "ISBN #5", "description": "列表中的第五個ISBN", "example": "0-674-02181-5", "type": "string" }, "6": {}, "7": {}, "8": {}, "9": {}, "plainlink": { "label": "Suppress link to ISBN?", "description": "填寫'yes',則不會在列表前顯示 \"ISBN:\"", "example": "yes", "type": "string" }, "leadout": { "label": "last list joiner text", "description": "倒數第二個ISBN和最後一個ISBN之間的文字", "example": "以及", "type": "string" }, "invalid1": {}, "invalid2": {}, "invalid3": {}, "invalid4": {}, "invalid5": {}, "invalid6": {}, "invalid7": {}, "invalid8": {}, "invalid9": {} }, "description": "使用此模板為Special:網絡書源創建一個或多個國際標準書號連結,一般包含\"ISBN\"前綴。" } </templatedata>