Template:Citation Style documentation/url: Difference between revisions

From Lojban
Jump to navigation Jump to search
m (1 revision)
m (1 revision imported)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* <span id="csdoc_url" />'''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. See: [[WP:PAGELINKS]].
* <b id="csdoc_url">url</b>: URL of an online location where the {{#if:{{{media|}}}|media|text of the publication}} named by '''title''' 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 {{nowrap|<code><nowiki>?utm_source=google&utm_medium=...&utm_term=...&utm_campaign=...</nowiki></code>}}. {{crossref|For linking to pages in PDF files or in Google Books, see [[WP:PAGELINKS]].}} Do not link to any commercial booksellers, such as [[Amazon (company)|Amazon]]; use {{para|isbn}} or {{para|oclc}} to provide neutral search links for books. Invalid URLs, including those containing spaces, will result in an error message.
** <span id="csdoc_accessdate" />'''accessdate''': Full date when original URL was accessed; use the same format as other access and archive dates in the citations; requires '''url'''.{{r|date}} Do not wikilink. ''Not required for web pages or linked documents that do not change; mainly for use of web pages that change frequently or have no publication date.'' Can be [[Help:Citation Style 1/accessdate|hidden or styled]] by registered editors.
** <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 required for online sources, such as personal websites, that do not have a publication date; see [[WP:CITEWEB]]. Access dates are not required for links to published research papers, published books, or news articles with publication dates. Note that '''access-date''' is the date that the URL was found to be working and to support the text being cited. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Can be [[Help:Citation Style 1/accessdate|hidden or styled]] by registered editors. Alias: '''accessdate'''.
** <span id="csdoc_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]] (see: [[Wikipedia:Using WebCite]]) and [[Internet Archive]] (see: [[Wikipedia:Using the Wayback Machine]]); requires '''archivedate''' and '''url'''.
** <b id="csdoc_archiveurl">archive-url</b>: The URL of an [[Web archiving|archived]] snapshot of a web page. Typically used to refer to services such as [[Internet Archive]] {{crossref|(see [[Wikipedia:Using the Wayback Machine]])}}, [[WebCite]] {{crossref|(see [[Help:Using WebCite]])}} and [[archive.today]] {{crossref|(see [[Help:Using archive.today]])}}; requires '''archive-date''' and '''url'''. By default (overridden by {{para|url-status|live}}) the archived link is displayed first, with the original link at the end. Alias: '''archiveurl'''.
*** <span id="csdoc_archivedate" />'''archivedate''': Date when the original URL was archived; preceded 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}} Do not wikilink.
*** <b id="csdoc_archivedate">archive-date</b>: Archive-service snapshot-date; 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; templated dates are discouraged. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Alias: '''archivedate'''.
*** <span id="csdoc_deadurl" />'''deadurl''': When the URL is still live, but pre-emptively archived, then set {{para|deadurl|no}}. This changes the display order with the title retaining the original link and the archive linked at the end.
*** <b id="csdoc_urlstatus">url-status</b>: this optional parameter is ignored if '''archive-url''' is not set. If omitted, or with null value, the default value is {{para|url-status|dead}}.  When the URL is still live, but pre-emptively archived, then set {{para|url-status|live}}; 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|url-status|unfit}} or {{para|url-status|usurped}} suppresses display of the original URL (but {{para|url}} and {{para|archive-url}} are still required).
** <span id="csdoc_template doc demo" />'''template doc demo''': 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 [[:Category:Articles with incorrect citation syntax]]. Set {{para|template doc demo|true}} to disable categorization; mainly used for documentation where the error is demonstrated.
*** <b id="csdoc_archive_format">archive-format</b>: File format of the work referred to by '''archive-url'''; for example: PDF, DOC, or XLS; displayed in parentheses after the archive link.  HTML is implied and should not be specified. File format annotation is automatically rendered 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 file format information for the visually impaired.  {{crossref|See [[Help:Citation Style 1#Using {{pipe}}format=|Using {{pipe}}format=]]}}
* <span id="csdoc_format" />'''format''': Format of the work referred to by '''url'''; for example: PDF, DOC, or XLS; displayed in parentheses after '''title'''. HTML is implied and should not be specified. 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.
** <b id="csdoc_url_access">url-access</b>: {{crossref|See [[#Access indicators for url-holding parameters|Access indicators for url-holding parameters]]}}
* <b id="csdoc_format">format</b>: File 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. File format annotation is automatically rendered 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 file format information for the visually impaired. {{crossref|See [[Help:Citation Style 1#Using {{pipe}}format=|Using {{pipe}}format=]]}}
{{MediaWiki URL rules}}
{{MediaWiki URL rules}}
{{reflist|refs=
{{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>}}
<ref name=date>Accessdate and archivedate in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. See: [[MOS:DATEUNIFY]].</ref>
}}

Latest revision as of 16:14, 4 August 2021

  • url: URL of an online location where the text of the publication named by title 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=.... <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline Do not link to any commercial booksellers, such as Amazon; use |isbn= or |oclc= to provide neutral search links for books. 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 required for online sources, such as personal websites, that do not have a publication date; see WP:CITEWEB. Access dates are not required for links to published research papers, published books, or news articles with publication dates. Note that access-date is the date that the URL was found to be working and to support the text being cited. See "Automatic date formatting" above for details about interaction with {{use dmy dates}} and {{use mdy dates}}. Can be hidden or styled by registered editors. Alias: accessdate.
    • archive-url: The URL of an archived snapshot of a web page. Typically used to refer to services such as Internet Archive <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline, WebCite <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline and archive.today <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline; requires archive-date and url. By default (overridden by |url-status=live) the archived link is displayed first, with the original link at the end. Alias: archiveurl.
      • archive-date: Archive-service snapshot-date; 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; templated dates are discouraged. See "Automatic date formatting" above for details about interaction with {{use dmy dates}} and {{use mdy dates}}. Alias: archivedate.
      • url-status: this optional parameter is ignored if archive-url is not set. If omitted, or with null value, the default value is |url-status=dead. When the URL is still live, but pre-emptively archived, then set |url-status=live; 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 |url-status=unfit or |url-status=usurped suppresses display of the original URL (but |url= and |archive-url= are still required).
      • archive-format: File format of the work referred to by archive-url; for example: PDF, DOC, or XLS; displayed in parentheses after the archive link. HTML is implied and should not be specified. File format annotation is automatically rendered 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 file format information for the visually impaired. <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline
    • url-access: <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline
  • format: File 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. File format annotation is automatically rendered 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 file format information for the visually impaired. <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline
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: will 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. <templatestyles src="Crossreference/styles.css" />Template:Hatnote inline