Jump to content

Module:Citation/CS1: Difference between revisions

changed class "encyclopaedia" to omit "(__)" around publisher; updated internal notes.
m>Wikid77
(moved Language to follow Periodical or Series; fixed Edition to follow Series or Volume; fixed class "encyclopaedia" to show article as quoted Chapter.)
m>Wikid77
(changed class "encyclopaedia" to omit "(__)" around publisher; updated internal notes.)
Line 750: Line 750:
     end
     end
     local Publisher = ""
     local Publisher = ""
     if ( Periodical ~= nil and Periodical ~= "" and
     if ( Periodical and Periodical ~= "" and
        config.CitationClass ~= "encyclopaedia" and
         config.CitationClass ~= "web" ) then
         config.CitationClass ~= "web" ) then
         if ( PublicationDate ~= nil and PublicationDate ~="" ) then
         if ( PublicationDate and PublicationDate ~="" )
             PublicationDate = " " .. PublicationDate else PublicationDate = "" end
             then PublicationDate = " " .. PublicationDate
         if ( PublisherName ~= nil and PublisherName ~="" ) then
            else PublicationDate = "" end
         if ( PublisherName and PublisherName ~="" ) then
             Publisher = " (" .. PublicationPlace .. PublisherName .. PublicationDate .. ")"
             Publisher = " (" .. PublicationPlace .. PublisherName .. PublicationDate .. ")"
         else
         else
Line 761: Line 763:
         end
         end
     else
     else
         if ( PublicationDate ~= nil and PublicationDate ~="" ) then
         if ( PublicationDate and PublicationDate ~="" ) then
             PublicationDate = " (published " .. PublicationDate .. ")"
             PublicationDate = " (published " .. PublicationDate .. ")"
             else PublicationDate = "" end
             else PublicationDate = "" end
         if ( PublisherName ~= nil and PublisherName ~="" ) then
         if ( PublisherName and PublisherName ~="" ) then
             Publisher = sepc .. " " .. PublicationPlace .. PublisherName .. PublicationDate else Publisher = "" end
             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 1,108: Line 1,112:
-- NOTE A1: This Lua module was originally designed to handle a mix
-- NOTE A1: This Lua module was originally designed to handle a mix
--      of citation styles, crossing Vancouver style with Wikipedia's
--      of citation styles, crossing Vancouver style with Wikipedia's
--      local Citation Style 1 (CS1) from {Template:Citation/core).
--      local Citation Style 1 (CS1) from {Template:Citation/core}.
--      However, the conflicting positions of parameters, scattered
--      However, the conflicting positions of parameters, scattered
--      in twisted locations across this module, led to a separate
--      in twisted locations across this module, led to a separate
Line 1,116: Line 1,120:
--      displayed parameters has been a continual headache, to keep
--      displayed parameters has been a continual headache, to keep
--      coordinated with the data in parentheses "(data)". There
--      coordinated with the data in parentheses "(data)". There
--      might be a need to pre-check for the existence of related
--      has been a need to pre-check for the existence of related
--      options, to keep from putting double-dots ".." in some cases.
--      options, to keep from putting double-dots ".." in some cases.
--      In particular, the omission of the "title=" parameter has led
--      to several cases of a spurious dot ". ." because the original
--      design had treated the title as a mandatory parameter.
--
--
------------------------------------------------------------------------
------------------------------------------------------------------------
Line 1,187: Line 1,194:
--05Mar2013 Fixed class encyclopaedia to show article as quoted Chapter.
--05Mar2013 Fixed class encyclopaedia to show article as quoted Chapter.
--05Mar2013 Fixed class encyclopaedia to show page as "pp." or "p.".
--05Mar2013 Fixed class encyclopaedia to show page as "pp." or "p.".
--07Mar2013 Changed class encyclopaedia to omit "( )" around publisher.
--
--
--End
--End
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.