Module:Citation/CS1: Difference between revisions
set enddot to end line when not class "citation".
m>Wikid77 (checked 22 more empty parameters; unitalicized "et al.") |
m>Wikid77 (set enddot to end line when not class "citation".) |
||
Line 673: | Line 673: | ||
if ( ZBL ~= nil and ZBL ~="") then | if ( ZBL ~= nil and ZBL ~="") then | ||
ZBL = sepc .." " .. externallinkid(frame, {label="Zbl",link="Zentralblatt MATH",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=ZBL}) else ZBL = "" end | ZBL = sepc .." " .. externallinkid(frame, {label="Zbl",link="Zentralblatt MATH",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=ZBL}) else ZBL = "" end | ||
if ( Quote ~= nil ) then | if ( Quote ~= nil and Quote ~="" ) then | ||
Quote = sepc .." \"" .. Quote .. "\"" | Quote = sepc .." \"" .. Quote .. "\"" | ||
PostScript = "" | PostScript = "" | ||
else | else | ||
if ( PostScript ~= nil ) then PostScript = PostScript else PostScript = "" end | if ( PostScript ~= nil and PostScript ~="" ) then | ||
PostScript = PostScript else PostScript = "" end | |||
Quote = "" | Quote = "" | ||
end | end | ||
local Archived | local Archived | ||
if ( nil ~= ArchiveURL ) then | if ( nil ~= ArchiveURL and "" ~= ArchiveURL ) then | ||
if ( ArchiveDate ~= nil ) then ArchiveDate = " " .. ArchiveDate | if ( ArchiveDate ~= nil and ArchiveDate ~="" ) then | ||
ArchiveDate = " " .. ArchiveDate | |||
else ArchiveDate = "" end | else ArchiveDate = "" end | ||
if ( "no" == DeadURL ) then | if ( "no" == DeadURL ) then | ||
Line 693: | Line 695: | ||
end | end | ||
local Lay | local Lay | ||
if ( nil ~= LaySummary ) then | if ( nil ~= LaySummary and "" ~= LaySummary ) then | ||
if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end | if ( LayDate ~= nil ) then LayDate = " (" .. LayDate .. ")" else LayDate = "" end | ||
if ( LaySource ~= nil ) then LaySource = " – <i>" .. LaySource .. "</i>" else LaySource = "" end | if ( LaySource ~= nil ) then LaySource = " – <i>" .. LaySource .. "</i>" else LaySource = "" end | ||
Line 700: | Line 702: | ||
Lay = "" | Lay = "" | ||
end | end | ||
if ( nil ~= Transcript ) then | if ( nil ~= Transcript and "" ~= Transcript ) then | ||
if ( TranscriptURL ~= nil ) then Transcript = "[" .. TranscriptURL .. Transcript .. "]" end | if ( TranscriptURL ~= nil ) then Transcript = "[" .. TranscriptURL .. Transcript .. "]" end | ||
else | else | ||
Line 706: | Line 708: | ||
end | end | ||
local Publisher = "" | local Publisher = "" | ||
if ( Periodical ~= nil and | if ( Periodical ~= nil and Periodical ~= "" and | ||
config.CitationClass ~= "web" ) then | config.CitationClass ~= "web" ) then | ||
if ( PublicationDate ~= nil ) then PublicationDate = " " .. PublicationDate else PublicationDate = "" end | if ( PublicationDate ~= nil and PublicationDate ~="" ) then | ||
if ( PublisherName ~= nil ) then | PublicationDate = " " .. PublicationDate else PublicationDate = "" end | ||
if ( PublisherName ~= nil and PublisherName ~="" ) then | |||
Publisher = " (" .. PublicationPlace .. PublisherName .. PublicationDate .. ")" | Publisher = " (" .. PublicationPlace .. PublisherName .. PublicationDate .. ")" | ||
else | else | ||
Line 717: | Line 720: | ||
Edition = "" | Edition = "" | ||
else | else | ||
if ( PublicationDate ~= nil ) then PublicationDate = " (published " .. PublicationDate .. ")" else PublicationDate = "" end | if ( PublicationDate ~= nil and PublicationDate ~="" ) then | ||
if ( PublisherName ~= nil ) then Publisher = sepc .. " " .. PublicationPlace .. PublisherName .. PublicationDate else Publisher = "" end | PublicationDate = " (published " .. PublicationDate .. ")" | ||
else PublicationDate = "" end | |||
if ( PublisherName ~= nil and PublisherName ~="" ) then | |||
Publisher = sepc .. " " .. PublicationPlace .. PublisherName .. PublicationDate else Publisher = "" end | |||
end | end | ||
-- Several of the above rely upon detecting this as nil, so do it last. | -- Several of the above rely upon detecting this as nil, so do it last. | ||
Line 734: | Line 740: | ||
else tcommon = Title .. TitleType .. TitleNote .. Series .. Language .. Format .. Edition .. Conference .. Periodical .. Volume .. Others .. Issue .. Publisher .. Agency .. Position end | else tcommon = Title .. TitleType .. TitleNote .. Series .. Language .. Format .. Edition .. Conference .. Periodical .. Volume .. Others .. Issue .. Publisher .. Agency .. Position end | ||
-- DEBUG: tcommon = "/Title="..Title .. "/TitleType="..TitleType .. "/TitleNote="..TitleNote .. "/Format="..Format .. "/Edition="..Edition .. "/Language="..Language .. "/Conference="..Conference .. "/Periodical="..Periodical .. "/Series="..Series .. "/Volume="..Volume .. "/Issue="..Issue .. "/Position="..Position | -- DEBUG: tcommon = "/Title="..Title .. "/TitleType="..TitleType .. "/TitleNote="..TitleNote .. "/Format="..Format .. "/Edition="..Edition .. "/Language="..Language .. "/Conference="..Conference .. "/Periodical="..Periodical .. "/Series="..Series .. "/Volume="..Volume .. "/Issue="..Issue .. "/Position="..Position | ||
local enddot = | |||
if (Title | local idcommon = ARXIV .. ASIN .. BIBCODE .. DOI .. ID .. ISBN .. JFM .. JSTOR .. LCCN .. MR .. OCLC .. OL .. OSTI .. PMC .. PMID .. RFC .. SSRN .. URL .. ZBL .. Archived .. AccessDate .. Via .. SubscriptionRequired .. Lay .. Quote .. PostScript | ||
if ( | local enddot = "" | ||
if ( | if (Title ~= "") then enddot = "." end | ||
if (Periodical ~= "") then enddot = "." end | |||
if ( string.sub(idcommon,-1,1) == sepc) then enddot = "" end | |||
if ( config.CitationClass == "citation") then enddot = "" end | if ( config.CitationClass == "citation") then enddot = "" end | ||
idcommon = idcommon .. enddot | |||
local text | local text | ||
Line 1,066: | Line 1,073: | ||
--21Feb2013 Set OCinSdata.rft_val_fmt = "info:ofi/fmt:kev:mtx:book" | --21Feb2013 Set OCinSdata.rft_val_fmt = "info:ofi/fmt:kev:mtx:book" | ||
--21Feb2013 Checked to omit blank codes (asin= | doi= etc.). | --21Feb2013 Checked to omit blank codes (asin= | doi= etc.). | ||
--21Feb2013 Set enddot to end line if not config.CitationClass "citation". | |||
-- | -- | ||
--End | --End |