Still working to recover. Please don't edit quite yet.

Difference between revisions of "Template:Cite book"

From Anarchopedia
Jump to: navigation, search
m (testing an older version of the template)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
−
<includeonly><cite class="book" style="font-style:normal" {{
+
<cite class="book" style="font-style:normal">{{qif
−
   #if: {{{ref|}}}
+
   |test={{{author|{{{last|}}}}}}
−
  |{{#ifeq:{{{ref}}}|none||id="{{{ref}}}"}}
+
   |then={{qif
−
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
+
     |test={{{authorlink|}}}
−
}}>{{
+
     |then=[[{{{authorlink}}}|{{qif
−
  #if: {{{author|{{{last|}}}}}}
+
       |test={{{last|}}}
−
   | {{
+
       |then={{{last}}}{{qif
−
     #if: {{{authorlink|}}}
+
        |test={{{first|}}}
−
     | [[{{{authorlink}}}|{{
+
        |then=, {{{first}}}
−
       #if: {{{last|}}}
+
      }}
−
       | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
       |else={{{author}}}
−
       | {{{author}}}
+
 
     }}]]
 
     }}]]
−
     | {{
+
     |else={{qif
−
       #if: {{{last|}}}
+
       |test={{{last|}}}
−
       | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
       |then={{{last}}}{{qif
−
       | {{{author}}}
+
        |test={{{first|}}}
 +
        |then=, {{{first}}}
 +
      }}
 +
       |else={{{author}}}
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{
+
}}{{qif
−
   #if: {{{author|{{{last|}}}}}}
+
   |test={{{author|{{{last|}}}}}}
−
   | {{ #if: {{{coauthors|}}} | ,&#32;{{{coauthors}}} }}
+
   |then={{qif
−
}}{{
+
    |test={{{coauthors|}}}
−
   #if: {{{origdate|}}}
+
    |then=<nowiki>;</nowiki>&#32;{{{coauthors}}}
−
   | &#32;<nowiki>[</nowiki>{{{origdate}}}]
+
  }}
−
   | {{
+
}}{{qif
−
     #if: {{{origyear|}}}
+
   |test={{{origdate|}}}
−
     | {{
+
   |then=&#32;<nowiki>[</nowiki>{{{origdate}}}]
−
       #if: {{{origmonth|}}}
+
   |else={{qif
−
       | &#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
+
     |test={{{origyear|}}}
−
       | &#32;<nowiki>[</nowiki>{{{origyear}}}]
+
     |then={{qif
 +
       |test={{{origmonth|}}}
 +
       |then=&#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
 +
       |else=&#32;<nowiki>[</nowiki>{{{origyear}}}]
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{
+
}}{{qif
−
   #if: {{{date|}}}
+
   |test={{{date|}}}
−
   | &#32;({{{date}}})
+
   |then=&#32;({{{date}}})
−
   | {{
+
   |else={{qif
−
     #if: {{{year|}}}
+
     |test={{{year|}}}
−
     | {{
+
     |then={{qif
−
       #if: {{{month|}}}
+
       |test={{{month|}}}
−
       | &#32;({{{month}}} {{{year}}})
+
       |then=&#32;({{{month}}} {{{year}}})
−
       | &#32;({{{year}}})
+
       |else=&#32;({{{year}}})
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{ #if: {{{author|{{{last|}}}}}} | .
+
}}{{qif
−
}}{{
+
  |test={{{author|{{{last|}}}}}}
−
   #if: {{{chapter|}}}
+
  |then=.
−
   | &#32;“{{
+
}}{{qif
−
    #if: {{{chapterurl|}}}
+
   |test={{{chapter|}}}
−
    | [{{{chapterurl}}} {{{chapter}}}]
+
   |then=&#32;"{{qif
−
    | {{{chapter}}}
+
  |test={{{chapterurl|}}}
−
}}”,}}{{
+
  |then=[{{{chapterurl}}} {{{chapter}}}]
−
   #if: {{{editor|}}}
+
  |else={{{chapter}}}
−
   | &#32;{{{editor}}}
+
}}"}}{{qif
−
}} ''{{
+
   |test={{{editor|}}}
−
   #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
+
   |then=&#32;{{{editor}}}
−
}}''{{
+
}} ''{{qif
−
   #if: {{{format|}}} | &#32;({{{format}}})
+
   |test={{{url|}}}
−
}}{{
+
  |then=[{{{url}}} {{{title}}}]
−
   #if: {{{others|}}} | , {{{others}}}
+
  |else={{{title}}}
−
}}{{
+
}}''{{qif
−
   #if: {{{edition|}}} | , {{{edition}}}
+
   |test={{{format|}}}
−
}}{{
+
  |then=&#32;({{{format}}})
−
   #if: {{{language|}}} | &#32;(in {{{language}}})
+
}}{{qif
−
}}{{
+
   |test={{{others|}}}
−
   #if: {{{publisher|}}}
+
  |then=, {{{others}}}
−
   | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}} | ,&#32; | .&#32; }}{{  
+
}}{{qif
−
     #if: {{{location|}}}  
+
   |test={{{edition|}}}
−
     | {{{location}}}:&#32;
+
  |then=, {{{edition}}}
 +
}}{{qif
 +
   |test={{{language|}}}
 +
  |then=&#32;(in {{{language}}})
 +
}}{{qif
 +
   |test={{{pages|}}}
 +
   |then=, p. {{{pages}}}
 +
}}{{qif
 +
  |test={{{publisher|}}}
 +
  |then=, {{qif
 +
     |test={{{location|}}}
 +
     |then={{{location}}}:&#32;
 
   }}{{{publisher}}}
 
   }}{{{publisher}}}
−
}}{{
+
}}{{qif
−
   #if: {{{pages|}}} | ,&#32;{{{pages}}}
+
   |test={{{id|}}}
−
}}{{
+
   |then=. {{{id}}}
−
  #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi}}} {{{doi}}}]
+
}}{{qif
−
}}{{
+
   |test={{{accessdate|}}}
−
   #if: {{{id|}}} | . {{{id}}}
+
   |then=. URL accessed [[{{{accessdate}}}]]
−
}}{{
+
   |else={{qif
−
   #if: {{{accessdate|}}}
+
     |test={{{accessyear|}}}
−
   | . Retrieved on [[{{{accessdate}}}]]
+
     |then=. URL accessed {{qif
−
   | {{
+
       |test={{{accessmonth|}}}
−
     #if: {{{accessyear|}}}
+
       |then=on [[{{{accessmonth}}} {{{accessyear}}}]]
−
     | . Retrieved {{
+
       |else=during [[{{{accessyear}}}]]
−
       #if: {{{accessmonth|}}}
+
−
       | on [[{{{accessmonth}}} {{{accessyear}}}]]
+
−
       | during [[{{{accessyear}}}]]
+
 
     }}
 
     }}
 
   }}
 
   }}
−
}}.{{ #if: {{{quote|}}} | &nbsp;“{{{quote}}}”
+
}}.{{qif
−
}}</cite></includeonly><noinclude>{{/doc}}</noinclude>
+
  |test={{{quote|}}}
 +
  |then=&nbsp;"{{{quote}}}"
 +
}}</cite><noinclude>
 +
 
 +
 
 +
This template replaces the deprecated {{tl|book reference}}.
 +
{{esoteric}}
 +
[[Category:Citation templates|Book]]
 +
 
 +
[[sk:Šablóna:Knižná_referencia]]
 +
</noinclude>

Latest revision as of 02:13, 2 August 2008

{{{title}}}.


This template replaces the deprecated {{book reference}}. Template:esoteric