Module:Citation/CS1: Difference between revisions
for coauthors, omitted extra separator after authors; for date, allowed empty date to use month/day/year.
m>Wikid77 (moved "type=" to show after "format="; moved "issue=" to show before "page="; for "pmc=" link, omitted suffix "/?tool=pmcentrez".) |
m>Wikid77 (for coauthors, omitted extra separator after authors; for date, allowed empty date to use month/day/year.) |
||
Line 485: | Line 485: | ||
Editors = listpeople(control, e) | Editors = listpeople(control, e) | ||
end | end | ||
if ( Date == nil ) then | if ( Date == nil or Date == "") then | ||
-- there's something hinky with how this adds dashes to perfectly-good free-standing years | -- there's something hinky with how this adds dashes to perfectly-good free-standing years | ||
--[[ Date = Year | --[[ Date = Year | ||
Line 507: | Line 507: | ||
if ( Date ~= nil and Date ~="") then | if ( Date ~= nil and Date ~="") then | ||
local Month = args.month | local Month = args.month | ||
if ( Month ~= nil ) then | if ( Month ~= nil and Month ~= "") then | ||
Date = Month .. " " .. Date | Date = Month .. " " .. Date | ||
local Day = args.day | local Day = args.day | ||
if ( Day ~= nil ) then Date = Day .. " " .. Date end | if ( Day ~= nil ) then Date = Day .. " " .. Date end | ||
else Month = "" | |||
end | end | ||
else Date = "" | |||
end | end | ||
end | end | ||
Line 608: | Line 610: | ||
if ( At ~= nil and At ~="") then At = sepc .. " " .. At | if ( At ~= nil and At ~="") then At = sepc .. " " .. At | ||
else At = "" end | else At = "" end | ||
if ( Coauthors | if ( Coauthors == nil ) then Coauthors = "" end | ||
if ( Others ~= nil and Others ~="" ) then | if ( Others ~= nil and Others ~="" ) then | ||
Others = " " .. Others .. sepc else Others = "" end | Others = " " .. Others .. sepc else Others = "" end | ||
Line 786: | Line 785: | ||
local text | local text | ||
if ( "" ~= Authors ) then | if ( "" ~= Authors ) then | ||
if ( "" ~= Date ) then Date = " ("..Date..")" .. OrigYear .. sepc .. " " | if (Coauthors ~= "") | ||
then Authors = Authors .. "; " .. Coauthors | |||
end | |||
if ( "" ~= Date ) | |||
then Date = " ("..Date..")" .. OrigYear .. sepc .. " " | |||
else Authors = Authors .. sepc .. " " | |||
end | |||
if ( "" ~= Editors) then | if ( "" ~= Editors) then | ||
local in_text = " in " | local in_text = " in " | ||
Line 796: | Line 800: | ||
end | end | ||
end | end | ||
text = Authors | text = Authors .. Date .. Chapter .. Editors .. tcommon .. Issue .. Page .. Pages .. At .. idcommon | ||
elseif ( "" ~= Editors) then | elseif ( "" ~= Editors) then | ||
Editors = Editors .. " (eds.)" | Editors = Editors .. " (eds.)" | ||
Line 1,149: | Line 1,153: | ||
--26Feb2013 Moved "type=" data to show after "format=". | --26Feb2013 Moved "type=" data to show after "format=". | ||
--26Feb2013 For "pmc=" link, omitted suffix "/?tool=pmcentrez". | --26Feb2013 For "pmc=" link, omitted suffix "/?tool=pmcentrez". | ||
--27Feb2013 For coauthors, omitted extra separator after authors. | |||
--27Feb2013 For date, allowed empty date to use month/day/year. | |||
-- | -- | ||
--End | --End |