Bản mẫu:Refn/doc

Bách khoa toàn thư mở Wikipedia

Mục đích[sửa mã nguồn]

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:

  1. <ref>[[Trợ giúp:Cước chú|]]</ref> (Tạo ra: [[Trợ giúp:Cước chú|]] instead of a wikilink)
  2. <ref>{{SUBST:TODAY}}</ref> (Tạo ra: {{SUBST:TODAY}} instead of the date that the edit was made)
  3. <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[sửa mã nguồn]

{{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ụ[sửa mã nguồn]

Ghi chú cuối trang với trích dẫn[sửa mã nguồ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]

Ghi chú
  1. ^ a b Một ghi chú.[1]
  2. ^ Ghi chú khác.[2]
  3. ^ Ghi chú thứ ba.[3]
Tham khảo
  1. ^ Một tham khảo bao gồm.
  2. ^ Tham khảo khác bao gồm.
  3. ^ Tham khảo trong ghi chú thứ ba.

Thay thế[sửa mã nguồn]

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}}

[1]

  1. ^ “Languages”. Apache HTTP Server. Black Duck Software. Ohloh. Truy cập {{Subst:TODAY}}. Kiểm tra giá trị ngày tháng trong: |accessdate= (trợ giúp)
{{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}}

[1]

  1. ^ “Languages”. Apache HTTP Server. Black Duck Software. Ohloh. Truy cập ngày 1 Tháng 1 năm 2023.

Các lỗi[sửa mã nguồn]

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[sửa mã nguồn]

Bản mẫu:Wikipedia referencing