Difference between revisions of "Template:Citation/core"

From Self-sufficiency
Jump to: navigation, search
(some of the templates appear to use a parameter named "Citation type" instead)
(Fixes, per talk page: 1) Archive url oddities with IncludedWorkURL. 2) Title nested italification error. 3) single quote conflicts)
Line 270: Line 270:
 
     | 2={{
 
     | 2={{
 
           #if: {{{Periodical|}}}
 
           #if: {{{Periodical|}}}
           |''{{{IncludedWorkTitle}}}''
+
           |''<nowiki />{{{IncludedWorkTitle}}}<nowiki />''
 
           |{{{IncludedWorkTitle|}}}{{
 
           |{{{IncludedWorkTitle|}}}{{
 
         #if: {{{TransTitle|}}}
 
         #if: {{{TransTitle|}}}
Line 283: Line 283:
 
     |
 
     |
 
     |{{
 
     |{{
         #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}{{{Periodical|}}}
+
         #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}
 
         |{{{Sep|,}}} written at {{{Place}}}
 
         |{{{Sep|,}}} written at {{{Place}}}
 
       }}
 
       }}
Line 392: Line 392:
 
   }}
 
   }}
 
}}{{
 
}}{{
#if:{{{language|}}}  
+
  #if: {{{language|}}}  
  | &#32;(in {{{language}}})
+
  |&#32;(in {{{language}}})
}}{{#if:{{{format|}}}
+
}}{{#if: {{{format|}}}
  |&#32;({{{format}}})
+
  |&#32;({{{format}}})
}}{{
+
}}{{
 
   #if: {{{Periodical|}}}|{{
 
   #if: {{{Periodical|}}}|{{
      #if:{{{IncludedWorkTitle|}}}{{{Title|}}}{{{TransTitle|}}}|{{{Sep|,}}}&#32;}}''{{{Periodical}}}''{{
+
      #if:{{{IncludedWorkTitle|}}}{{{Title|}}}{{{TransTitle|}}}|{{{Sep|,}}}&#32;}}''<nowiki />{{{Periodical}}}<nowiki />''{{
    #if: {{{Series|}}}
+
      #if: {{{Series|}}}
    |{{{Sep|,}}} {{{Series}}}
+
      |{{{Sep|,}}} {{{Series}}}
  }}{{
+
    }}{{
    #if: {{{PublicationPlace|}}}
+
      #if: {{{PublicationPlace|}}}
    |{{
+
      |{{
        #if: {{{Publisher|}}}
+
        #if: {{{Publisher|}}}
        |&#32;({{{PublicationPlace}}}<nowiki>: </nowiki>{{{Publisher}}})
+
        |&#32;({{{PublicationPlace}}}<nowiki>: </nowiki>{{{Publisher}}})
        |&#32;({{{PublicationPlace}}})
+
        |&#32;({{{PublicationPlace}}})
      }}
+
      }}
    |{{
+
      |{{
        #if: {{{Publisher|}}}
+
        #if: {{{Publisher|}}}
        |&#32;({{{Publisher}}})
+
        |&#32;({{{Publisher}}})
      }}
+
      }}
  }}{{
+
    }}{{
    #if: {{{Volume|}}}
+
      #if: {{{Volume|}}}
    |&#32;'''{{{Volume}}}'''{{
+
      |&#32;'''<nowiki />{{{Volume}}}<nowiki />'''{{
        #if: {{{Issue|}}}
+
        #if: {{{Issue|}}}
        |&#32;({{{Issue}}})
+
        |&#32;({{{Issue}}})
      }}
+
      }}
    |{{
+
      |{{
        #if: {{{Issue|}}}
+
        #if: {{{Issue|}}}
        |&#32;({{{Issue}}})
+
        |&#32;({{{Issue}}})
      }}
+
      }}
  }}{{
+
    }}{{
    #if: {{{At|}}}
+
      #if: {{{At|}}}
    |<nowiki>: </nowiki> {{{At}}}
+
      |<nowiki>: </nowiki> {{{At}}}
  }}
+
    }}
  |{{
+
  |{{
    <!--============ Anything else with a title, including books ============-->
+
      <!--============ Anything else with a title, including books ============-->
    #if: {{{Title|}}}{{{TransItalic|}}}
+
      #if: {{{Title|}}}{{{TransItalic|}}}
    |{{
+
      |{{
        #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}{{{Periodical|}}}
+
        #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}{{{Periodical|}}}
        |{{{Sep|,}}}&#32;|&#32;
+
        |{{{Sep|,}}}&#32;|&#32;
      }}''<nowiki></nowiki>{{Citation/make link
+
      }}{{Citation/make link
        | 1={{
+
        | 1={{
              #if: {{{IncludedWorkTitle|}}}
+
              #if: {{{IncludedWorkTitle|}}}
              |{{
+
              |{{
                #if: {{{IncludedWorkURL|}}}
+
                  #if: {{{IncludedWorkURL|}}}
                |{{
+
                  |{{
                    #if: {{{URL|}}}
+
                    #if: {{{URL|}}}
                    |{{{URL}}}
+
                    |{{{URL}}}
                    |{{#ifexpr:{{#time: U}} > {{#time: U | {{{Embargo|2001-10-10}}} }}|{{  
+
                    |{{#ifexpr:{{#time: U}} > {{#time: U | {{{Embargo|2001-10-10}}} }}|{{  
                      #if: {{{PMC|}}}  
+
                        #if: {{{PMC|}}}  
                      |  http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid={{{PMC}}}
+
                        |  http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid={{{PMC}}}
                    }}}}
+
                      }}}}
                  }}
+
                  }}
              }}
+
                }}
              |{{
+
              |{{
                #if: {{{URL|}}}
+
                  #if: {{{URL|}}}
                |{{{URL}}}
+
                  |{{{URL}}}
                              |{{#ifexpr:{{#time: U}} > {{#time: U | {{{Embargo|2001-10-10}}} }}|{{  
+
                                |{{#ifexpr:{{#time: U}} > {{#time: U | {{{Embargo|2001-10-10}}} }}|{{  
                    #if: {{{PMC|}}}  
+
                    #if: {{{PMC|}}}  
                    |  http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid={{{PMC}}}       
+
                    |  http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pmcentrez&artid={{{PMC}}}       
                  }}}}
+
                  }}}}
              }}
+
                }}
            }}
+
            }}
        | 2={{{Title|}}}{{
+
        | 2=''<nowiki />{{{Title|}}}{{
        #if:{{{TransItalic|}}}|&#32;&#91;{{{TransItalic}}}&#93;}}
+
            #if:{{{TransItalic|}}}|&#32;&#91;{{{TransItalic}}}&#93;
      }}<nowiki></nowiki>''}}{{
+
          }}<nowiki />''}}}}{{
        #if: {{{Series|}}}
+
      #if: {{{Series|}}}
        |{{{Sep|,}}} {{{Series}}}
+
      |{{{Sep|,}}} {{{Series}}}
      }}{{
+
    }}{{
        #if: {{{Volume|}}}
+
      #if: {{{Volume|}}}
        |{{{Sep|,}}} '''{{{Volume}}}'''
+
      |{{{Sep|,}}} '''<nowiki />{{{Volume}}}<nowiki />'''
      }}{{
+
    }}{{
        #if: {{{Other|}}}  
+
      #if: {{{Other|}}}  
        |{{{Sep|,}}} {{{Other|}}}
+
      |{{{Sep|,}}} {{{Other|}}}
      }}{{
+
    }}{{
        #if: {{{Edition|}}}
+
      #if: {{{Edition|}}}
        |&#32;({{{Edition}}} ed.)
+
      |&#32;({{{Edition}}} ed.)
      }}{{
+
    }}{{
        #if: {{{PublicationPlace|}}}
+
      #if: {{{PublicationPlace|}}}
        |{{{Sep|,}}} {{{PublicationPlace}}}
+
      |{{{Sep|,}}} {{{PublicationPlace}}}
      }}{{
+
    }}{{
        #if: {{{Publisher|}}}
+
      #if: {{{Publisher|}}}
        |{{
+
      |{{
          #if: {{{PublicationPlace|}}}
+
        #if: {{{PublicationPlace|}}}
          |<nowiki>:</nowiki>
+
        |<nowiki>:</nowiki>
          |{{{Sep|,}}}
+
        |{{{Sep|,}}}
        }} {{{Publisher}}}
+
      }} {{{Publisher}}}
      }}
+
    }}
  }}{{
+
}}{{
 
<!--============ Date (if no author/editor) ============-->
 
<!--============ Date (if no author/editor) ============-->
 
   #if: {{{Surname1|}}}{{{EditorSurname1|}}}
 
   #if: {{{Surname1|}}}{{{EditorSurname1|}}}
Line 529: Line 529:
 
<!--============ Misc. Identifier ============-->
 
<!--============ Misc. Identifier ============-->
 
   #if: {{{ID|}}}
 
   #if: {{{ID|}}}
   |{{{Sep|,}}} {{{ID}}}
+
   |{{
 +
    #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}{{{Periodical|}}}{{{Title|}}}{{{TransItalic|}}}
 +
    |{{{Sep|,}}} {{{ID}}}
 +
    |{{{ID}}}
 +
  }}
 
}}{{
 
}}{{
 
<!--============ ISBN ============-->
 
<!--============ ISBN ============-->
Line 563: Line 567:
 
   #if:{{{ArchiveURL|}}}{{{ArchiveDate|}}}
 
   #if:{{{ArchiveURL|}}}{{{ArchiveDate|}}}
 
   |{{{Sep|,}}} {{#ifeq:{{{Sep}}}|.|A|a}}rchived{{
 
   |{{{Sep|,}}} {{#ifeq:{{{Sep}}}|.|A|a}}rchived{{
     #if:{{{OriginalURL|}}}
+
     #if:{{{OriginalURL|}}}{{{IncludedWorkURL|}}}
     |{{#if:{{{ArchiveURL|}}}|&#32;from {{Citation/make link|{{{OriginalURL}}}|the original}}}}
+
     |{{#if:{{{ArchiveURL|}}}|&#32;from {{Citation/make link|{{{OriginalURL|{{{IncludedWorkURL|}}}}}}|the original}}}}
 
     }}{{
 
     }}{{
 
     #if:{{{ArchiveDate|}}}
 
     #if:{{{ArchiveDate|}}}
 
     |&#32;on {{{ArchiveDate}}}
 
     |&#32;on {{{ArchiveDate}}}
 
     }}{{
 
     }}{{
     #if:{{#if:{{{ArchiveURL|}}}||A}}{{#if:{{{OriginalURL|}}}||B}}{{#if:{{{ArchiveDate|}}}||C}}
+
     #if:{{#if:{{{ArchiveURL|}}}||A}}{{#if:{{{OriginalURL|}}}{{{IncludedWorkURL|}}}||B}}{{#if:{{{ArchiveDate|}}}||C}}
 
     |. {{citation error
 
     |. {{citation error
       |If you specify <code>&#124;{{#if:{{{ArchiveURL|}}}|archiveurl|archivedate}}&#61;</code>, you must {{#if:{{{OriginalURL|}}}| also specify <code>&#124;{{#if:{{{ArchiveURL|}}}|archivedate|archiveurl}}&#61;</code>|first specify <code>&#124;url&#61;</code>}}}}
+
       |If you specify <code>&#124;{{#if:{{{ArchiveURL|}}}|archiveurl|archivedate}}&#61;</code>, you must {{#if:{{{OriginalURL|}}}{{{IncludedWorkURL|}}}| also specify <code>&#124;{{#if:{{{ArchiveURL|}}}|archivedate|archiveurl}}&#61;</code>|first specify <code>&#124;url&#61;</code>}}}}
 
     }}
 
     }}
 
   }}
 
   }}
 
}}{{  
 
}}{{  
 
<!--============ URL and AccessDate ============-->
 
<!--============ URL and AccessDate ============-->
   #if: {{{URL|{{{IncludedWorkURL|}}}}}}
+
   #if: {{{URL|}}}{{{IncludedWorkURL|}}}
 
   |{{
 
   |{{
 
     #if: {{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
 
     #if: {{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
Line 594: Line 598:
 
     }}
 
     }}
 
}}{{#if:{{{laysummary|}}}  
 
}}{{#if:{{{laysummary|}}}  
   |{{{Sep|,}}} [{{{laysummary}}} Lay summary]{{#if: {{{laysource|}}}|&nbsp;&ndash;&nbsp;''{{{laysource}}}''}}
+
   |{{{Sep|,}}} [{{{laysummary}}} Lay summary]{{#if: {{{laysource|}}}|&nbsp;&ndash;&nbsp;''<nowiki />{{{laysource}}}<nowiki />''}}
 
}}{{#if:{{{laydate|}}}
 
}}{{#if:{{{laydate|}}}
 
   | &#32;({{{laydate}}})
 
   | &#32;({{{laydate}}})
Line 682: Line 686:
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
     }}{{
 
     }}{{
       #if: {{{URL|{{{IncludedWorkURL|}}}}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
+
       #if: {{{URL|}}}{{{IncludedWorkURL|}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
{{Pp-template|small=yes}}
 
{{Pp-template|small=yes}}
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 02:21, 16 November 2009