Jump to content

Module:Citation/CS1: Difference between revisions

added space to AuthorSep & AuthorNameSep; handled empty "authorlink="
m>Wikid77
(added sepc for separator character between parameters; set "OCLC")
m>Wikid77
(added space to AuthorSep & AuthorNameSep; handled empty "authorlink=")
Line 106: Line 106:
             local one
             local one
             if ( maximum ~= nil and i == maximum + 1 ) then
             if ( maximum ~= nil and i == maximum + 1 ) then
                 one = "et al."
                 one = "<i>et al.</i>"
             elseif ( maximum ~= nil and i > maximum + 1 ) then
             elseif ( maximum ~= nil and i > maximum + 1 ) then
                 break
                 break
Line 123: Line 123:
                     one = one .. namesep .. first  
                     one = one .. namesep .. first  
                 end
                 end
                 if (person.link ~= nil) then one = "[[" .. person.link .. "|" .. one .. "]]" end
                 if (person.link ~= nil and person.link ~= "") then one = "[[" .. person.link .. "|" .. one .. "]]" end
             end
             end
             table.insert(text, one)
             table.insert(text, one)
Line 446: Line 446:
     -- We also add leading spaces and surrounding markup and punctuation to the various parts of the citation, but only when they are non-nil.
     -- We also add leading spaces and surrounding markup and punctuation to the various parts of the citation, but only when they are non-nil.
     if ( Authors == nil ) then  
     if ( Authors == nil ) then  
         local AuthorNameSep = args["author-name-separator"] or args["name-separator"] or "&#44; "
         local AuthorNameSep = args["author-name-separator"] or args["name-separator"] or "&#44;"
         local AuthorSep = args["author-separator"] or args["separator"] or "&#59; "
        AuthorNameSep = AuthorNameSep .. " "
         local AuthorSep = args["author-separator"] or args["separator"] or "&#59;"
        AuthorSep = AuthorSep .. " "
         local AuthorFormat = args["author-format"] or args.authorformat
         local AuthorFormat = args["author-format"] or args.authorformat
         local AuthorMaximum = tonumber(args["display-authors"] or args.displayauthors) or 8
         local AuthorMaximum = tonumber(args["display-authors"] or args.displayauthors) or 8
Line 684: Line 686:
     -- 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" )
     if ( config.CitationClass == "journal" or
        config.CitationClass == "citation" )
     then tcommon = Title .. TitleType .. TitleNote .. Language .. Format .. Edition .. Conference .. Periodical .. Series .. Publisher .. Agency .. Volume .. Others .. Issue .. Position
     then tcommon = Title .. TitleType .. TitleNote .. Language .. Format .. Edition .. Conference .. Periodical .. Series .. Publisher .. Agency .. Volume .. Others .. Issue .. Position
     else tcommon = Title .. TitleType .. TitleNote .. Series .. Language .. Format .. Edition .. Conference .. Periodical .. Volume .. Others .. Issue .. Publisher .. Agency .. Position end
     else tcommon = Title .. TitleType .. TitleNote .. Series .. Language .. Format .. Edition .. Conference .. Periodical .. Volume .. Others .. Issue .. Publisher .. Agency .. Position end
Line 1,013: Line 1,016:
--20Feb2013 Added sepc for separator character between parameters.
--20Feb2013 Added sepc for separator character between parameters.
--20Feb2013 Put "OCLC" for "Online Computer Library Center".
--20Feb2013 Put "OCLC" for "Online Computer Library Center".
--20Feb2013 Fix empty "authorlink=" as person.link ~= "".
--20Feb2013 Added space after AuthorSep & AuthorNameSep.
--
--
--End
--End
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.