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

Difference between revisions of "Template:Cite book"

From Anarchopedia
Jump to: navigation, search
m (test)
(trying older version)
Line 1: Line 1:
<includeonly><cite class="book" style="font-style:normal" {{#if: {{{ref|}}}
+
<cite class="book" style="font-style:normal">{{qif
   |{{#ifeq:{{{ref}}}|none||id="{{{ref}}}"}}
+
   |test={{{author|{{{last|}}}}}}
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
+
  |then={{qif
}}>{{#if: {{{author|{{{last|}}}}}}
+
    |test={{{authorlink|}}}
  | {{#if: {{{authorlink|}}}
+
     |then=[[{{{authorlink}}}|{{qif
     | [[{{{authorlink}}}|{{#if: {{{last|}}}
+
      |test={{{last|}}}
       | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }}
+
       |then={{{last}}}{{qif
       | {{{author}}}
+
        |test={{{first|}}}
 +
        |then=, {{{first}}}
 +
      }}
 +
       |else={{{author}}}
 
     }}]]
 
     }}]]
     | {{#if: {{{last|}}}
+
     |else={{qif
       | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }}
+
      |test={{{last|}}}
       | {{{author}}}
+
       |then={{{last}}}{{qif
 +
        |test={{{first|}}}
 +
        |then=, {{{first}}}
 +
      }}
 +
       |else={{{author}}}
 
     }}
 
     }}
 
   }}
 
   }}
}}{{#if: {{{author|{{{last|}}}}}}
+
}}{{qif
   | {{#if: {{{coauthors|}}} | ,&#32;{{{coauthors}}} }}
+
  |test={{{author|{{{last|}}}}}}
}}{{#if: {{{origdate|}}}
+
   |then={{qif
   | &#32;<nowiki>[</nowiki>{{{origdate}}}]
+
    |test={{{coauthors|}}}
   | {{#if: {{{origyear|}}}
+
    |then=<nowiki>;</nowiki>&#32;{{{coauthors}}}
     | {{#if: {{{origmonth|}}}
+
  }}
       | &#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
+
}}{{qif
       | &#32;<nowiki>[</nowiki>{{{origyear}}}]
+
  |test={{{origdate|}}}
 +
   |then=&#32;<nowiki>[</nowiki>{{{origdate}}}]
 +
   |else={{qif
 +
    |test={{{origyear|}}}
 +
     |then={{qif
 +
      |test={{{origmonth|}}}
 +
       |then=&#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
 +
       |else=&#32;<nowiki>[</nowiki>{{{origyear}}}]
 
     }}
 
     }}
 
   }}
 
   }}
}}{{#if: {{{date|}}}
+
}}{{qif
   | &#32;({{{date}}})
+
  |test={{{date|}}}
   | {{#if: {{{year|}}}
+
   |then=&#32;({{{date}}})
     | {{#if: {{{month|}}}
+
   |else={{qif
       | &#32;({{{month}}} {{{year}}})
+
    |test={{{year|}}}
       | &#32;({{{year}}})
+
     |then={{qif
 +
      |test={{{month|}}}
 +
       |then=&#32;({{{month}}} {{{year}}})
 +
       |else=&#32;({{{year}}})
 
     }}
 
     }}
 
   }}
 
   }}
}}{{#if: {{{author|{{{last|}}}}}} | .
+
}}{{qif
}}{{#if: {{{chapter|}}}
+
  |test={{{author|{{{last|}}}}}}
   | &#32;“{{#if: {{{chapterurl|}}}
+
  |then=.
    | [{{{chapterurl}}} {{{chapter}}}]
+
}}{{qif
    | {{{chapter}}}
+
  |test={{{chapter|}}}
}}”,}}{{#if: {{{editor|}}}
+
   |then=&#32;"{{qif
   | &#32;{{{editor}}}
+
  |test={{{chapterurl|}}}
}} ''{{#if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
+
  |then=[{{{chapterurl}}} {{{chapter}}}]
}}''{{#if: {{{format|}}} | &#32;({{{format}}})
+
  |else={{{chapter}}}
}}{{#if: {{{others|}}} | , {{{others}}}
+
}}"}}{{qif
}}{{#if: {{{edition|}}} | , {{{edition}}}
+
  |test={{{editor|}}}
}}{{#if: {{{language|}}} | &#32;(in {{{language}}})
+
   |then=&#32;{{{editor}}}
}}{{#if: {{{publisher|}}}
+
}} ''{{qif
   | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}} | ,&#32; | .&#32; }}{{#if: {{{location|}}}  
+
  |test={{{url|}}}
     | {{{location}}}:&#32;
+
  |then=[{{{url}}} {{{title}}}]
 +
  |else={{{title}}}
 +
}}''{{qif
 +
  |test={{{format|}}}
 +
  |then=&#32;({{{format}}})
 +
}}{{qif
 +
  |test={{{others|}}}
 +
  |then=, {{{others}}}
 +
}}{{qif
 +
  |test={{{edition|}}}
 +
  |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}}}
}}{{#if: {{{pages|}}} | ,&#32;{{{pages}}}
+
}}{{qif
}}{{#if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi}}} {{{doi}}}]
+
  |test={{{id|}}}
}}{{#if: {{{id|}}} | . {{{id}}}
+
  |then=. {{{id}}}
}}{{#if: {{{accessdate|}}}
+
}}{{qif
   | . Retrieved on [[{{{accessdate}}}]]
+
  |test={{{accessdate|}}}
   | {{#if: {{{accessyear|}}}
+
   |then=. URL accessed [[{{{accessdate}}}]]
     | . Retrieved {{#if: {{{accessmonth|}}}
+
   |else={{qif
       | on [[{{{accessmonth}}} {{{accessyear}}}]]
+
    |test={{{accessyear|}}}
       | during [[{{{accessyear}}}]]
+
     |then=. URL accessed {{qif
 +
      |test={{{accessmonth|}}}
 +
       |then=on [[{{{accessmonth}}} {{{accessyear}}}]]
 +
       |else=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|{{PAGENAME}}]]
 +
 
 +
[[sk:Šablóna:Knižná_referencia]]
 +
</noinclude>

Revision as of 01:01, 6 July 2008

{{{title}}}.


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