Jump to content

Module:Citation/CS1: Difference between revisions

fixed double-dot before "p." or "pp." page number; fixed config.CitationClass "book" to use p./pp. page number.
m>Wikid77
(fixed end double-dot after book/work title (very rare).)
m>Wikid77
(fixed double-dot before "p." or "pp." page number; fixed config.CitationClass "book" to use p./pp. page number.)
Line 655: Line 655:
     elseif ( Periodical ~= nil and Periodical ~= "" and
     elseif ( Periodical ~= nil and Periodical ~= "" and
             config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "news" and
             config.CitationClass ~= "web" and
             config.CitationClass ~= "web") then
            config.CitationClass ~= "book" and
             config.CitationClass ~= "news") then
         Page = ": " .. Page
         Page = ": " .. Page
     else
     else
Line 665: Line 666:
     elseif ( Periodical ~= nil and Periodical ~= "" and
     elseif ( Periodical ~= nil and Periodical ~= "" and
             config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "encyclopaedia" and
             config.CitationClass ~= "news" and
             config.CitationClass ~= "web" and
             config.CitationClass ~= "web") then
            config.CitationClass ~= "book" and
             config.CitationClass ~= "news") then
         Pages = ": " .. Pages
         Pages = ": " .. Pages
     else
     else
Line 874: Line 876:


     local text
     local text
    local pgtext = Page .. Pages .. At
     if ( "" ~= Authors ) then
     if ( "" ~= Authors ) then
         if (Coauthors ~= "")  
         if (Coauthors ~= "")  
Line 894: Line 897:
             end
             end
         end
         end
         text = Authors .. Date .. Chapter .. Editors .. tcommon .. Page .. Pages .. At .. idcommon
         text = Authors .. Date .. Chapter .. Editors .. tcommon
        if ( text:sub(-1,-1) == "." and --prior text ends as "."
            pgtext:sub(1,1) == "." )
            then pgtext = pgtext:sub(2,-1) end --truncate by 1
        text = text .. pgtext .. idcommon
     elseif ( "" ~= Editors) then
     elseif ( "" ~= Editors) then
         if ( "" ~= Date ) then
         if ( "" ~= Date ) then
Line 910: Line 917:
             end                 
             end                 
         end
         end
         text = Editors .. Date .. Chapter .. tcommon .. Page .. Pages .. At .. idcommon
         text = Editors .. Date .. Chapter .. tcommon
        if ( text:sub(-1,-1) == "." and --prior text ends as "."
            pgtext:sub(1,1) == "." )
            then pgtext = pgtext:sub(2,-1) end --truncate by 1
        text = text .. pgtext .. idcommon
     else
     else
         if ( "" ~= Date ) then
         if ( "" ~= Date ) then
Line 918: Line 929:
             end
             end
         end -- endif ""~=Date
         end -- endif ""~=Date
         text = Chapter .. tcommon .. Date .. Page .. Pages .. At .. idcommon
         text = Chapter .. tcommon .. Date
        if ( text:sub(-1,-1) == "." and --prior text ends as "."
            pgtext:sub(1,1) == "." )
            then pgtext = pgtext:sub(2,-1) end --truncate by 1
        text = text .. pgtext .. idcommon
     end
     end
      
      
Line 1,285: Line 1,300:
--13Mar2013 Fixed missing "location=" when "web" or "encyclopaedia".
--13Mar2013 Fixed missing "location=" when "web" or "encyclopaedia".
--14Mar2013 Fixed end double-dot after book/work title.
--14Mar2013 Fixed end double-dot after book/work title.
--14Mar2013 Fixed double-dot before "p." or "pp." page number.
--14Mar2013 Fixed config.CitationClass "book" to use p./pp. page.
--
--
--End
--End
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.