Module:Citation/CS1: Difference between revisions
merge with sandbox
m>Dragons flight m (check for empty parameter) |
m>Dragons flight (merge with sandbox) |
||
Line 201: | Line 201: | ||
else | else | ||
str = str .. value; | str = str .. value; | ||
end | end | ||
else | else | ||
str = str .. value; | str = str .. value; | ||
Line 425: | Line 425: | ||
TransChapter = TransTitle | TransChapter = TransTitle | ||
Title = "" | Title = "" | ||
end | end | ||
end | end | ||
if ( Periodical and Periodical ~= "") then | if ( Periodical and Periodical ~= "") then | ||
Line 451: | Line 451: | ||
page_error = true; | page_error = true; | ||
end | end | ||
end | end | ||
local PP = args.pp | local PP = args.pp | ||
Line 969: | Line 969: | ||
local enddot = "." | local enddot = "." | ||
if (Quote ~= "") then enddot = "" end | if (Quote ~= "") then enddot = "" end | ||
if (args.postscript == "") then enddot = "" end | |||
if ( config.CitationClass == "citation") then enddot = "" end | if ( config.CitationClass == "citation") then enddot = "" end | ||
idcommon = safejoin( { idcommon, enddot }, sepc ) | idcommon = safejoin( { idcommon, enddot }, sepc ) | ||
Line 1,010: | Line 1,011: | ||
else | else | ||
Editors = Editors .. ", eds." | Editors = Editors .. ", eds." | ||
end | end | ||
Date = " (" .. Date ..")" .. OrigYear .. sepc .. " " | Date = " (" .. Date ..")" .. OrigYear .. sepc .. " " | ||
else | else | ||
Line 1,017: | Line 1,018: | ||
else | else | ||
Editors = Editors .. " (eds.)" .. sepc .. " " | Editors = Editors .. " (eds.)" .. sepc .. " " | ||
end | end | ||
end | end | ||
text = safejoin( {Editors, Date, Chapter, tcommon}, sepc ); | text = safejoin( {Editors, Date, Chapter, tcommon}, sepc ); | ||
Line 1,028: | Line 1,029: | ||
end | end | ||
end -- endif ""~=Date | end -- endif ""~=Date | ||
text = safejoin( {Chapter, tcommon, Date}, sepc ); | if ( config.CitationClass=="journal" and Periodical ) then | ||
text = safejoin( {text, pgtext, idcommon}, sepc ); | text = safejoin( {Chapter, tcommon}, sepc ); | ||
text = safejoin( {text, pgtext, Date, idcommon}, sepc ); | |||
else | |||
text = safejoin( {Chapter, tcommon, Date}, sepc ); | |||
text = safejoin( {text, pgtext, idcommon}, sepc ); | |||
end | |||
end | end | ||
Line 1,040: | Line 1,046: | ||
else | else | ||
Year = "" | Year = "" | ||
end | end | ||
end | end | ||
local classname = "citation" | local classname = "citation" | ||
Line 1,199: | Line 1,205: | ||
--14Mar2013 Fixed config.CitationClass "book" to use p./pp. page. | --14Mar2013 Fixed config.CitationClass "book" to use p./pp. page. | ||
--18Mar2013 Fixed "page=" to override "pages=" as in markup-based cites. | --18Mar2013 Fixed "page=" to override "pages=" as in markup-based cites. | ||
--19Mar2013 Fixed date of class=journal Periodical to show after page. | |||
--19Mar2013 Changed null "postscript=" to suppress end-dot of citation. | |||
-- | -- | ||
--End | --End |