模板:GR/doc
此頁面是Template:GR的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
本模板為若干地理條目(大多數在北美洲)生成所需的參考文獻。
注意:如果在同一頁面使用本模板生成同一ref name的文獻超過一次,而又使用不同的dateform值,會產生「引用錯誤:帶有name屬性「GR...」的<ref>標籤用不同內容定義了多次」的錯誤提示。
用法
編輯There are nine different references that can be created by {{GR}}
for references in North America, and one that is used by locations in India. The nine possible North American citations are as follows:
{{GR|r1}}
- US Gazetteer files: 2010, 2000, and 1990. United States Census Bureau. 2011-02-12 [2011-04-23].
{{GR|r2}}
- American FactFinder. United States Census Bureau. [2008-01-31]. – 已過時,請改用
{{GR|r8}}
。
{{GR|r3}}
- US Board on Geographic Names. United States Geological Survey. 2007-10-25 [2008-01-31].
{{GR|r4}}
- Geographic Names Information System. United States Geological Survey. [2008-01-31].
{{GR|r5}}
- NGA GEOnet Names Server. National Geospatial-Intelligence Agency. 2008-01-30 [2008-01-31].
{{GR|r6}}
- Find a County. National Association of Counties. [2011-06-07].
{{GR|r7}}
- United States Postal Service. USPS - Look Up a ZIP Code. [2012-02-15].
{{GR|r8}}
- American FactFinder. United States Census Bureau. [2011-05-14].
{{GR|r9}}
To use one of these citations, pass the number of the reference to the template as a parameter: {{GR|1}}
produces the first citation, {{GR|4}}
produces the fourth one, and so forth. To use the Indian reference, pass the name "India" to the template: {{GR|india}}
, producing:
- Census of India 2001: Data from the 2001 Census, including cities, villages and towns (Provisional). Census Commission of India. [2008-11-01]. (原始內容存檔於2004-06-16).
{{GR}}
can be used either inside or outside <ref> tags. The default options, as shown above, are for use when the template is not enclosed in ref tags. The code for these options自動包括ref tags。如果不需要或不想使用ref tags,可以在reference number前面加一個"r"去省略它。So while {{GR|1}}
produces [1], a properly-formatted citation, {{GR|r1}}
outputs "US Gazetteer files: 2010, 2000, and 1990. United States Census Bureau. 2011-02-12 [2011-04-23].", the complete citation inline. 此選項不能於生成相關印度參考文獻時使用:{{GR|India}}
沒有包括<ref>
tags在內,如果輸入{{GR|rIndia}}
會產生錯誤。
日期格式
編輯The optional dateform parameter is used to set the format for dates. Setting this parameter to "dateform=dmy" gives the date in the day month year format (e.g. 16 June 2004); "mdy" gives the date in the month day, year format (e.g. June 16, 2004); and "dateform=ymd" or "dateform=iso" give the date in the iso format (e.g. 2004-06-16). When this parameter is excluded, the date will default to ymd/iso format.
例子
編輯- 輸入:
文句一{{GR|1}}
文句二{{GR|r2}}
文句三{{GR|india}}
文句四{{GR|7|dateform=mdy}}
- 顯示為:
文句一[1]
文句二American FactFinder. United States Census Bureau. [2008-01-31].
文句三Census of India 2001: Data from the 2001 Census, including cities, villages and towns (Provisional). Census Commission of India. [2008-11-01]. (原始內容存檔於2004-06-16).
文句四[2]
參數
編輯Parameter | Mandatory or Optional | Default | Description |
---|---|---|---|
{1} | Mandatory | Undefined | |
dateformat | Optional | ymd | Formats the date in dmy, mdy, or ymd/iso format. |
Value | Produces | Code |
---|---|---|
India 或 india |
Census of India 2001: Data from the 2001 Census, including cities, villages and towns (Provisional). Census Commission of India. [2008-11-01]. (原始內容存檔於2004-06-16). | {{cite web|url=http://www.censusindia.net/results/town.php?stad=A&state5=999%7Carchiveurl=http://web.archive.org/web/20040616075334/http://www.censusindia.net/results/town.php?stad=A&state5=999%7Carchivedate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=16 June 2004|mdy=June 16, 2004|ymd|iso|2004-06-16}}|title= Census of India 2001: Data from the 2001 Census, including cities, villages and towns (Provisional)|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=1 November 2008|mdy=November 1, 2008|ymd|iso|2008-11-01}}|work= |publisher= Census Commission of India}} |
1 | [1] | {{#tag:ref|{{cite web|url=http://www.census.gov/geo/www/gazetteer/gazette.html|publisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=23 April 2011|mdy=April 23, 2011|ymd|iso|2011-04-23}}|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=12 February 2011|mdy=February 12, 2011|ymd|iso|2011-02-12}}|title=US Gazetteer files: 2010, 2000, and 1990}}|name="GR1"}} |
2 | [3] | {{#tag:ref|{{cite web|url=http://factfinder.census.gov|publisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=American FactFinder}}|name="GR2"}} |
3 | [4] | {{#tag:ref|{{cite web|url=http://geonames.usgs.gov|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=US Board on Geographic Names|publisher=[[United States Geological Survey]]|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=25 October 2007|mdy=October 25, 2007|ymd|iso|2007-10-25}}}}|name="GR3"}} |
4 | [5] | {{#tag:ref|{{cite web|url=http://geonames.usgs.gov/pls/gnispublic|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=Geographic Names Information System|publisher=[[United States Geological Survey]]}}|name="GR4"}} |
5 | [6] | {{#tag:ref|{{cite web|url=http://www.nima.mil/gns/html/index.html|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=NGA GEOnet Names Server|publisher=[[National Geospatial-Intelligence Agency]]|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-30}}}}|name="GR5"}} |
6 | [7] | {{#tag:ref|{{cite web|url=http://www.naco.org/Counties/Pages/FindACounty.aspx|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=7 June 2011|mdy=June 7, 2011|ymd|iso|2011-06-07}}|title=Find a County|publisher=National Association of Counties}}|name="GR6"}} |
7 | [2] | {{#tag:ref|{{cite web |url=http://tools.usps.com/go/ZipLookupAction!input.action |title=USPS - Look Up a ZIP Code |accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=15 February 2012|mdy=February 15, 2012|ymd|iso|2012-02-15}} |author=United States Postal Service}}|name="GR7"}} |
8 | [8] | {{#tag:ref|{{cite web|url=http://factfinder2.census.gov|publisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=14 May 2011|mdy=May 14, 2011|ymd|iso|2011-05-14}}|title=American FactFinder}}|name="GR8"}} |
9 | [9] | {{#tag:ref|{{cite web|url=http://www.census.gov/prod/www/abs/decennial/|publisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=4 March 2012|mdy=March 4, 2012|ymd|iso|2012-03-04}}|title=Census of Population and Housing: Decennial Censuses}}|name="GR9"}} |
r1 | US Gazetteer files: 2010, 2000, and 1990. United States Census Bureau. 2011-02-12 [2011-04-23]. | {{cite web|url=http://www.census.gov/geo/www/gazetteer/gazette.html%7Cpublisher=[[United States Census
Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=23 April 2011|mdy=April 23, 2011|ymd|iso|2011-04-23}}|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=12 February 2011|mdy=February 12, 2011|ymd|iso|2011-02-12}}|title=US Gazetteer files: 2010, 2000, and 1990}} |
r2 | American FactFinder. United States Census Bureau. [2008-01-31]. | {{cite web|url=http://factfinder.census.gov%7Cpublisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=American FactFinder}} |
r3 | US Board on Geographic Names. United States Geological Survey. 2007-10-25 [2008-01-31]. | {{cite web|url=http://geonames.usgs.gov%7Caccessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=US Board on Geographic Names|publisher=[[United States Geological Survey]]|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=25 October 2007|mdy=October 25, 2007|ymd|iso|2007-10-25}}}} |
r4 | Geographic Names Information System. United States Geological Survey. [2008-01-31]. | {{cite web|url=http://geonames.usgs.gov/pls/gnispublic%7Caccessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=Geographic Names Information System|publisher=[[United States Geological Survey]]}} |
r5 | NGA GEOnet Names Server. National Geospatial-Intelligence Agency. 2008-01-30 [2008-01-31]. | {{cite web|url=http://www.nima.mil/gns/html/index.html%7Caccessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-31}}|title=NGA GEOnet Names Server|publisher=[[National Geospatial-Intelligence Agency]]|date={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=31 January 2008|mdy=January 31, 2008|ymd|iso|2008-01-30}}}} |
r6 | Find a County. National Association of Counties. [2011-06-07]. | {{cite web|url=http://www.naco.org/Counties/Pages/FindACounty.aspx%7Caccessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=7 June 2011|mdy=June 7, 2011|ymd|iso|2011-06-07}}|title=Find a County|publisher=National Association of Counties}} |
r7 | United States Postal Service. USPS - Look Up a ZIP Code. [2012-02-15]. | {{cite web|url=http://tools.usps.com/go/ZipLookupAction!input.action%7Ctitle=USPS - Look Up a ZIP Code |accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=15 February 2012|mdy=February 15, 2012|ymd|iso|2012-02-15}} |author=United States Postal Service}} |
r8 | American FactFinder. United States Census Bureau. [2011-05-14]. | {{cite web|url=http://factfinder2.census.gov%7Cpublisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=14 May 2011|mdy=May 14, 2011|ymd|iso|2011-05-14}}|title=American FactFinder}} |
r9 | Census of Population and Housing: Decennial Censuses. United States Census Bureau. [2012-03-04]. | {{cite web|url=http://www.census.gov/prod/www/abs/decennial/%7Cpublisher=[[United States Census Bureau]]|accessdate={{#switch:{{lc:{{{dateform|{{{2|}}}}}}}}|dmy=4 March 2012|mdy=March 4, 2012|ymd|iso|2012-03-04}}|title=Census of Population and Housing: Decennial Censuses}} |
生成的參考文獻
編輯- ^ 1.0 1.1 1.2 US Gazetteer files: 2010, 2000, and 1990. United States Census Bureau. 2011-02-12 [2011-04-23].
- ^ 2.0 2.1 United States Postal Service. USPS - Look Up a ZIP Code. [February 15, 2012]. 引用錯誤:帶有name屬性「GR7」的
<ref>
標籤用不同內容定義了多次 - ^ American FactFinder. United States Census Bureau. [2008-01-31].
- ^ US Board on Geographic Names. United States Geological Survey. 2007-10-25 [2008-01-31].
- ^ Geographic Names Information System. United States Geological Survey. [2008-01-31].
- ^ NGA GEOnet Names Server. National Geospatial-Intelligence Agency. 2008-01-30 [2008-01-31].
- ^ Find a County. National Association of Counties. [2011-06-07].
- ^ American FactFinder. United States Census Bureau. [2011-05-14].
- ^ Census of Population and Housing: Decennial Censuses. United States Census Bureau. [2012-03-04].