![]() | This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
![]() | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
![]() | This module can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
This module and associated sub-modules support the Citation Style 1 and Citation Style 2 citation templates. In general, it is not intended to be called directly, but is called by one of the core CS1 and CS2 templates.
These files comprise the module support for CS1|2 citation templates:
Other documentation:
- Module talk:Citation/CS1/Feature requests
- Module talk:Citation/CS1/COinS
- Module:Cs1 documentation support – a set of functions (some experimental) that extract information from the module suite for the purpose of documenting CS1|2
- Module:Citation/CS1/doc/Category list – lists of category names taken directly from Module:Citation/CS1/Configuration and Module:Citation/CS1/Configuration/sandbox
testcases
- Module:Citation/CS1/testcases (run)
- Module:Citation/CS1/testcases/errors (run) – error and maintenance messaging
- Module:Citation/CS1/testcases/dates (run) – date validation
- Module:Citation/CS1/testcases/identifiers (run) – identifiers
- Module:Citation/CS1/testcases/anchor (run) – CITEREF anchors
-- Unit tests for [[Module:Citation/CS1]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_encyclopedia()
self:preprocess_equals_preprocess_many('{{cite web/lua|', '}}', '{{cite web/new|', '}}', {
{
[==[
|last= LAST
|first= FIRST
|authorlink= AUTHORLINK
|editor-first= EDITOR-FIRST
|editor-last= EDITOR-LAST
|editor-link= EDITOR-LINK
|encyclopedia= ENCYCLOPEDIA
|title= TITLE
|trans_title= TRANS_TITLE
|url= URL
|accessdate= ACCESSDATE
|language= LANGUAGE
|edition= EDITION
|date= DATE
|year= YEAR
|month= MONTH
|publisher= PUBLISHER
|volume= VOLUME
|___location= LOCATION
|id= ID
|isbn= ISBN
|oclc= OCLC
|doi= 10.DOI
|pages= PAGES
|quote= QUOTE
|ref= REF
]==]
},{
[==[
|last =Golden
|first = Peter B.
|authorlink =Peter Benjamin Golden
|editor1-last = Golden
|editor1-first = Peter B.
|editor1-link = Peter Benjamin Golden
|editor2-last = Ben-Shammai,
|editor2-first = Haggai
|editor3-last = Róna-Tas
|editor3-first = András
|editor3-link = András Róna-Tas
|encyclopedia = The World of the Khazars: New Perspectives
|title = Khazar Studies: Achievements and Perspectives
|series = Handbook of Oriental Studies
|volume = 17
|publisher = BRILL
|year = 2007a
|pages = 7–57
|isbn = 978-9-004-16042-2
|url = http://books.google.com/books?id=3ZzXjdyK-CEC&pg=PR2#v=onepage&p=123
|accessdate = February 13, 2013
|ref = harv
]==]
}, {
[==[
title=Idaho – MSN Encarta <!-- BOT GENERATED TITLE -->|url=http://encarta.msn.com/encyclopedia_761565515/Idaho.html|archiveurl=http://www.webcitation.org/query?id=1257036681681058|archivedate=2009-11-01|deadurl=yes
]==]
}, {
[==[
url=http://encarta.msn.com/encyclopedia_761594679/martina_hingis.html|title=Martina Hingis|publisher=[[Encarta]]|accessdate=31 October 2008|archiveurl=http://www.webcitation.org/5kx7RAO3G|archivedate=1 November 2009|deadurl=yes
]==]
}, {
[==[
archiveurl=http://www.webcitation.org/5kwbxqnne | deadurl=yes | archivedate=31 October 2009 | title=Europe | last=Microsoft Encarta Online Encyclopaedia 2007 | url=http://encarta.msn.com/encyclopaedia_761570768/Europe.html | accessdate=27 December 2007
]==]
}, {
[==[
last=Seberg |first=Ole |year=2007 |editor-last=Heywood |editor-first=Vernon H. |editor2-last=Brummitt |editor2-first=Richard K. |editor3-last=Culham |editor3-first=Alastair |contribution=Alliaceae |title=Flowering Plant Families of the World |pages=340–341 |publication-place=Richmond Hill, Ontario |publisher=Firefly Books |isbn=978-1-55407-206-4 |lastauthoramp=yes
]==]
}, {
[==[
chapter=Lewinsky scandal |title=The Columbia Encyclopedia, Sixth Edition |publisher=Columbia University Press |year=2008 |url=http://www.encyclopedia.com/topic/Lewinsky_scandal.aspx |accessdate=February 9, 2010
]==]
},
--[==[
{{cite compare | mode = encyclopedia | last = Gerish | first = Deborah | title = Aimery of Lusignan | editor = Alan V. Murray | encyclopedia = The Crusades: An Encyclopedia | volume = 1 | pages = 24 | publisher = [[ABC-CLIO]] | ___location = [[Santa Barbara, California|Santa Barbara]] | year = 2006 | url = http://books.google.com/books?id=6cSXSgAACAAJ | oclc = 70122512
|comment=Period before volume number intentionally removed, pp. changed to p. for single page }}
{{cite compare | mode = encyclopedia | author=Skousen, Royal | authorlink=Royal Skousen | title=Book of Mormon Editions (1830-1981) | encyclopedia=[[Encyclopedia of Mormonism]] | year=1992 | volume=1 | pages=175–6 | publisher=[[Macmillan Publishers (United States)|Macmillan]] | url=http://eom.byu.edu/index.php/Book_of_Mormon_Editions_(1830-1981) | accessdate=2009-02-12 | ref=harv
|comment=Period before volume number intentionally removed}}
{{cite compare | mode = encyclopedia
| last = Morère
| first = J. E.
| title = Aguilon, François d'
| encyclopedia = [[Dictionary of Scientific Biography]]
| volume = 1
| pages = 81
| publisher = Charles Scribner's Sons
| ___location = New York
| year = 1970
| isbn = 0-684-10114-9
|comment = Period before volume number intentionally omitted, "pp." intentionally converted to "p." on single page
}}
{{Cite compare|mode=encyclopedia
| title = Clipper
| encyclopedia = New International Encyclopaedia
| volume = 5
| pages = 39
| publisher = Dodd Mead and Company
| year = 1909
| quote = Clipper ... probably connected with Dutch ''klepper'', fast horse
| url = http://books.google.com/?id=qycVAAAAYAAJ&dq=%22clipper%20ship%22&pg=PA39#v=onepage&q=%22clipper%20ship%22&f=false
| accessdate =6 Mar. 2010
|comment = Period before volume number intentionally omitted, "pp." intentionally converted to "p." on single page}}
{{cite compare | mode =encyclopedia |last= Smith |first= Peter |encyclopedia= A concise encyclopedia of the Bahá'í Faith |title= satan |year= 2000 |publisher=Oneworld Publications |___location= Oxford |isbn= 1-85168-184-1 |pages= 304
|comment="pp." intentionally converted to "p." on single page.}}
{{cite compare | mode = encyclopedia|chapter=Ethanol|title=[[#Encyc Chem|Encyclopedia of chemical technology]]|year=1991|page=813|volume=9
|comment = Name duplication error in original, period before volume intentionally removed. }}
{{Cite compare| mode = encyclopedia
| first = William A.
| last = Wallace
| title = Albertus Magnus, Saint
| url = http://www.u.arizona.edu/~aversa/scholastic/Dictionary%20of%20Scientific%20Biography/Albertus%20Magnus%20(Wallace).pdf
| publisher = Scribner & American Council of Learned Societies
| isbn = 978-0-684-10114-9
| editor-last = Gillispie
| editor-first = Charles
| encyclopedia = [[Dictionary of Scientific Biography]]
| volume=1
| pages=99-103
| ___location = New York
| year = 1970
|comment= Period before volume intentionally removed, hyphen in page range converted to dash.
}}
{{cite compare | mode = encyclopedia |last=Kukathas |first=Chandran |authorlink=Chandran Kukathas |year=1998 |title=Rand, Ayn (1905–82) |editor-last=Craig |editor-first=Edward (ed) |encyclopedia=[[Routledge Encyclopedia of Philosophy]] |___location=New York |publisher=Routledge |volume=8 |pages=55–56 |isbn=0-415-07310-3 |oclc=318280731
|comment= Period intentionally removed before volume}}
{{cite compare | mode = encyclopedia |last=Morse |first=Stephen J. |encyclopedia=Law Library - American Law and Legal Information |title=Psychopathy - What Is Psychopathy? |url=http://law.jrank.org/pages/1884/Psychopathy-What-psychopathy.html |accessdate=2008-09-25 |volume=Crime and Justice Vol 3|archiveurl=http://www.webcitation.org/5b5vnGYP0 |archivedate=2008-09-25 |comment=Double dot ("..") fixed after name, bolding intentionally removed on long "volume" names.}}
===Identical===
{{cite compare|mode =encyclopedia|last= Smith|first= Peter |encyclopedia= A concise encyclopedia of the Bahá'í Faith|title= burial, "death and afterlife", evil, evil spirits, sin |year= 2000|publisher=Oneworld Publications|___location= Oxford |isbn= 1-85168-184-1|pages= 96–97, 118–119, 135–136, 322–323| ref = harv}}
{{cite compare | mode = encyclopaedia |last=Hodges |first=Andrew |editor=Edward N. Zalta |encyclopedia=[[Stanford Encyclopedia of Philosophy]] |title=Alan Turing |url=http://plato.stanford.edu/entries/turing/ |accessdate=10 January 2011 |edition=Winter 2009 |date=27 August 2007 |publisher=[[Stanford University]] |ref=harv}}
{{cite compare | mode = encyclopedia|editor=[[Pete Palmer]] and Gary Gillette|encyclopedia=The 2005 ESPN Baseball Encyclopedia|title=Introduction|edition=1st Edition|year=2005|publisher=Sterling|___location=New York|isbn=1-4027-2568-X}}
{{Cite compare | mode = encyclopedia
| first = Ernan
| last = McMullin
| title = Robert Bellarmine
| url = http://www.encyclopedia.com/topic/Robert_Bellarmine.aspx#1
| publisher = Scribner & American Council of Learned Societies
| editor-last = Gillispie
| editor-first = Charles
| encyclopedia = [[Dictionary of Scientific Biography]]
| year = 2008
}}
{{cite compare | mode = encyclopedia|last= |first= | authorlink= | title=Islam |year=2007| encyclopedia=Encyclopædia Britannica Online | accessdate=2007-11-27|___location=|publisher=|url=http://www.britannica.com/eb/article-69190/Islam}}
{{cite compare|mode=encyclopedia |author=Bliss, Michael |year=2002 |title=Macleod, John James Rickard |url=http://www.thecanadianencyclopedia.com/articles/john-james-rickard-macleod |encyclopedia=Canadian Encyclopedia}}
{{cite compare|mode=encyclopedia|title=Penderecki, Krzysztof|last=Thomas|first=Adrian|editor-last=Sadie|editor-first=Stanley|___location=London, England|year=1992|encyclopedia=[[New Grove Dictionary of Opera]]|ISBN=0-333-73432-7}}
{{cite compare|mode=encyclopedia|encyclopedia=[[Encyclopedia of Arkansas History & Culture]]|title=Louisiana Purchase|first=Lea Flowers|last=Baker|accessdate=2010-09-18|url=http://encyclopediaofarkansas.net/encyclopedia/entry-detail.aspx?entryID=2383}}
{{cite compare | mode = encyclopedia|title=Cervantes, Miguel de|encyclopedia=The Encyclopedia Americana|year=1994}}
{{cite compare | mode = encyclopedia | editor=Robert M. Besançon | encyclopedia=The Encyclopedia of Physics | edition=3rd | year=1990 | publisher=Van Nostrand Reinhold, New York | isbn = 0-442-00522-9 | pages = 1278–1284 | article=Vacuum Techniques}}
{{Cite compare | mode = encyclopedia | last = McFarlane | first = Ian | authorlink = Ian McFarlane | encyclopedia = [[Encyclopedia of Australian Rock and Pop]] | title = Whammo Homepage | url = http://web.archive.org/web/20040405231007/www.whammo.com.au/index.asp | accessdate =4 December 2010 | year = 1999 | publisher=[[Allen & Unwin]] | ___location = [[St Leonards, New South Wales|St Leonards, NSW]] | isbn = 1-86508-072-1 }}
{{Cite compare | mode = encyclopedia
| last = Campbell
| first = J.
| authorlink =
| title = Rædwald
| url = http://www.oxforddnb.com/view/article/23265?docPos=1
| encyclopedia = [[Dictionary of National Biography]]
| year = 2004
| editor-last =
| editor-first =
| editor-link =
| volume =
| ___location =
| doi = 10.1093/ref:odnb/23265
| publisher = Oxford University Press}}
{{Cite compare | mode = encyclopedia | title=Avicenna | encyclopedia=Encyclopaedia of Islam Online | ref=harv }}
{{cite compare | mode = encyclopedia|title=Islam|encyclopedia=Encyclopaedia of Islam Online|author=L. Gardet|coauthors=J. Jomier}}
{{cite compare | mode = encyclopaedia |first=Ted |last=Honderich |authorlink=Ted Honderich |year=2005 |title=theodicy |encyclopedia=The Oxford Companion to Philosophy |isbn=0-19-926479-1 |quote=[[John Hick]], for example, proposes a theodicy, while [[Alvin Plantinga]] formulates a defence. The idea of human free will often appears in a both of these strategies, but in different ways.}}
{{cite compare | mode = encyclopedia |title=AskOxford Search Results – terrorist |encyclopedia=AskOxford |publisher=AskOxford |accessdate=2008-07-11 |url=http://www.askoxford.com/results/?view=dev_dict&field-12668446=terrorism&branch=13842570&textsearchtype=exact&sortorder=score%2Cname}}
{{cite compare | mode = encyclopedia | title = Virus.VBS.Redlof.a | encyclopedia = Virus Encyclopedia | publisher = Viruslist.com | date = January 15, 2004 | url = http://www.viruslist.com/viruses/encyclopedia?virusid=25409 | accessdate =August 26, 2007}}
{{cite compare | mode = encyclopedia
|title=Matthew, Tobie (1544?–1628)
|last=Sheils
|first=William Joseph
|encyclopedia=Oxford Dictionary of National Biography
|publisher=Oxford University Press
|year=2004
}}
{{cite compare | mode = encyclopedia | editor = Thomas Hockey et al | last = Dalen | first = Benno van | title=Ulugh Beg: Muḥammad Ṭaraghāy ibn Shāhrukh ibn Tīmūr | encyclopedia = The Biographical Encyclopedia of Astronomers | publisher=Springer | year = 2007 | ___location = New York | pages = 1157–9 | url=http://islamsci.mcgill.ca/RASI/BEA/Ulugh_Beg_BEA.htm | isbn=978-0-387-31022-0}}
{{cite compare | mode = encyclopedia |author=Lawson, M. K. |encyclopedia= The Medieval State: Essays Presented to James Campbell |title=Observations Upon a Scene in the Bayeux Tapestry |publisher=Hambledon Press |___location=London |pages=73–92 |year=2000}}
{{cite compare | mode = encyclopedia|last=Waugh|first=Scott L.|title=Thomas, 1st Earl of Norfolk (1300–1338)|encyclopedia=Oxford Dictionary of National Biography|publisher=Oxford University Press|___location=Oxford|year=2004|doi=10.1093/ref:odnb/27196}}
{{cite compare | mode = encyclopedia|author=Yorke, Philip Chesney|encyclopedia=Encyclopædia Britannica|title=Anne (1665–1714)|publisher=University Press|___location=Cambridge|edition=11th|year=1911}}
{{Cite compare|mode=encyclopedia| editor-last = Lewis| editor-first = M. Paul| encyclopedia = Ethnologue: Languages of the World| edition = 16 | publisher = SIL International | ___location = Dallas, Texas| year = 2009| url = http://www.ethnologue.com/show_language.asp?code=deu}}
]==]
}, {nowiki=false})
end
function p:test_news()
self:preprocess_equals_preprocess_many('{{cite web/lua|', '}}', '{{cite web/new|', '}}', {
{ 'url=http://www.foo.com/ | title = Bob', 'url=http://www.foo.com/ | title = Bob' }
}, {nowiki=false})
end
function p:test_web()
self:preprocess_equals_preprocess_many('{{cite web/lua|', '}}', '{{cite web/new|', '}}', {
{ 'url=http://www.foo.com/ | title = Bob', 'url=http://www.foo.com/ | title = Bob' }
}, {nowiki=false})
end
return p