Module:Citation/CS1: Difference between revisions

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
(fixed double-dot ".." at end of authors/coauthors list)
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.)
Line 291: Line 291:
     local ConferenceURL = args["conference-url"] or args.conferenceurl
     local ConferenceURL = args["conference-url"] or args.conferenceurl
     local Periodical = args.journal or args.newspaper or args.magazine or args.work or args.periodical or args.encyclopedia or args.encyclopaedia
     local Periodical = args.journal or args.newspaper or args.magazine or args.work or args.periodical or args.encyclopedia or args.encyclopaedia
     if ( args.article and args.article ~= "") then
     if ( config.CitationClass == "encyclopaedia" ) then
        if ( Title and Title ~= "") then Periodical = Title end
      if ( args.article and args.article ~= "") then
        Title = args.article
          if ( Title and Title ~= "") then Periodical = Title end
          Chapter = args.article
          TransChapter = TransTitle
      else
          if ( Periodical and Periodical ~= "") then
            Chapter = Title
            TransChapter = TransTitle
          else Periodical = Title
          end
      end
      Title = ""
     end
     end
     local Series = args.series or args.version
     local Series = args.series or args.version
Line 527: Line 537:
     if ( Chapter and "" < Chapter ) then
     if ( Chapter and "" < Chapter ) then
         if ( ChapterLink and "" < ChapterLink ) then Chapter = "[[" .. ChapterLink .. "|" .. Chapter .. "]]" end
         if ( ChapterLink and "" < ChapterLink ) then Chapter = "[[" .. ChapterLink .. "|" .. Chapter .. "]]" end
         if ( Periodical and "" < Periodical ) then
         if ( Periodical and "" < Periodical
            and config.CitationClass ~= "encyclopaedia"
        ) then
             Chapter = "<i>" .. Chapter .. "</i>"
             Chapter = "<i>" .. Chapter .. "</i>"
         else
         else
Line 592: Line 604:
         Page = ""  
         Page = ""  
     elseif ( Periodical ~= nil and Periodical ~= "" and
     elseif ( Periodical ~= nil and Periodical ~= "" and
            config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "web") then
             config.CitationClass ~= "web") then
         Page = ": " .. Page
         Page = ": " .. Page
Line 600: Line 613:
         Pages = ""  
         Pages = ""  
     elseif ( Periodical ~= nil and Periodical ~= "" and
     elseif ( Periodical ~= nil and Periodical ~= "" and
            config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "web") then
             config.CitationClass ~= "web") then
         Pages = ": " .. Pages
         Pages = ": " .. Pages
Line 623: Line 637:
         Language = " (in " .. Language .. ")" else Language = "" end
         Language = " (in " .. Language .. ")" else Language = "" end
     if ( Edition ~= nil and Edition ~="" ) then
     if ( Edition ~= nil and Edition ~="" ) then
         Edition = " (" .. Edition .. " edition)" else Edition = "" end
         Edition = " (" .. Edition .. " ed.)" else Edition = "" end
     if ( Volume ~= nil and Volume ~="" )
     if ( Volume ~= nil and Volume ~="" )
     then
     then
Line 746: Line 760:
             else Publisher = "" end
             else Publisher = "" end
         end
         end
        Edition = ""
     else
     else
         if ( PublicationDate ~= nil and PublicationDate ~="" ) then
         if ( PublicationDate ~= nil and PublicationDate ~="" ) then
Line 768: Line 781:
     local tcommon
     local tcommon
     if ( config.CitationClass == "journal" )
     if ( config.CitationClass == "journal" )
     then tcommon = Title .. TitleNote .. Language .. Format .. TitleType .. Edition .. Conference .. Periodical .. Series .. Publisher .. Agency .. Others .. Volume .. Position
     then tcommon = Title .. TitleNote .. Format .. TitleType .. Conference .. Periodical .. Series .. Language .. Edition .. Publisher .. Agency .. Others .. Volume .. Position
     elseif ( config.CitationClass == "citation" )
     elseif ( config.CitationClass == "citation" )
     then tcommon = Title .. TitleNote .. Language .. Format .. TitleType .. Edition .. Conference .. Periodical .. Series .. Volume .. Publisher .. Agency .. Others .. Position
     then tcommon = Title .. TitleNote .. Format .. TitleType .. Conference .. Periodical .. Series .. Language .. Volume .. Edition .. Publisher .. Agency .. Others .. Position
     else tcommon = Title .. TitleNote .. Series .. Language .. Format .. TitleType .. Edition .. Conference .. Periodical .. Volume .. Publisher .. Agency .. Others .. Position
     else tcommon = Title .. TitleNote .. Series .. Format .. TitleType .. Conference .. Periodical .. Language .. Volume .. Edition .. Publisher .. Agency .. Others .. Position
     end
     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
Line 782: Line 795:
     if ( config.CitationClass == "citation") then enddot = "" end
     if ( config.CitationClass == "citation") then enddot = "" end
     idcommon = idcommon .. enddot
     idcommon = idcommon .. enddot
    if ( config.CitationClass == "encyclopaedia" ) then
        Chapter = Chapter
    end


     local text
     local text
Line 1,166: Line 1,183:
--27Feb2013 Removed duplicate display of "others=" data.
--27Feb2013 Removed duplicate display of "others=" data.
--27Feb2013 Removed parentheses "( )" around "department" TitleNote.
--27Feb2013 Removed parentheses "( )" around "department" TitleNote.
--05Mar2013 Moved Language to follow Periodical or Series.
--05Mar2013 Fixed Edition to follow Series or Volume.
--05Mar2013 Fixed class encyclopaedia to show article as quoted Chapter.
--05Mar2013 Fixed class encyclopaedia to show page as "pp." or "p.".
--
--
--End
--End
Anonymous user