args.suffix = args.suffix or ""
local t0 = onlyinprint(frame, args.label .. sep .. args.id)
local t1 = hideinprint(frame, "[[" .. args.link .. "|" .. args.label .. "]]" .. sep .. "[" .. args.prefix .. "{{urlencode:" .. z.wikitext.urlencode(args.id .. "}}" ) .. args.suffix .. " " .. nowiki(frame, args.id) .. "]")
return t0 .. t1
end
local URL = args.archiveurl or args.url
local ChapterURL = args.chapterurl
local Journal Periodical = args.journal or args.newspaper or args.magazine or args.work
local Series = args.series
local Volume = args.volume
local SSRN = args.ssrn or args.SSRN
local ZBL = args.zbl or args.ZBL
-- At this point fields may be nil if they weren't specified in the template use. We can use that fact. -- These data form a COinS tag (see <http://ocoins.info/>) which allows automated tools to parse the citation information. local OCinSdata = {} OCinSdata.ctx_ver = "Z39.88-2004" OCinSdata.rft_val_fmt = "info:ofi/fmt:kev:mtx:" OCinSdata.rfr_id = "info:sid/en.wikipedia.org:" .. config.fullpagename if ( nil ~= Periodical ) then OCinSdata["rft.genre"] = "article" OCinSdata["rft.jtitle"] = Periodical if ( nil ~= Title ) then OCinSdata["rft.atitle"] = Title end elseif ( nil ~= Chapter ) then OCinSdata["rft.genre"] = "bookitem" OCinSdata["rft.btitle"] = Chapter if ( nil ~= Title ) then OCinSdata["rft.atitle"] = Title end else OCinSdata["rft.genre"] = "book" if ( nil ~= Title ) then OCinSdata["rft.btitle"] = Title end end if ( PublicationPlace or Place ) then OCinSdata["rft.place"] = (PublicationPlace or Place) end OCinSdata["rft.date"] = Date OCinSdata["rft.series"] = Series OCinSdata["rft.volume"] = Volume OCinSdata["rft.issue"] = Issue OCinSdata["rft.pages"] = At OCinSdata["rft.edition"] = Edition OCinSdata["rft.pub"] = Publisher OCinSdata["rft.isbn"] = ISBN OCinSdata["rft.issn"] = ISSN OCinSdata["rft.jfm"] = JFM OCinSdata["rft.jstor"] = JSTOR OCinSdata["rft.lccn"] = LCCN OCinSdata["rft.mr"] = MR OCinSdata.ft_id = (URL or ChapterURL) if ( nil ~= a[1] and nil ~= a[1].last) then local last = a[1].last local first = a[1].first OCinSdata["rft.aulast"] = last if ( nil ~= first ) then OCinSdata["rft.aufirst"] = first OCinSdata["rft.au"] = last .. (args.NameSep or ", ") .. first else OCinSdata["rft.au"] = last end end local OCinSids = {} OCinSids["info:arxiv"] = ARXIV OCinSids["info:asin"] = ASIN OCinSids["info:bibcode"] = BIBCODE OCinSids["info:doi"] = DOI OCinSids["info:oclcnum"] = OCLC OCinSids["info:olnum"] = OL OCinSids["info:osti"] = OSTI OCinSids["info:pmc"] = PMC OCinSids["info:pmid"] = PMID OCinSids["info:rfc"] = RFC OCinSids["info:ssrn"] = SSRN OCinSids["info:zbl"] = ZBL local OCinStitle = "" for name,value in pairs(OCinSids) do OCinStitle = OCinStitle .. "rft_id=" .. z.wikitext.urlencode(name .. "/" .. value) .. "&" end for name,value in pairs(OCinSdata) do OCinStitle = OCinStitle .. z.wikitext.urlencode(name .. "=" .. value) .. "&" end -- Now perform various field substitutions.
-- We also add leading spaces and surrounding markup and punctuation to the various parts of the citation, but only when they are non-nil.
if ( Authors == nil ) then Authors = listpeople(config, a) end
end
end
if ( Journal Periodical ~= nil ) then
Chapter = Title
Title = JournalPeriodical
end
if ( Chapter ~= nil ) then
end
local args = { class="citation " .. (config.CitationClass or ""), id=id }
text = z.wikitext.tag(frame, {name="span", contents=text, params=args})
end
local hiddenspace = z.wikitext.tag(frame, {name="span", contents=" ", params={style="display: none;"}}) local OCinS = z.wikitext.tag(frame, {name="span", contents=hiddenspace, params={class= "Z3988",title=OCinStitle}})
return text .. OCinS
end