Ref:Abe's Origins: Difference between revisions

From Oddworld Library
(Created page with "<includeonly> {{ref:refHeader | author = Stace Harman & John Robertson | date = 16 December 2019 | datetime = 2019-12-16 | bold = {{{bold|true}}} }} <cite class="book AbesOrigins">Oddworld: Abe's Origins</cite>{{#if: {{{qq|}}} | , <abbr title="questions">qq.</abbr> {{{qq}}} | {{#if: {{{q|}}} | , <abbr title="question">q.</abbr> {{{q}}} }} }}{{#if: {{{pp|}}} | , <abbr title="pages">pp.</abbr> {{{pp}}} | {{#if: {{{p|}}} | , <abbr title="page">p.</abbr> {{{p...")
 
m (Fixed bugs with unnecessary full stops, empty page list appearing after book title, and ‘unrecognized word’ error message, by removing strings from #ifexpr parser function input parameter.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
{{#vardefine:pagePrinted|0}}{{#vardefine:headingTitle|0}}{{#vardefine:chapterTitle|0}}{{#vardefine:questionPrinted|0}}
{{ref:refHeader
{{ref:refHeader
   | author = Stace Harman & John Robertson
   | author = Stace Harman & John Robertson
Line 5: Line 6:
   | datetime = 2019-12-16
   | datetime = 2019-12-16
   | bold = {{{bold|true}}}
   | bold = {{{bold|true}}}
}}
}}<noinclude>The following nested parser functions check if a chapter title can confidently be included based on the page number.</noinclude>
  <cite class="book AbesOrigins">Oddworld: Abe's Origins</cite>{{#if: {{{qq|}}}
| , <abbr title="questions">qq.</abbr> {{{qq}}}
| {{#if: {{{q|}}}
  | , <abbr title="question">q.</abbr> {{{q}}}
  }}
}}{{#if: {{{pp|}}}
| , <abbr title="pages">pp.</abbr> {{{pp}}}
| {{#if: {{{p|}}}
  | , <abbr title="page">p.</abbr> {{{p}}}
  }}
}}.
   {{#if: {{{p|}}}
   {{#if: {{{p|}}}
| {{#ifexp: {{{p}}} >= 8
| {{#ifexpr: {{{p}}} >= 8
   | {{#ifexp: {{{p}}} < 106
   | {{#ifexpr: {{{p}}} < 42
     | {{#ifexp: {{{p}}} < 62
     | {{#ifexpr: {{{p}}} < 12
       | {{#ifexp: {{{p}}} < 48
       | {{#ifexpr: {{{p}}} < 10
         | {{#ifexp: {{{p}}} < 12
         | {{#vardefine:chapterTitle|book-part">Contents}}
          | {{#ifexp: {{{p}}} < 10
        | {{#vardefine:chapterTitle|book-part">Authors' Foreword}}
            | Contents
        }}
            | Authors' Foreword
      | {{#vardefine:chapterTitle|book-chapter">Lorne Lanning}}
            }}
         {{#if: {{{qq|}}}
          | {{#ifexp: {{{p}}} < 44
        | {{#vardefine:questionPrinted|s">qq.</abbr> {{{qq}}} }}
            | {{#ifexp: {{{p}}} < 42
        | {{#if: {{{q|}}}
              | Lorne Lanning
          | {{#vardefine:questionPrinted|">q.</abbr> {{{q}}} }}
              | Abe
              }}
            | Hello
            }}
          }}
         | {{#ifexp: {{{p}}} < 52
          | {{#ifexp: {{{p}}} < 50
            | Follow Me
            | A Hero is Born
            }}
          | {{#ifexp: {{{p}}} < 60
            | {{#ifexp: {{{p}}} < 56
              | Caged Innocence
              | RuptureFarms
              }}
            | No Dignity, No Voice
            }}
           }}
           }}
         }}
         }}
       | {{#ifexp: {{{p}}} < 82
       }}
        | {{#ifexp: {{{p}}} < 68
    | {{#ifexpr: {{{p}}} < 286
          | {{#ifexp: {{{p}}} < 64
      | {{#ifexpr: {{{p}}} < 168
            | Revelations
        | {{#ifexpr: {{{p}}} < 90
            | Abe Escape
           | {{#vardefine:chapterTitle|book-chapter">Abe}}
            }}
          | {{#vardefine:chapterTitle|book-chapter">Free Oddworld}}
           | {{#ifexp: {{{p}}} < 80
            | {{#ifexp: {{{p}}} < 74
              | Shoot to Kill
              | Abe Finds Himself
              }}
            | Abe's Allies
            }}
           }}
           }}
         | {{#ifexp: {{{p}}} < 90
         | {{#ifexpr: {{{p}}} < 280
           | {{#ifexp: {{{p}}} < 84
           | {{#ifexpr: {{{p}}} < 276
             | Marks of a Hero
             | {{#vardefine:chapterTitle|book-chapter">Industrialised Oddworld}}
            | Final Form
             | {{#vardefine:chapterTitle|book-heading">Map of Oddworld}}
            }}
          | {{#ifexp: {{{p}}} < 98
             | {{#ifexp: {{{p}}} < 96
              | Free Oddworld
              | Harmony and Balance
              }}
            | The Mudokons
             }}
             }}
          | {{#vardefine:chapterTitle|book-part">Benefactors}}
           }}
           }}
         }}
         }}
       }}
       }}
     | {{#ifexp: {{{p}}} < 188
    }}
       | {{#ifexp: {{{p}}} < 142
    {{#ifexpr: {{{p}}} < 276
         | {{#ifexp: {{{p}}} < 116
     | {{#ifexpr: {{{p}}} < 112
           | {{#ifexp: {{{p}}} < 112
       | {{#ifexpr: {{{p}}} < 68
             | The Gabbits
         | {{#ifexpr: {{{p}}} < 56
             | The Steef
           | {{#ifexpr: {{{p}}} < 50
             | {{#ifexpr: {{{p}}} < 48
              | {{#ifexpr: {{{p}}} >= 44
                | {{#vardefine:headingTitle|Abe}}
                }}
              | {{#vardefine:headingTitle|Follow Me}}
              }}
             | {{#ifexpr: {{{p}}} < 52
              | {{#vardefine:headingTitle|A Hero is Born}}
              | {{#vardefine:headingTitle|Caged Innocence}}
              }}
             }}
             }}
           | {{#ifexp: {{{p}}} < 138
           | {{#ifexpr: {{{p}}} < 62
             | {{#ifexp: {{{p}}} < 122
             | {{#ifexpr: {{{p}}} < 60
               | Wild Things
               | {{#vardefine:headingTitle|RuptureFarms}}
               | Nature & Symbiosis
               | {{#vardefine:headingTitle|No Dignity, No Voice}}
              }}
            | {{#ifexpr: {{{p}}} < 64
              | {{#vardefine:headingTitle|Revelations}}
              | {{#vardefine:headingTitle|Abe Escape}}
               }}
               }}
            | Isolation & Exploration
             }}
             }}
           }}
           }}
         | {{#ifexp: {{{p}}} < 168
         | {{#ifexpr: {{{p}}} < 84
           | {{#ifexp: {{{p}}} < 158
           | {{#ifexpr: {{{p}}} < 80
             | Scale & Detail
             | {{#ifexpr: {{{p}}} < 74
             | Community & Identity
              | {{#vardefine:headingTitle|Shoot to Kill}}
              | {{#vardefine:headingTitle|Abe Finds Himself}}
              }}
             | {{#ifexpr: {{{p}}} < 82
              | {{#vardefine:headingTitle|Abe's Allies}}
              | {{#vardefine:headingTitle|Marks of a Hero}}
              }}
             }}
             }}
           | {{#ifexp: {{{p}}} < 176
           | {{#ifexpr: {{{p}}} < 98
             | {{#ifexp: {{{p}}} < 174
             | {{#ifexpr: {{{p}}} < 90
               | Industrialised Oddworld
               | {{#vardefine:headingTitle|Final Form}}
               | Growing Pains
               | {{#ifexpr: {{{p}}} >= 96
                | {{#vardefine:headingTitle|Harmony and Balance}}
                }}
              }}
            | {{#ifexpr: {{{p}}} < 106
              | {{#vardefine:headingTitle|The Mudokons}}
              | {{#vardefine:headingTitle|The Gabbits}}
               }}
               }}
            | The Glukkons
             }}
             }}
           }}
           }}
         }}
         }}
       | {{#ifexp: {{{p}}} < 240
       | {{#ifexpr: {{{p}}} < 188
         | {{#ifexp: {{{p}}} < 210
         | {{#ifexpr: {{{p}}} < 142
           | {{#ifexp: {{{p}}} < 200
           | {{#ifexpr: {{{p}}} < 122
             | RuptureFarms
             | {{#ifexpr: {{{p}}} < 116
             | SoulStorm Brew
              | {{#vardefine:headingTitle|The Steef}}
              | {{#vardefine:headingTitle|Wild Things}}
              }}
             | {{#ifexpr: {{{p}}} < 138
              | {{#vardefine:headingTitle|Nature & Symbiosis}}
              | {{#vardefine:headingTitle|Isolation & Exploration}}
              }}
             }}
             }}
           | {{#ifexp: {{{p}}} < 234
           | {{#ifexpr: {{{p}}} < 174
             | {{#ifexp: {{{p}}} < 222
             | {{#ifexpr: {{{p}}} < 158
               | The Sligs
               | {{#vardefine:headingTitle|Scale & Detail}}
               | Necrum & Bonewerkz
               | {{#ifexpr: {{{p}}} < 168
                | {{#vardefine:headingTitle|Community & Identity}}
                }}
              }}
            | {{#ifexpr: {{{p}}} < 176
              | {{#ifexpr: {{{p}}} >= 174
                | {{#vardefine:headingTitle|Growing Pains}}
                }}
              | {{#vardefine:headingTitle|The Glukkons}}
               }}
               }}
            | The Queens
             }}
             }}
           }}
           }}
         | {{#ifexp: {{{p}}} < 254
         | {{#ifexpr: {{{p}}} < 234
           | {{#ifexp: {{{p}}} < 244
           | {{#ifexpr: {{{p}}} < 210
             | FeeCo Train & Depots
             | {{#ifexpr: {{{p}}} < 200
             | Air Domination
              | {{#vardefine:headingTitle|RuptureFarms}}
              | {{#vardefine:headingTitle|SoulStorm Brew}}
              }}
             | {{#ifexpr: {{{p}}} < 222
              | {{#vardefine:headingTitle|The Sligs}}
              | {{#vardefine:headingTitle|Necrum & Bonewerkz}}
              }}
             }}
             }}
           | {{#ifexp: {{{p}}} < 280
           | {{#ifexpr: {{{p}}} < 244
             | {{#ifexp: {{{p}}} < 276
             | {{#ifexpr: {{{p}}} < 240
               | The Vykkers
               | {{#vardefine:headingTitle|The Queens}}
               | Map of Mudos
              | {{#vardefine:headingTitle|FeeCo Train & Depots}}
              }}
            | {{#ifexpr: {{{p}}} < 254
              | {{#vardefine:headingTitle|Air Domination}}
               | {{#vardefine:headingTitle|The Vykkers}}
               }}
               }}
            | Benefactors
             }}
             }}
           }}
           }}
         }}
         }}
       }}
       }}
     }}’.
     }}
   }}
   }}
}}
}}
   {{#if: {{{quote|}}} | {{#ifeq: {{{quoteMarks|single}}} | double ||}}<q cite="https://www.instagram.com/p/{{{postID}}}/">{{{quote}}}</q>{{#ifeq: {{{quoteMarks|single}}} | double |”|’}} }}
   {{#ifeq:{{#var:headingTitle}}|0|
  | ‘<cite class="book-heading">{{#var:headingTitle}}</cite>’{{#if: {{{pp|}}}
    | , <abbr title="pages">pp.</abbr> {{{pp}}}
    | , <abbr title="page">p.</abbr> {{{p}}}
    }}{{#vardefine:pagePrinted|1}}.
  }}
  {{#ifeq:{{#var:chapterTitle}}|0|
  | ‘<cite class="{{#var:chapterTitle}}</cite>’{{#ifexpr:{{#var:questionPrinted}}
    | , <abbr title="question{{#var:questionPrinted}}
    }}{{#ifexpr:{{#var:pagePrinted}} = 0
    | {{#if: {{{pp|}}}
      | , <abbr title="pages">pp.</abbr> {{{pp}}}
      | , <abbr title="page">p.</abbr> {{{p}}}
      }}{{#vardefine:pagePrinted|1}}
    }}.
  }}
  <cite class="book AbesOrigins">Oddworld: Abe's Origins</cite>{{#if: {{{p|}}}
  | {{#ifexpr:{{#var:pagePrinted}} = 0
    | {{#if: {{{pp|}}}
      | , <abbr title="pages">pp.</abbr> {{{pp}}}
      | , <abbr title="page">p.</abbr> {{{p}}}
      }}{{#vardefine:pagePrinted|1}}
    }}
  }}.
  {{#if: {{{quote|}}} | {{#ifeq: {{{quoteMarks|single}}} | double |“|‘}}<q>{{{quote}}}</q>{{#ifeq: {{{quoteMarks|single}}} | double |”|’}} }}
   East Grinstead, United Kingdom: Independent By Design.
   East Grinstead, United Kingdom: Independent By Design.
</includeonly>
</includeonly>
<noinclude>
<noinclude>This reference template is used to easily reference the art book <cite class="book AbesOrigins">[[Oddworld: Abe's Origins]]</cite>. To use it, place it inside a <code><nowiki><ref></nowiki></code> element in the reference list.
This reference template is used to easily reference the art book <cite class="book AbesOrigins">[[Oddworld: Abe's Origins]]</cite>. To use it, place it inside a <code><nowiki><ref></nowiki></code> element in the reference list.


<pre>
<pre>
Line 160: Line 189:
: Defaults to the value of <code class="wikitext-template-parameter-value">true</code> if not specified. The only value that overwrites this is the value of <code class="wikitext-template-parameter-value">false</code>, which causes the [[ref:refHeader|reference header]] to be rendered with no extra weight. This is useful if the <code class="wikitext-template">ref:Abe's Origins</code> template is used within a larger reference, such as when citing a specific work within the book.
: Defaults to the value of <code class="wikitext-template-parameter-value">true</code> if not specified. The only value that overwrites this is the value of <code class="wikitext-template-parameter-value">false</code>, which causes the [[ref:refHeader|reference header]] to be rendered with no extra weight. This is useful if the <code class="wikitext-template">ref:Abe's Origins</code> template is used within a larger reference, such as when citing a specific work within the book.
; <code class="wikitext-template-parameter">q</code>
; <code class="wikitext-template-parameter">q</code>
: If included, adds a single question number after the title of the book. Ignored if <code class="wikitext-template-parameter">qq</code> is set.
: If included, adds a single question number after the chapter title, as long as the chapter is ‘<cite class="book-chapter">Lorne Lanning</cite>’. Ignored if <code class="wikitext-template-parameter">qq</code> is set.
; <code class="wikitext-template-parameter">qq</code>
; <code class="wikitext-template-parameter">qq</code>
: If included, adds a range or sequence of question numbers after the title of the book. If set, <code class="wikitext-template-parameter">q</code> is ignored.
: If included, adds a range or sequence of question numbers after the chapter title, as long as the chapter is ‘<cite class="book-chapter">Lorne Lanning</cite>’. If set, <code class="wikitext-template-parameter">q</code> is ignored.
; <code class="wikitext-template-parameter">p</code>
; <code class="wikitext-template-parameter">p</code>
: If included, adds two things to the reference. Firstly, it adds a single page number after the title of the book (or after the question number(s) if those parameters are set). Secondly, as long as the page is 8 or over, it automatically adds the title of the section of the book that page is in. Partially ignored if <code class="wikitext-template-parameter">pp</code> is set: <code class="wikitext-template-parameter">pp</code> will overwrite the page numbers if set, but <code class="wikitext-template-parameter">p</code> is still required to add the section title.
: If included, adds two things to the reference. Firstly, it adds a single page number after the most specific citation in the reference. (If the question number(s) are displayed after the chapter title ‘<cite class="book-chapter">Lorne Lanning</cite>’, the page number comes afterwards.) Secondly, as long as the page is 8 or over, it automatically adds the titles of the sections of the book that page is in. Partially ignored if <code class="wikitext-template-parameter">pp</code> is set: <code class="wikitext-template-parameter">pp</code> will overwrite the page numbers if set, but <code class="wikitext-template-parameter">p</code> is still required to add the section titles.
; <code class="wikitext-template-parameter">pp</code>
; <code class="wikitext-template-parameter">pp</code>
: If included, adds a range or sequence of page numbers after the title of the book (or after the question number(s) if those parameters are set). If set, overwrites the page number set by <code class="wikitext-template-parameter">p</code>, but <code class="wikitext-template-parameter">p</code> is still required to add the section title. Thus, if <code class="wikitext-template-parameter">pp</code> is set, <code class="wikitext-template-parameter">p</code> should equal the first page in the value of <code class="wikitext-template-parameter">pp</code>.
: If included, adds a range or sequence of page numbers after the most specific citation in the reference. (If the question number(s) are displayed after the chapter title ‘<cite class="book-chapter">Lorne Lanning</cite>’, the page numbers come afterwards.) If set, overwrites the page number set by <code class="wikitext-template-parameter">p</code>, but <code class="wikitext-template-parameter">p</code> is still required to add the section titles. Thus, if <code class="wikitext-template-parameter">pp</code> is set, <code class="wikitext-template-parameter">p</code> should equal the first page in the value of <code class="wikitext-template-parameter">pp</code>, but there is no internal check of this.
; <code class="wikitext-template-parameter">quote</code>
; <code class="wikitext-template-parameter">quote</code>
: Used to include a quote between the chapter title and the publisher. Only do this if it is particularly important to the context of the reference, and only if it is a short quote with no carriage returns.
: Used to include a quote between the chapter title and the publisher. Only do this if it is particularly important to the context of the reference, and only if it is a short quote with no carriage returns.

Latest revision as of 12:30, 16 February 2025

This reference template is used to easily reference the art book Oddworld: Abe's Origins. To use it, place it inside a <ref> element in the reference list.

<ref name="Name of the reference">
{{ref:Abe's Origins
  | parameter1 = value1
  | parameter2 = value2
}}
</ref>

Parameters

This template takes the following parameters. There are no parameters that are required.

bold
Defaults to the value of true if not specified. The only value that overwrites this is the value of false, which causes the reference header to be rendered with no extra weight. This is useful if the ref:Abe's Origins template is used within a larger reference, such as when citing a specific work within the book.
q
If included, adds a single question number after the chapter title, as long as the chapter is ‘Lorne Lanning’. Ignored if qq is set.
qq
If included, adds a range or sequence of question numbers after the chapter title, as long as the chapter is ‘Lorne Lanning’. If set, q is ignored.
p
If included, adds two things to the reference. Firstly, it adds a single page number after the most specific citation in the reference. (If the question number(s) are displayed after the chapter title ‘Lorne Lanning’, the page number comes afterwards.) Secondly, as long as the page is 8 or over, it automatically adds the titles of the sections of the book that page is in. Partially ignored if pp is set: pp will overwrite the page numbers if set, but p is still required to add the section titles.
pp
If included, adds a range or sequence of page numbers after the most specific citation in the reference. (If the question number(s) are displayed after the chapter title ‘Lorne Lanning’, the page numbers come afterwards.) If set, overwrites the page number set by p, but p is still required to add the section titles. Thus, if pp is set, p should equal the first page in the value of pp, but there is no internal check of this.
quote
Used to include a quote between the chapter title and the publisher. Only do this if it is particularly important to the context of the reference, and only if it is a short quote with no carriage returns.
quoteMarks
Defines how many quotation marks are used to delimit the quote. Does nothing if there is no quote. Defaults to the value of single if not specified. The only value that overwrites this is the value of double. Only set the value to double if the quote itself contains single quotation marks, and those single quotation marks are the outermost quotation marks used in the quote. Do not count apostrophes as single quotation marks.

If both of either q or qq, and either p or pp are set, the question number(s) will appear before the page number(s). If the question number(s) are set, p should logically be between 10 and 41 inclusive, although there is no automatic verification for this, and no error if it is not.