Module:Citation/CS1: Difference between revisions

    m>Wikid77
    (moved Publisher / Agency before pages)
    m>Wikid77
    (fixed to show optional Format before endtitle "."; fixed to not show duplicate Publisher/Agency.)
    Line 528: Line 528:
                 URL = nil
                 URL = nil
             end
             end
            Title = Title .. "." -- with end-dot
         else  
         else  
             Title = ""  
             Title = ""  
    Line 673: Line 672:
         -- We build things this way because it is more efficient in LUA not to keep reassigning to the same string variable over and over.
         -- We build things this way because it is more efficient in LUA not to keep reassigning to the same string variable over and over.
         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
         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
         local tcommon = Title .. TitleType .. TitleNote .. Format .. Edition .. Language .. Conference .. Periodical .. Series .. Volume .. Issue .. Publisher .. Agency .. Position .. Page .. Pages .. At
        local endtitle = "."
        if (TitleType ~= "" or TitleNote ~= "" or Format ~= "")
        then endtitle = "" end
         local tcommon = Title .. TitleType .. TitleNote .. Format .. endtitle .. Edition .. Language .. Conference .. Periodical .. Series .. Volume .. Issue .. Publisher .. Agency .. Position .. Page .. Pages .. At
         -- 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 .. Page .. Pages .. At
         -- 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 .. Page .. Pages .. At


    Line 686: Line 688:
             if ( "" ~= Date ) then Date = " (" .. Date ..")" .. OrigYear .. ". "
             if ( "" ~= Date ) then Date = " (" .. Date ..")" .. OrigYear .. ". "
             else Editors = Editors .. ". " end
             else Editors = Editors .. ". " end
             text = Editors .. Date .. Chapter .. tcommon .. Publisher .. Agency .. idcommon
             text = Editors .. Date .. Chapter .. tcommon .. idcommon
         else
         else
             if ( "" ~= Date ) then Date = " " .. Date .. "." end
             if ( "" ~= Date ) then Date = " " .. Date .. "." end
             text = Chapter .. tcommon .. Publisher .. Agency .. Date .. idcommon
             text = Chapter .. tcommon .. Date .. idcommon
         end
         end
          
          
    Line 967: Line 969:
    --19Feb2013 Copied as Module:Citation/CS1 to alter to match wp:CS1 form.
    --19Feb2013 Copied as Module:Citation/CS1 to alter to match wp:CS1 form.
    --19Feb2013 Changed OrigYear to use [__] for CS1 style.
    --19Feb2013 Changed OrigYear to use [__] for CS1 style.
    --19Feb2013 Fixed to not show duplicate Publisher/Agency.
    --
    --
    --End
    --End