Jump to content

Module:Citation/CS1: Difference between revisions

fixed to allow empty parameters (ASIN= |DOI= etc.).
m>Wikid77
(fixed to allow "contribution=x" (formerly ignored); fixed "EditorSep" (was misspelled "EdithorSep").)
m>Wikid77
(fixed to allow empty parameters (ASIN= |DOI= etc.).)
Line 457: Line 457:
     if ( Editors == nil ) then  
     if ( Editors == nil ) then  
         local EditorNameSep = args["editor-name-separator"] or args["name-separator"] or ","
         local EditorNameSep = args["editor-name-separator"] or args["name-separator"] or ","
         EditorNameSep = EditorNameSep + " "
         EditorNameSep = EditorNameSep .. " "
         local EditorSep = args["editor-separator"] or args["separator"] or "&#59;"
         local EditorSep = args["editor-separator"] or args["separator"] or "&#59;"
         EditorSep = EditorSep + " "
         EditorSep = EditorSep .. " "
         local EditorFormat = args["editor-format"] or args.editorformat
         local EditorFormat = args["editor-format"] or args.editorformat
         local EditorMaximum = tonumber(args["display-editors"] or args.displayeditors) or 3
         local EditorMaximum = tonumber(args["display-editors"] or args.displayeditors) or 3
Line 613: Line 613:
         SubscriptionRequired = ""
         SubscriptionRequired = ""
     end
     end
     if ( ARXIV ~= nil ) then ARXIV = " " .. externallinkid(frame, {label="arXiv",link="arXiv",prefix="http://arxiv.org/abs/",id=ARXIV,separator=":"}) else ARXIV = "" end
     if ( ARXIV > "" ) then ARXIV = " " .. externallinkid(frame, {label="arXiv",link="arXiv",prefix="http://arxiv.org/abs/",id=ARXIV,separator=":"}) else ARXIV = "" end
     if ( ASIN ~= nil ) then ASIN = " " .. amazon(frame, ASIN, ASINTLD) else ASIN = "" end
     if ( ASIN > "" ) then ASIN = " " .. amazon(frame, ASIN, ASINTLD) else ASIN = "" end
     if ( BIBCODE ~= nil ) then BIBCODE = " " .. externallinkid(frame, {label="Bibcode",link="Bibcode",prefix="http://adsabs.harvard.edu/abs/",id=BIBCODE,separator=":"}) else BIBCODE = "" end
     if ( BIBCODE > "" ) then BIBCODE = " " .. externallinkid(frame, {label="Bibcode",link="Bibcode",prefix="http://adsabs.harvard.edu/abs/",id=BIBCODE,separator=":"}) else BIBCODE = "" end
     if ( DOI ~= nil ) then DOI = " " .. doi(frame, DOI, DoiBroken) else DOI = "" end
     if ( DOI > "" ) then DOI = " " .. doi(frame, DOI, DoiBroken) else DOI = "" end
     if ( ID ~= nil ) then ID = " " .. ID else ID = "" end
     if ( ID > "" ) then ID = " " .. ID else ID = "" end
     if ( ISBN ~= nil ) then ISBN = " " .. internallinkid(frame, {label="ISBN",link="International Standard Book Number",prefix="Special:BookSources/",id=ISBN}) else ISBN = "" end
     if ( ISBN > "" ) then ISBN = " " .. internallinkid(frame, {label="ISBN",link="International Standard Book Number",prefix="Special:BookSources/",id=ISBN}) else ISBN = "" end
     if ( ISSN ~= nil ) then ISSN = " " .. externallinkid(frame, {label="ISSN",link="International Standard Serial Number",prefix="//www.worldcat.org/issn/",id=ISSN}) else ISSN = "" end
     if ( ISSN > "" ) then ISSN = " " .. externallinkid(frame, {label="ISSN",link="International Standard Serial Number",prefix="//www.worldcat.org/issn/",id=ISSN}) else ISSN = "" end
     if ( JFM ~= nil ) then JFM = " " .. externallinkid(frame, {label="JFM",link="Jahrbuch über die Fortschritte der Mathematik",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=JFM}) else JFM = "" end
     if ( JFM > "" ) then JFM = " " .. externallinkid(frame, {label="JFM",link="Jahrbuch über die Fortschritte der Mathematik",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=JFM}) else JFM = "" end
     if ( JSTOR ~= nil ) then JSTOR = " " .. externallinkid(frame, {label="JSTOR",link="JSTOR",prefix="http://www.jstor.org/stable/",id=JSTOR}) else JSTOR = "" end
     if ( JSTOR > "" ) then JSTOR = " " .. externallinkid(frame, {label="JSTOR",link="JSTOR",prefix="http://www.jstor.org/stable/",id=JSTOR}) else JSTOR = "" end
     if ( LCCN ~= nil ) then LCCN = " " .. externallinkid(frame, {label="LCCN",link="Library of Congress Control Number",prefix="http://lccn.loc.gov/",id=LCCN}) else LCCN = "" end
     if ( LCCN > "" ) then LCCN = " " .. externallinkid(frame, {label="LCCN",link="Library of Congress Control Number",prefix="http://lccn.loc.gov/",id=LCCN}) else LCCN = "" end
     if ( MR ~= nil ) then MR = " " .. externallinkid(frame, {label="MR",link="Mathematical Reviews",prefix="http://www.ams.org/mathscinet-getitem?mr=",id=MR}) else MR = "" end
     if ( MR > "" ) then MR = " " .. externallinkid(frame, {label="MR",link="Mathematical Reviews",prefix="http://www.ams.org/mathscinet-getitem?mr=",id=MR}) else MR = "" end
     if ( OCLC ~= nil ) then OCLC = " " .. externallinkid(frame, {label="OCLC",link="OCLC",prefix="//www.worldcat.org/oclc/",id=OCLC}) else OCLC = "" end
     if ( OCLC > "" ) then OCLC = " " .. externallinkid(frame, {label="OCLC",link="OCLC",prefix="//www.worldcat.org/oclc/",id=OCLC}) else OCLC = "" end
     if ( OL ~= nil ) then OL = " " .. openlibrary(frame, OL) else OL = "" end
     if ( OL > "" ) then OL = " " .. openlibrary(frame, OL) else OL = "" end
     if ( OSTI ~= nil ) then OSTI = " " .. externallinkid(frame, {label="OSTI",link="Office of Scientific and Technical Information",prefix="http://www.osti.gov/energycitations/product.biblio.jsp?osti_id=",id=OSTI}) else OSTI = "" end
     if ( OSTI > "" ) then OSTI = " " .. externallinkid(frame, {label="OSTI",link="Office of Scientific and Technical Information",prefix="http://www.osti.gov/energycitations/product.biblio.jsp?osti_id=",id=OSTI}) else OSTI = "" end
     if ( PMC ~= nil ) then PMC = " " .. externallinkid(frame, {label="PMC",link="PubMed Central",prefix="//www.ncbi.nlm.nih.gov/pmc/articles/PMC",suffix="/?tool=pmcentrez",id=PMC}) else PMC = "" end
     if ( PMC > "" ) then PMC = " " .. externallinkid(frame, {label="PMC",link="PubMed Central",prefix="//www.ncbi.nlm.nih.gov/pmc/articles/PMC",suffix="/?tool=pmcentrez",id=PMC}) else PMC = "" end
     if ( PMID ~= nil ) then PMID = " " .. externallinkid(frame, {label="PMID",link="PubMed Identifier",prefix="//www.ncbi.nlm.nih.gov/pubmed/",id=PMID}) else PMID = "" end
     if ( PMID > "" ) then PMID = " " .. externallinkid(frame, {label="PMID",link="PubMed Identifier",prefix="//www.ncbi.nlm.nih.gov/pubmed/",id=PMID}) else PMID = "" end
     if ( RFC ~= nil ) then RFC = " " .. externallinkid(frame, {label="RFC",link="Request for Comments",prefix="//tools.ietf.org/html/rfc",id=RFC}) else RFC = "" end
     if ( RFC > "" ) then RFC = " " .. externallinkid(frame, {label="RFC",link="Request for Comments",prefix="//tools.ietf.org/html/rfc",id=RFC}) else RFC = "" end
     if ( SSRN ~= nil ) then SSRN = " " .. externallinkid(frame, {label="SSRN",link="Social Science Research Network",prefix="http://ssrn.com/abstract=",id=SSRN}) else SSRN = "" end
     if ( SSRN > "" ) then SSRN = " " .. externallinkid(frame, {label="SSRN",link="Social Science Research Network",prefix="http://ssrn.com/abstract=",id=SSRN}) else SSRN = "" end
     if ( URL ~= nil ) then URL = " " .. url(frame, URL) else URL = "" end
     if ( URL > "" ) then URL = " " .. url(frame, URL) else URL = "" end
     if ( ZBL ~= nil ) then ZBL = " " .. externallinkid(frame, {label="ZBL",link="Zentralblatt MATH",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=ZBL}) else ZBL = "" end
     if ( ZBL > "" ) then ZBL = " " .. externallinkid(frame, {label="Zbl",link="Zentralblatt MATH",prefix="http://www.zentralblatt-math.org/zmath/en/search/?format=complete&q=an:",id=ZBL}) else ZBL = "" end
     if ( Quote ~= nil ) then  
     if ( Quote > "" ) then  
         Quote = " \"" .. Quote .. "\""  
         Quote = " \"" .. Quote .. "\""  
         PostScript = ""
         PostScript = ""
     else  
     else  
         if ( PostScript ~= nil ) then PostScript = " " .. PostScript else PostScript = "" end
         if ( PostScript > "" ) then PostScript = " " .. PostScript else PostScript = "" end
         Quote = ""  
         Quote = ""  
     end
     end
Line 1,024: Line 1,024:
--21Feb2013 Fixed to allow "contribution=x" as "new" parameter.
--21Feb2013 Fixed to allow "contribution=x" as "new" parameter.
--21Feb2013 Fixed separator "EditorSep" (was "EdithorSep").
--21Feb2013 Fixed separator "EditorSep" (was "EdithorSep").
--21Feb2013 Fixed to allow empty parameters (ASIN= |DOI= etc.).
--
--
--End
--End
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.