Jump to content
Wikimedia Meta-Wiki

Cite/Cite.php: Difference between revisions

From Meta, a Wikimedia project coordination wiki
< Cite
Content deleted Content added
Line 66: Line 66:


=== Past issues ===
=== Past issues ===
;The extension didn't generate id attributes that could be uniformly styled with CSS2 attribute selectors: Issue in Cite.php, see [[bugzilla:4579|bug 4579]]
;Using multibyte characters, colons, spaces and other values that need to be encoded according to the HTML spec breaks internal links:Issue with MediaWiki, not this extension, see [[bugzilla:4461|bug 4461]].
;Using multibyte characters, colons, spaces and other values that need to be encoded according to the HTML spec breaks internal links:Issue with MediaWiki, not this extension, see [[bugzilla:4461|bug 4461]].



Revision as of 15:20, 12 January 2006

MediaWiki logo
This page has been moved to Template:Cite/Cite.php on mediawiki.org.

Any modifications or additions to this page should be made on mediawiki.org instead.

Imported with full page histories. --Roosa (Talk) 23:21, 27 June 2007 (UTC) [reply ]

Cite.php is a Cite extension that adds two parser hooks to MediaWiki, <ref> and <references>, these operate together to add citations to pages.

Synopsis

  • <ref[ name=["id"|id]]> — the quotes are only needed if id contains whitespace, where whitespace is one of [\x09\x0a\x0d\x20]
  • <references/>

Description

<ref>

<ref> defines inline citations that can be flushed out by <references>, for instance:

Uranus's moons were observed to be declining in orbit<ref>NASA</ref>, by the Hubble space telescope<ref name="Popular Science">[[December 2005]] issue, page 12</ref>, the Martians were not available for comment on the matter<ref name="Popular Science"/>. The New York times<ref name=NYT>[[January 2006]] issue, page 16</ref> however reported<ref name=NYT/> that ...

would be rendered as:

Uranus's moons were observed to be declining in orbit[1] , by the Hubble space telescope[2] , the Martians were not available for comment on the matter[2] . The New York times[3] however reported[3] that ...

<references>

<references> flushes out the inline citations defined by <ref> anywhere on the page, for example

<references/>

would yield:

  1. NASA
  2. a b January 2006 issue, page 16

Customization

The format of the output of <ref> and <references> is almost completely customizable through MediaWiki messages, that can be modified e.g. though the MediaWiki namespace depending on the configuration of the wiki.

List of messages that control the output of <ref> and <references> and the values, if any, that are passed to them (1,ドル 2,ドル 3ドル ...), see the code in CVS for an up-to-date listing of their default contents.

  • cite_reference_link_key_with_num
    1. key
    2. num
  • cite_reference_link_prefix
  • cite_reference_link_suffix
  • cite_references_link_prefix
  • cite_references_link_suffix
  • cite_reference_link
    1. ref ID
    2. backlink ID
    3. count to display
  • cite_references_link_one
    1. backlink ID
    2. ref ID
    3. text of note
  • cite_references_link_many
    1. backlink ID
    2. list of links
    3. text of note
  • cite_references_link_many_format
    1. ref ID
    2. numeric value to use as a backlink
    3. custom value (as defined in cite_references_link_many_format_backlink_labels to use as a backlink)
  • cite_references_link_many_format_backlink_labels
  • cite_references_link_many_sep
  • cite_references_link_many_and
  • cite_references_prefix
  • cite_references_suffix

Issues

Current issues

Using <ref> in image captions breaks the XHMTL output
Issue with MediaWiki, not this extension, see bug 1887.
The citation links generated by <ref> and the backlinks generated by <references> have an empty title attribute (<a href="..." title="">...)
Issue with MediaWiki, not this extension. MediaWiki will generate output like <a href="#foo" title="">bar</a> when given input like [[#foo|bar]]

Past issues

The extension didn't generate id attributes that could be uniformly styled with CSS2 attribute selectors
Issue in Cite.php, see bug 4579
Using multibyte characters, colons, spaces and other values that need to be encoded according to the HTML spec breaks internal links
Issue with MediaWiki, not this extension, see bug 4461.

AltStyle によって変換されたページ (->オリジナル) /