Difference between revisions of "Template:Include-USGov/testcases"

From blackwiki
Jump to navigation Jump to search
imported>PBS
imported>Hike395
(→‎Tests: add title argument tests)
 
(14 intermediate revisions by 5 users not shown)
Line 7: Line 7:
 
*    comment (optional) - free field that produces parenthesized comment at end
 
*    comment (optional) - free field that produces parenthesized comment at end
 
*    article (optional) - the title of the reference
 
*    article (optional) - the title of the reference
*   author (optional) - author of reference
+
*   source (optional) - free field at end at shuts off most other arguments: useful for inline use of {{tl|cite web}}
*    accessdate (optional) - date page last checked
 
  
== Testing sandbox version ==
+
Template takes any parameter specified by {{tl|cite web}} as long as article and url are specified (article gets mapped to cite web title)
http://www.whitehouse.gov
 
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>/sandbox}}</nowiki></code>
 
*{{{{BASEPAGENAME}}/sandbox}}
 
  
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY}}</nowiki></code>
+
==Tests==
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY}}
+
{| class="wikitable"
 
+
! Code
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|url=http://www.whitehouse.gov}}</nowiki></code>
+
! Working template
*{{ {{BASEPAGENAME}}/sandbox|url=http://www.whitehouse.gov}}
+
! Sandbox version
 
+
! Comments
:<code><nowiki>http://www.whitehouse.gov{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov}}</nowiki></code>
+
|-
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov}}
+
| <nowiki>{{Include-USGov</nowiki><br/>
 
+
<nowiki>|agency=United States Department}}</nowiki>
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY}}</nowiki></code>
+
| {{Include-USGov|agency=United States Department}}
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY}}
+
| {{Include-USGov/sandbox|agency=United States Department}}
 
+
| Minimal usage: templates that call this one should pass in optional arguments.
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}</nowiki></code>
+
|-
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}
+
| <nowiki>{{Include-USGov</nowiki><br/>
 
+
<nowiki>|agency=United States Department</nowiki><br/>
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url= |policy=POLICY |comment=COMMENT}}</nowiki></code>
+
<nowiki>|policy=http://www.agency.gov/policy.html}}</nowiki>
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}
+
| {{Include-USGov|agency=United States Department|policy=http://www.agency.gov/policy.html}}
 
+
| {{Include-USGov/sandbox|agency=United States Department|policy=http://www.agency.gov/policy.html}}
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE}} </nowiki></code>
+
| Replace internal wikilink about generic re-use to specific agency policy
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE}}
+
|-
 
+
| <nowiki>{{Include-USGov</nowiki><br/>
:<code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR}} </nowiki></code>
+
<nowiki>|agency=United States government</nowiki><br/>
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR}}
+
<nowiki>|comment=comment can have [[Wikilink|link]]s}}</nowiki>
 
+
| {{Include-USGov|agency=United States government|comment=comment can have [[Wikilink|link]]s}}
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}</nowiki></code>
+
| {{Include-USGov/sandbox|agency=United States government|comment=comment can have [[Wikilink|link]]s}}
*{{ {{BASEPAGENAME}}/sandbox|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}
+
| comment is a free field that produces a parenthesized comment at end, agency should auto-wikilink
 
+
|-
----
+
| <nowiki>{{Include-USGov</nowiki><br/>
;Test source=
+
<nowiki>|agency=United States Department</nowiki><br>
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}/sandbox|source=1|agency=AGENCY |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
<nowiki>|url=http://www.agency.gov/}}</nowiki>
*{{ {{BASEPAGENAME}}/sandbox|source=|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}
+
| {{Include-USGov|agency=United States Department|url=http://www.agency.gov}}
 
+
| {{Include-USGov/sandbox|agency=United States Department|url=http://www.agency.gov}}
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}/sandbox|source=1 |first=FIRST |last=LAST |title=TITLE |agency=AGENCY |policy=POLICY |comment=COMMENT |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
| Url without agency is just a bare link
*{{ {{BASEPAGENAME}}/sandbox|source=1|first=FIRST |last=LAST |title=TITLE |agency=AGENCY |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR |accessdate=ACCESSDATE}}
+
|-
 
+
| <nowiki>{{Include-USGov</nowiki><br/>
{{clear}}
+
<nowiki>|agency=United States Department</nowiki><br>
 
+
<nowiki>|url=http://www.agency.gov/}}</nowiki><br>
== Testing main template ==
+
<nowiki>|comment=comment}}</nowiki>
 
+
| {{Include-USGov|agency=United States Department|url=http://www.agency.gov/|comment=comment}}
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
+
| {{Include-USGov/sandbox|agency=United States Department|url=http://www.agency.gov/|comment=comment}}
*{{ {{BASEPAGENAME}} }}
+
| Url with comment should still work
 
+
|-
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY}}</nowiki></code>
+
| <nowiki>{{Include-USGov</nowiki><br/>
*{{ {{BASEPAGENAME}}|agency=AGENCY}}
+
<nowiki>|agency=United States Department</nowiki><br/>
 
+
<nowiki>|article=Reference document}}</nowiki>
:<code><nowiki>{{ {{BASEPAGENAME}}|url=http://www.whitehouse.gov}}</nowiki></code>
+
| {{Include-USGov|agency=United States Department|article=Reference document}}
*{{ {{BASEPAGENAME}}|url=http://www.whitehouse.gov}}
+
| {{Include-USGov/sandbox|agency=United States Department|article=Reference document}}
 
+
| With article argument, template refers to specific document
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov}}</nowiki></code>
+
|-
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov}}
+
| <nowiki>{{Include-USGov</nowiki><br/>
 
+
<nowiki>|agency=United States Department</nowiki><br/>
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY}}</nowiki></code>
+
<nowiki>|title=Reference document}}</nowiki>
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY}}
+
| {{Include-USGov|agency=United States Department|title=Reference document}}
 
+
| {{Include-USGov/sandbox|agency=United States Department|title=Reference document}}
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}</nowiki></code>
+
| {{para|title}} as alternative to {{para|article}}
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}
+
|-
 
+
| <nowiki>{{Include-USGov</nowiki><br/>
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}</nowiki></code>
+
<nowiki>|agency=United States Department</nowiki><br/>
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT}}
+
<nowiki>|article=Reference document</nowiki><br/>
 
+
<nowiki>|url=http://www.agency.gov/doc.html}}</nowiki>
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE}} </nowiki></code>
+
| {{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html}}
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE}}
+
| {{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html}}
 
+
| With article argument, url becomes external link to specific document
:<code><nowiki>{{ {{BASEPAGENAME}}agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR}} </nowiki></code>
+
|-
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR}}
+
| <nowiki>{{Include-USGov</nowiki><br/>
 
+
<nowiki>|agency=United States Department</nowiki><br/>
:<code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
<nowiki>|title=Reference document</nowiki><br/>
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}
+
<nowiki>|url=http://www.agency.gov/doc.html}}</nowiki>
 
+
| {{Include-USGov|agency=United States Department|title=Reference document|url=http://www.agency.gov/doc.html}}
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}|agency=AGENCY |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
| {{Include-USGov/sandbox|agency=United States Department|title=Reference document|url=http://www.agency.gov/doc.html}}
*{{ {{BASEPAGENAME}}|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}
+
| {{para|title}} as alternative to {{para|article}}
 
+
|-
----
+
| <nowiki>{{Include-USGov</nowiki><br/>
;Test source=
+
<nowiki>|agency=United States Department</nowiki><br/>
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}|source=|agency=AGENCY |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
<nowiki>|article=Reference document</nowiki><br/>
*{{ {{BASEPAGENAME}}|source=|agency=AGENCY |url=http://www.whitehouse.gov |policy=POLICY |comment=COMMENT |article=ARTICLE |author=AUTHOR|accessdate=ACCESSDATE}}
+
<nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/>
 
+
<nowiki>|author=John Q. Public}}</nowiki>
:NO URL <code><nowiki>{{ {{BASEPAGENAME}}|source=1 | first=FIRST |last=LAST |title=TITLE |agency=AGENCY |policy=POLICY |comment=COMMENT |author=AUTHOR|accessdate=ACCESSDATE}} </nowiki></code>
+
| {{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}}
*{{ {{BASEPAGENAME}}|source=1 |first=FIRST |last=LAST |title=TITLE |agency=AGENCY |policy=POLICY |comment=COMMENT |author=AUTHOR |accessdate=ACCESSDATE}}
+
| {{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public}}
 +
| Author can be added for use in inline citation
 +
|-
 +
| <nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States Department</nowiki><br/>
 +
<nowiki>|article=Reference document</nowiki><br/>
 +
<nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/>
 +
<nowiki>|accessdate=2008-08-08}}</nowiki>
 +
| {{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|accessdate=2008-08-08}}
 +
| {{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|accessdate=2008-08-08}}
 +
| Accessdate can be added, also
 +
|-
 +
| <nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States Department</nowiki><br/>
 +
<nowiki>|policy=http://www.agency.gov/policy.html</nowiki><br/>
 +
<nowiki>|article=Reference document</nowiki><br/>
 +
<nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/>
 +
<nowiki>|author=John Q. Public</nowiki><br/>
 +
<nowiki>|accessdate=2008-08-08</nowiki><br/>
 +
<nowiki>|comment=comment can have [[Wikilink|link]]s}}</nowiki>
 +
| {{Include-USGov|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[Wikilink|link]]s}}
 +
| {{Include-USGov/sandbox|agency=United States Department|policy=http://www.agency.gov/policy.html|article=Reference document|url=http://www.agency.gov/doc.html|author=John Q. Public|accessdate=2008-08-08|comment=comment can have [[Wikilink|link]]s}}
 +
| All parameters can work together
 +
|-
 +
|<nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States government</nowiki><br/>
 +
<nowiki>|policy=http://www.whitehouse.gov</nowiki><br/>
 +
<nowiki>|author=Arglebargle IV</nowiki><br/>
 +
<nowiki>|article=On Boggies</nowiki><br/>
 +
<nowiki>|accessdate=Third Age</nowiki><br/>
 +
<nowiki>|source=Use cite template here}}</nowiki>
 +
| {{Include-USGov|agency=United States government|policy=http://www.whitehouse.gov|author=Arglebargle IV|article=On Boggies|accessdate=Third Age|source=Use cite template here}}
 +
| {{Include-USGov/sandbox|agency=United States government|policy=http://www.whitehouse.gov|author=Arglebargle IV|article=On Boggies|accessdate=Third Age|source=Use cite template here}}
 +
| Source parameter shuts down most arguments, leaves free field at end for citation template
 +
|-
 +
|<nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States Department</nowiki><br/>
 +
<nowiki>|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }}</nowiki>
 +
|{{Include-USGov|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }}
 +
|{{Include-USGov/sandbox|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }}
 +
|Example of source usage
 +
|-
 +
|<nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States Department</nowiki><br/>
 +
<nowiki>|source={{cite book|first=John |last=Smith |title=Battle of Hastings}}|comment=1066}}</nowiki>
 +
|{{Include-USGov|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}}|comment=1066}}
 +
|{{Include-USGov/sandbox|agency=United States Department|source={{cite book|first=John |last=Smith |title=Battle of Hastings}}|comment=1066}}
 +
|Source plus comment
 +
|-
 +
|<nowiki>{{Include-USGov</nowiki><br/>
 +
<nowiki>|agency=United States Department</nowiki><br/>
 +
<nowiki>|article=Reference document</nowiki><br/>
 +
<nowiki>|url=http://www.agency.gov/doc.html</nowiki><br/>
 +
<nowiki>|source= }}</nowiki>
 +
|{{Include-USGov|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|source= }}
 +
|{{Include-USGov/sandbox|agency=United States Department|article=Reference document|url=http://www.agency.gov/doc.html|source= }}
 +
| Blank source leaves other parameters active
 +
|}

Latest revision as of 04:51, 9 March 2020


  • agency (required) - name of agency (or reference source) that produced material
  • url (optional) - URL of reference
  • policy (optional) - URL of re-use policy of agency or reference source
  • comment (optional) - free field that produces parenthesized comment at end
  • article (optional) - the title of the reference
  • source (optional) - free field at end at shuts off most other arguments: useful for inline use of {{cite web}}

Template takes any parameter specified by {{cite web}} as long as article and url are specified (article gets mapped to cite web title)

Tests

Code Working template Sandbox version Comments
{{Include-USGov

|agency=United States Department}}

File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States Department. File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States Department. Minimal usage: templates that call this one should pass in optional arguments.
{{Include-USGov

|agency=United States Department
|policy=http://www.agency.gov/policy.html}}

File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States Department. File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States Department. Replace internal wikilink about generic re-use to specific agency policy
{{Include-USGov

|agency=United States government
|comment=comment can have [[Wikilink|link]]s}}

File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States government. (comment can have links) File:PD-icon.svg This article incorporates public domain material from websites or documents of the United States government. (comment can have links) comment is a free field that produces a parenthesized comment at end, agency should auto-wikilink
{{Include-USGov

|agency=United States Department
|url=http://www.agency.gov/}}

File:PD-icon.svg This article incorporates public domain material from the United States Department website http://www.agency.gov. File:PD-icon.svg This article incorporates public domain material from the United States Department website http://www.agency.gov. Url without agency is just a bare link
{{Include-USGov

|agency=United States Department
|url=http://www.agency.gov/}}
|comment=comment}}

File:PD-icon.svg This article incorporates public domain material from the United States Department website http://www.agency.gov/. (comment) File:PD-icon.svg This article incorporates public domain material from the United States Department website http://www.agency.gov/. (comment) Url with comment should still work
{{Include-USGov

|agency=United States Department
|article=Reference document}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Script error: No such module "If empty".". File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Script error: No such module "If empty".". With article argument, template refers to specific document
{{Include-USGov

|agency=United States Department
|title=Reference document}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Script error: No such module "If empty".". File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Script error: No such module "If empty".". |title= as alternative to |article=
{{Include-USGov

|agency=United States Department
|article=Reference document
|url=http://www.agency.gov/doc.html}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". With article argument, url becomes external link to specific document
{{Include-USGov

|agency=United States Department
|title=Reference document
|url=http://www.agency.gov/doc.html}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". |title= as alternative to |article=
{{Include-USGov

|agency=United States Department
|article=Reference document
|url=http://www.agency.gov/doc.html
|author=John Q. Public}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: John Q. Public. "Reference document". File:PD-icon.svg This article incorporates public domain material from the United States Department document: John Q. Public. "Reference document". Author can be added for use in inline citation
{{Include-USGov

|agency=United States Department
|article=Reference document
|url=http://www.agency.gov/doc.html
|accessdate=2008-08-08}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". Retrieved 2008-08-08. File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". Retrieved 2008-08-08. Accessdate can be added, also
{{Include-USGov

|agency=United States Department
|policy=http://www.agency.gov/policy.html
|article=Reference document
|url=http://www.agency.gov/doc.html
|author=John Q. Public
|accessdate=2008-08-08
|comment=comment can have [[Wikilink|link]]s}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: John Q. Public. "Reference document". Retrieved 2008-08-08. (comment can have links) File:PD-icon.svg This article incorporates public domain material from the United States Department document: John Q. Public. "Reference document". Retrieved 2008-08-08. (comment can have links) All parameters can work together
{{Include-USGov

|agency=United States government
|policy=http://www.whitehouse.gov
|author=Arglebargle IV
|article=On Boggies
|accessdate=Third Age
|source=Use cite template here}}

File:PD-icon.svg This article incorporates public domain material from the United States government document: Use cite template here File:PD-icon.svg This article incorporates public domain material from the United States government document: Use cite template here Source parameter shuts down most arguments, leaves free field at end for citation template
{{Include-USGov

|agency=United States Department
|source={{cite book|first=John |last=Smith |title=Battle of Hastings}} }}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: Smith, John. Battle of Hastings. File:PD-icon.svg This article incorporates public domain material from the United States Department document: Smith, John. Battle of Hastings. Example of source usage
{{Include-USGov

|agency=United States Department
|source={{cite book|first=John |last=Smith |title=Battle of Hastings}}|comment=1066}}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: Smith, John. Battle of Hastings. (1066) File:PD-icon.svg This article incorporates public domain material from the United States Department document: Smith, John. Battle of Hastings. (1066) Source plus comment
{{Include-USGov

|agency=United States Department
|article=Reference document
|url=http://www.agency.gov/doc.html
|source= }}

File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". File:PD-icon.svg This article incorporates public domain material from the United States Department document: "Reference document". Blank source leaves other parameters active