Bản mẫu:Refn
Mục đích
This template is used to create footnotes in Wikipedia, as an alternative and complement to the <ref> tag. Because of a technical limitation, some of the standard Wikipedia markup elements that are often used in the article prose do not work within a set of <ref>...</ref> tags, including but not limited to the pipe trick, template substitution and another "nested" set of <ref>...</ref> tags. For example, the following does not work as expected:
<ref>[[Trợ giúp:Cước chú|]]</ref>(Tạo ra: [[Trợ giúp:Cước chú|]] instead of a wikilink)<ref>{{SUBST:TODAY}}</ref>(Tạo ra: {{SUBST:TODAY}} instead of the date that the edit was made)<ref>Explanatory footnote<ref>Citation</ref></ref>(Tạo ra: Cite error: A <ref> tag is missing the closing </ref> (see the help page). </ref>)
Replacing the outermost <ref>...</ref> set with {{Refn}} allows for the use of the markup elements listed above.
Cách sử dụng
{{refn|group=tên nhóm|name=tên|Nội dung của ghi chú cuối trang}}
- groupname: Groupname per WP:REFGROUP; if not specified, then the main and nested references will be rendered into the same reference list
- name: Reference name per WP:REFNAME
Bản mẫu:Refname rules
Các ví dụ
Ghi chú cuối trang với trích dẫn
| Cú pháp | Kết quả |
|---|---|
Một ví dụ.{{refn|group=ghi chú|name=đầu tiên|Một ghi chú.<ref>Một tham khảo bao gồm.</ref>}}Ví dụ khác.{{refn|group=ghi chú|Ghi chú khác.<ref>Tham khảo khác bao gồm.</ref>}}Một ví dụ thứ ba.{{refn|group=ghi chú|Ghi chú thứ ba.<ref>Tham khảo trong ghi chú thứ ba.</ref>}}Lặp đi lặp lại ví dụ đầu tiên.{{refn|group=ghi chú|name=đầu tiên}}==Ghi chú=={{tham khảo|group=note}}==Tham khảo=={{tham khảo}} | Một ví dụ.[ghi chú 1]Ví dụ khác.[ghi chú 2]Một ví dụ thứ ba.[ghi chú 3]Lặp đi lặp lại ví dụ đầu tiên.[ghi chú 1] |
Thay thế
The first example shows that substitution does not work in a regular <ref>...</ref> tag (the accessdate does not appear correctly). The second example shows that the accessdate is substituted correctly within {{refn}}.
| Cú pháp | Kết quả |
|---|---|
<ref>{{chú thích web |accessdate={{Subst:TODAY}} |title=Languages |work=Apache HTTP Server |agency=Ohloh |publisher= Black Duck Software |url=https://www.ohloh.net/p/apache/analyses/latest/languages_summary}}</ref>{{tham khảo}} |
|
{{refn|{{chú thích web |accessdate={{Subst:TODAY}} |title=Languages |work=Apache HTTP Server |agency=Ohloh |publisher= Black Duck Software |url=https://www.ohloh.net/p/apache/analyses/latest/languages_summary}}}}{{tham khảo}} |
|
Các lỗi
If the reference or note content is missing, then "Cite error: Invalid <ref> tag; refs with no name must have content." will be displayed.
Xem thêm
Bản mẫu:Wikipedia referencing
This template is used to create footnotes in Wikipedia, as an alternative and complement to the <ref> tag.
| Tham số | Miêu tả | Kiểu | Trạng thái | |
|---|---|---|---|---|
| content | 1 | The content of the footnote. | Nội dung | bắt buộc |
| name | name | The name of the footnote. Corresponds to the "name" attribute of the <ref> tag. | Chuỗi dài | tùy chọn |
| group | group | The reference group. Corresponds to the "group" attribute on the <ref> tag. | Chuỗi dài | tùy chọn |
- Bản mẫu ghi chú cuối trang