Jump to content

Module:Citation/CS1: Difference between revisions

replaced more dots "." with sepc.
m>Wikid77
(added space to AuthorSep & AuthorNameSep; handled empty "authorlink=")
m>Wikid77
(replaced more dots "." with sepc.)
Line 517: Line 517:
             end
             end
         end
         end
         Chapter = Chapter .. ". " -- with end-space
         Chapter = Chapter .. sepc .. " " -- with end-space
     else  
     else  
         Chapter = ""  
         Chapter = ""  
Line 676: Line 676:
     else
     else
         if ( PublicationDate ~= nil ) then PublicationDate = " (published " .. PublicationDate .. ")" else PublicationDate = "" end
         if ( PublicationDate ~= nil ) then PublicationDate = " (published " .. PublicationDate .. ")" else PublicationDate = "" end
         if ( PublisherName ~= nil ) then Publisher = ". " .. PublicationPlace .. PublisherName .. PublicationDate else Publisher = "" end
         if ( PublisherName ~= nil ) then 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.
     if ( Periodical ~= nil ) then  
     if ( Periodical ~= nil ) then  
         Periodical = ". <i>" .. Periodical .. "</i>"
         Periodical = sepc .. " <i>" .. Periodical .. "</i>"
     else Periodical = "" end
     else Periodical = "" end
      
      
     -- Piece all bits together at last.  At this point, all should be non-nil.
     -- Piece all bits together at last.  Here, all should be non-nil.
     -- 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 tcommon
     local tcommon
     if ( config.CitationClass == "journal" or
     if ( config.CitationClass == "journal" or
Line 706: Line 707:
     elseif ( "" ~= Editors) then
     elseif ( "" ~= Editors) then
         Editors = Editors .. " (eds.)"
         Editors = Editors .. " (eds.)"
         if ( "" ~= Date ) then Date = " (" .. Date ..")" .. OrigYear .. ". "
         if ( "" ~= Date ) then Date = " (" .. Date ..")" .. OrigYear .. sepc .. " "
         else Editors = Editors .. ". " end
         else Editors = Editors .. sepc .. " " end
         text = Editors .. Date .. Chapter .. tcommon .. Page .. Pages .. At .. idcommon
         text = Editors .. Date .. Chapter .. tcommon .. Page .. Pages .. At .. idcommon
     else
     else
         if ( "" ~= Date ) then Date = " " .. Date .. "'''" .. string.sub(".",-1,-1) .. "'''" end
         if ( "" ~= Date ) then Date = " " .. Date .. sepc end
         text = Chapter .. tcommon .. Date .. Page .. Pages .. At .. idcommon
         text = Chapter .. tcommon .. Date .. Page .. Pages .. At .. idcommon
     end
     end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.