Difference between revisions of "Template:Citation Style documentation/url"

From Timelines
Jump to: navigation, search
(ce)
(suggest "type" from "format"—commonly confused per Category:Pages using citations with format and no URL)
 
(68 intermediate revisions by 33 users not shown)
Line 1: Line 1:
* '''url''': URL of an online location where the text of the publication can be found. Cannot be used if '''title''' is wikilinked. If applicable, the link may point to the specific page(s) referenced. Do not link to any commercial booksellers (such as Amazon.com).
+
* <b id="csdoc_url">url</b>: URL of an online location where the {{#if:{{{media|}}}|media|text of the publication}} can be found. Cannot be used if '''title''' is wikilinked. If applicable, the link may point to the specific page(s) referenced. Remove tracking parameters from URLs, e.g. <code>#ixzz2rBr3aO94</code> or <code>?utm_source=google&utm_medium=...&utm_term=...&utm_campaign=...</code>. {{crossref|See [[WP:PAGELINKS]].}} Do not link to any commercial booksellers, such as Amazon.com. Invalid URLs, including those containing spaces, will result in an error message.  
** '''format''': Format of the work referred to by '''url''', e.g. PDF. HTML is implied and should not be specified.
+
** <b id="csdoc_accessdate">access-date</b>: Full date when the content pointed to by '''url''' was last verified to support the text in the article; do not wikilink; requires '''url'''; use the same format as other access and archive dates in the citations.{{r|date|group=date}} ''Not required for linked documents that do not change.'' For example, '''access-date''' is not required for links to copies of published research papers accessed via DOI or a published book, but should be used for links to news articles on commercial websites (these can change from time to time, even if they are also published in a physical medium). Note that '''access-date''' is the date that the URL was checked to not just be working, but to support the assertion being cited (which the current version of the page may not do). Can be [[Help:Citation Style 1/accessdate|hidden or styled]] by registered editors. Alias: '''accessdate'''.
** '''accessdate''': Full date when URL was accessed. Should be in the same format as other dates in citations in the same article. Must not be wikilinked.
+
** <b id="csdoc_archiveurl">archive-url</b>: The URL of an [[Web archiving|archived]] copy of a web page if the original URL is no longer available. Typically used to refer to services such as [[WebCite]] {{crossref|(see [[Wikipedia:Using WebCite]])}} and [[Internet Archive]] {{crossref|(see [[Wikipedia:Using the Wayback Machine]])}}; requires '''archive-date''' and '''url'''. By default (overridden by {{para|dead-url|no}}) the archived link is displayed first, with the original link at the end. Alias: '''archiveurl'''.
** '''archiveurl''': The URL of an [[Web archiving|archived]] copy of a web page, if (or in case) the url becomes unavailable. Typically used to refer to services like [[WebCite]] and the [[Internet Archive]]. Requires '''archivedate'''.
+
*** <b id="csdoc_archivedate">archive-date</b>: Date when the original URL was archived; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.{{r|date|group=date}} Do not wikilink. Alias: '''archivedate'''.
** '''archivedate''': Date when the item was archived. Do not be wikilinked. Requires '''archiveurl'''.
+
*** <b id="csdoc_deadurl">dead-url</b>: the default value of this optional parameter, if omitted, is {{para|dead-url|yes}}. Equivalent values  are <var>y</var> or <var>true</var>. When the URL is still live, but pre-emptively archived, then set {{para|dead-url|no}}; this changes the display order, with the title retaining the original link and the archive linked at the end. When the original URL has been usurped for the purposes of spam, advertising, or is otherwise unsuitable, setting {{para|dead-url|unfit}} or {{para|dead-url|usurped}} suppresses display of the original URL (but {{para|url}} is still required). Alias: '''deadurl'''.
** '''deadurl''': To change the order with the title retaining the original link and the archive linked at the end, set {{para|deadurl|no}}
+
** <b id="csdoc_template doc demo">template-doc-demo</b>: The archive parameters will be error-checked to ensure that all the required parameters are included, or else {{tl|citation error}} is invoked. With errors, main, help and template pages are placed into one of the subcategories of [[:Category:Articles with incorrect citation syntax]]. Set {{para|template-doc-demo|true}} to disable categorization; mainly used for documentation where the error is demonstrated.
:URLs must begin with a supported [[URI scheme]]: <code>http://</code> and <code>https://</code>will be supported by all browsers; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news://</code>, <code>mailto:</code> and <code>gopher://</code> will require a plugin or an external application. IPv6 host-names are currently not supported.
+
* <b id="csdoc_format">format</b>: Format of the work referred to by '''url'''; for example: PDF, DOC, or XLS; displayed in parentheses after '''title'''. (For media format, use '''type'''.) HTML is implied and should not be specified. Automatically added when a PDF icon is displayed. Does not change the [[Help:External link icons|external link icon]]. Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add format information for the visually impaired.
:URLs containing certain characters will display and link incorrectly unless those characters are encoded. For example, a space must be replaced by <code>%20</code>.
+
{{MediaWiki URL rules}}
{| class="wikitable" style="margin-left: 5em"
+
{{reflist|group=date|refs=<ref name=date>Access-date and archive-date in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. {{crossref|See [[MOS:DATEUNIFY]].}}</ref>}}
! sp !! " !! , !! ' !! ; !! < !! > !! ? !! [ !! ]
 
|-
 
| %20 || %22 || %2c || %3a || %3b || %3c || %3e || %3f || %5b || %5d
 
|}
 
:::{{small|Single apostrophes do not need to be encoded; multiples will be parsed as italic or bold markup}}
 
:The link button [[File:Vector toolbar insert link button.png]] on the enhanced editing toolbar will encode a link.
 

Latest revision as of 22:15, 4 February 2017

  • url: URL of an online location where the text of the publication can be found. Cannot be used if title is wikilinked. If applicable, the link may point to the specific page(s) referenced. Remove tracking parameters from URLs, e.g. #ixzz2rBr3aO94 or ?utm_source=google&utm_medium=...&utm_term=...&utm_campaign=.... See WP:PAGELINKS. Do not link to any commercial booksellers, such as Amazon.com. Invalid URLs, including those containing spaces, will result in an error message.
    • access-date: Full date when the content pointed to by url was last verified to support the text in the article; do not wikilink; requires url; use the same format as other access and archive dates in the citations.[date 1] Not required for linked documents that do not change. For example, access-date is not required for links to copies of published research papers accessed via DOI or a published book, but should be used for links to news articles on commercial websites (these can change from time to time, even if they are also published in a physical medium). Note that access-date is the date that the URL was checked to not just be working, but to support the assertion being cited (which the current version of the page may not do). Can be hidden or styled by registered editors. Alias: accessdate.
    • archive-url: The URL of an archived copy of a web page if the original URL is no longer available. Typically used to refer to services such as WebCite (see Wikipedia:Using WebCite) and Internet Archive (see Wikipedia:Using the Wayback Machine); requires archive-date and url. By default (overridden by |dead-url=no) the archived link is displayed first, with the original link at the end. Alias: archiveurl.
      • archive-date: Date when the original URL was archived; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.[date 1] Do not wikilink. Alias: archivedate.
      • dead-url: the default value of this optional parameter, if omitted, is |dead-url=yes. Equivalent values are y or true. When the URL is still live, but pre-emptively archived, then set |dead-url=no; this changes the display order, with the title retaining the original link and the archive linked at the end. When the original URL has been usurped for the purposes of spam, advertising, or is otherwise unsuitable, setting |dead-url=unfit or |dead-url=usurped suppresses display of the original URL (but |url= is still required). Alias: deadurl.
    • template-doc-demo: The archive parameters will be error-checked to ensure that all the required parameters are included, or else {{citation error}} is invoked. With errors, main, help and template pages are placed into one of the subcategories of Category:Articles with incorrect citation syntax. Set |template-doc-demo=true to disable categorization; mainly used for documentation where the error is demonstrated.
  • format: Format of the work referred to by url; for example: PDF, DOC, or XLS; displayed in parentheses after title. (For media format, use type.) HTML is implied and should not be specified. Automatically added when a PDF icon is displayed. Does not change the external link icon. Note: External link icons do not include alt text; thus, they do not add format information for the visually impaired.
URLs must begin with a supported URI scheme. http:// and https:// will be supported by all browsers; however, ftp://, gopher://, irc://, ircs://, mailto: and news: may require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported.
If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be percent-encoded. For example, a space must be replaced by %20. To encode the URL, replace the following characters with:
sp " ' < > [ ] { | }
 %20  %22  %27  %3c  %3e  %5b  %5d  %7b  %7c  %7d
Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.
  1. 1.0 1.1 Access-date and archive-date in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. See MOS:DATEUNIFY.