Changes

Jump to navigation Jump to search

Module:Citation

896 bytes added, 07:39, 1 September 2012
Added processing of more parameters.
local LayDate = args.laydate
local Title = args.title or args.encyclopaedia or args.encyclopedia or args.dictionary
local BookTitle = args.booktitle
local Conference = args.conference
local TransTitle = args.trans_title
local TitleNore = args.department
local Chapter = args.chapter or args.article or args.entry
local TransChapter = args["trans-chapter"] or args.trans_chapter
local Type TitleType = args.type
local ArchiveURL = args["archive-url"] or args.archiveurl
local URL = args.url
local ChapterURL = args["chapter-url"] or args.chapterurl
local ConferenceURL = args["conference-url"] or args.conferenceurl
local Periodical = args.journal or args.newspaper or args.magazine or args.work or args.periodical
local Series = args.series or args.version
local SubscriptionRequired = args.subscription
local Via = args.via
local AccessDate = args["access-date"] or args.accessdate
local ArchiveDate = args["archive-date"] or args.archivedate
local DeadURL = args.deadurl
local Language = args.languageor args["in"]
local Format = args.format
local Ref = args.ref or args.Ref
local BIBCODE = args.bibcode or args.BIBCODE
local DOI = args.doi or args.DOI
local DoiBroken = args.doi_inactivedate or args.doi_brokendate or args.DoiBroken
local ID = args.id or args.ID
local ISBN = args.isbn13 or args.isbn or args.ISBN
local ISSN = args.issn or args.ISSN
local JFM = args.jfm or args.JFM
-- At this point fields may be nil if they weren't specified in the template use. We can use that fact.
-- Account for the oddity that is {{cite conference}}, before generation of COinS data.
if ( BookTitle ) then
Chapter = Title
TransChapter = TransTitle
Title= BookTitle
TransTitle = nil
end
-- These data form a COinS tag (see <http://ocoins.info/>) which allows automated tools to parse the citation information.
else
Title = ""
end
if ( Conference ~= nil ) then
if ( ConferenceURL ~= nil ) then
Conference = "[" .. ConferenceURL .. " " .. Conference .. "]"
end
Conference = " " .. Conference
else
Conference = ""
end
if ( nil ~= Page or nil ~= Pages ) then At = nil end
if ( Coauthors ~= nil ) then Coauthors = " " .. Coauthors .. "." else Coauthors = "" end
if ( Others ~= nil ) then Others = " " .. Others .. "." else Others = "" end
if ( Type TitleType ~= nil ) then Type TitleType = " (" .. Type TitleType .. ")." else Type TitleType = "" end if ( TitleNote ~= nil ) then TitleNote = " (" .. TitleNote .. ")." else TitleNote = "" end
if ( PublicationPlace ~= nil ) then PublicationPlace = PublicationPlace .. ": " else PublicationPlace = "" end
if ( Language ~= nil ) then Language = " (in " .. Language .. ")" else Language = "" end
-- We build things this way because it is more efficient in LUA not to keep reassigning to the same string variable over and over.
local idcommon = ARXIV .. ASIN .. BIBCODE .. DOI .. ID .. ISBN .. JFM .. JSTOR .. LCCN .. MR .. OCLC .. OL .. OSTI .. PMC .. PMID .. RFC .. SSRN .. URL .. ZBL .. AccessDate .. Archived .. Via .. SubscriptionRequired .. Lay .. Quote .. PostScript
local tcommon = Title .. Type TitleType .. TitleNote .. Format .. Edition .. Language .. Conference .. Periodical .. Series .. Volume .. Issue .. Page .. Pages .. At .. "."
Date = Date .. OrigYear
local text
Anonymous user

Navigation menu