Module:Citation/CS1: Difference between revisions

fixed author's editor for "in" or "In" and put space after sepc.
m>Wikid77
(capitalized "Archived/Retrieved" only when sepc is dot "." separator.)
m>Wikid77
(fixed author's editor for "in" or "In" and put space after sepc.)
Line 96: Line 96:


function listpeople(control, people)
function listpeople(control, people)
     local sep = control.sep .. " "
     local sep = control.sep .. " "
     local namesep = control.namesep
     local namesep = control.namesep
     local format = control.format
     local format = control.format
Line 343: Line 343:
           end
           end
         end
         end
     end
     elseif ( config.CitationClass == "citation" ) then
    if ( config.CitationClass == "citation" ) then
         sepc = ","
         sepc = ","
         if ( Ref == nil ) then Ref = "harv" end
         if ( Ref == nil ) then Ref = "harv" end
Line 751: Line 750:
         Periodical = sepc .. " <i>" .. Periodical .. "</i>"
         Periodical = sepc .. " <i>" .. Periodical .. "</i>"
     else Periodical = "" end
     else Periodical = "" end
   
 
     -- Piece all bits together at last.  Here, 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
     -- We build things this way because it is more efficient in LUA
     -- not to keep reassigning to the same string variable over and over.
     -- not to keep reassigning to the same string variable over and over.
     local tcommon
     local tcommon
     if ( config.CitationClass == "journal" )
     if ( config.CitationClass == "journal" )
Line 776: Line 776:
         if ( "" ~= Date ) then Date = " ("..Date..")" .. OrigYear .. sepc .. " "
         if ( "" ~= Date ) then Date = " ("..Date..")" .. OrigYear .. sepc .. " "
         else Authors = Authors .. sepc .. " " end
         else Authors = Authors .. sepc .. " " end
         if ( "" ~= Editors ) then Editors = " in " .. Editors .. sepc end
         if ( "" ~= Editors) then
            local in_text = " in "
            if (sepc == '.') then in_text = " In " end
            Editors = in_text .. Editors .. sepc .. " "
        end
         text = Authors .. Coauthors .. " "..Date .. Chapter .. Editors .. tcommon .. Page .. Pages .. At .. idcommon
         text = Authors .. Coauthors .. " "..Date .. Chapter .. Editors .. tcommon .. Page .. Pages .. At .. idcommon
     elseif ( "" ~= Editors) then
     elseif ( "" ~= Editors) then
Line 1,121: Line 1,125:
--22Feb2013 Fixed config.CitationClass "citation" as span class="citation".
--22Feb2013 Fixed config.CitationClass "citation" as span class="citation".
--22Feb2013 Capitalized "Archived/Retrieved" only when sepc is dot ".".
--22Feb2013 Capitalized "Archived/Retrieved" only when sepc is dot ".".
--23Feb2013 Fixed author editor for "in" or "In" and put space after sepc.
--
--
--End
--End
Anonymous user