Ref:Abe's Origins: Difference between revisions
(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> | ||
{{#if: {{{p|}}} | {{#if: {{{p|}}} | ||
| {{# | | {{#ifexpr: {{{p}}} >= 8 | ||
| | | {{#ifexpr: {{{p}}} < 42 | ||
| {{# | | {{#ifexpr: {{{p}}} < 12 | ||
| {{# | | {{#ifexpr: {{{p}}} < 10 | ||
| {{# | | {{#vardefine:chapterTitle|book-part">Contents}} | ||
| {{#vardefine:chapterTitle|book-part">Authors' Foreword}} | |||
}} | |||
| {{#vardefine:chapterTitle|book-chapter">Lorne Lanning}} | |||
{{#if: {{{qq|}}} | |||
| {{#vardefine:questionPrinted|s">qq.</abbr> {{{qq}}} }} | |||
| {{#if: {{{q|}}} | |||
| {{#vardefine:questionPrinted|">q.</abbr> {{{q}}} }} | |||
}} | }} | ||
}} | }} | ||
| {{# | }} | ||
| {{#ifexpr: {{{p}}} < 286 | |||
| {{#ifexpr: {{{p}}} < 168 | |||
| {{#ifexpr: {{{p}}} < 90 | |||
| {{#vardefine:chapterTitle|book-chapter">Abe}} | |||
| {{#vardefine:chapterTitle|book-chapter">Free Oddworld}} | |||
| {{# | |||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 280 | ||
| {{# | | {{#ifexpr: {{{p}}} < 276 | ||
| {{#vardefine:chapterTitle|book-chapter">Industrialised Oddworld}} | |||
| {{#vardefine:chapterTitle|book-heading">Map of Oddworld}} | |||
| {{# | |||
}} | }} | ||
| {{#vardefine:chapterTitle|book-part">Benefactors}} | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
| {{# | }} | ||
| {{# | {{#ifexpr: {{{p}}} < 276 | ||
| {{# | | {{#ifexpr: {{{p}}} < 112 | ||
| {{# | | {{#ifexpr: {{{p}}} < 68 | ||
| | | {{#ifexpr: {{{p}}} < 56 | ||
| | | {{#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}} | |||
}} | |||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 62 | ||
| {{# | | {{#ifexpr: {{{p}}} < 60 | ||
| | | {{#vardefine:headingTitle|RuptureFarms}} | ||
| | | {{#vardefine:headingTitle|No Dignity, No Voice}} | ||
}} | |||
| {{#ifexpr: {{{p}}} < 64 | |||
| {{#vardefine:headingTitle|Revelations}} | |||
| {{#vardefine:headingTitle|Abe Escape}} | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 84 | ||
| {{# | | {{#ifexpr: {{{p}}} < 80 | ||
| | | {{#ifexpr: {{{p}}} < 74 | ||
| | | {{#vardefine:headingTitle|Shoot to Kill}} | ||
| {{#vardefine:headingTitle|Abe Finds Himself}} | |||
}} | |||
| {{#ifexpr: {{{p}}} < 82 | |||
| {{#vardefine:headingTitle|Abe's Allies}} | |||
| {{#vardefine:headingTitle|Marks of a Hero}} | |||
}} | |||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 98 | ||
| {{# | | {{#ifexpr: {{{p}}} < 90 | ||
| | | {{#vardefine:headingTitle|Final Form}} | ||
| | | {{#ifexpr: {{{p}}} >= 96 | ||
| {{#vardefine:headingTitle|Harmony and Balance}} | |||
}} | |||
}} | |||
| {{#ifexpr: {{{p}}} < 106 | |||
| {{#vardefine:headingTitle|The Mudokons}} | |||
| {{#vardefine:headingTitle|The Gabbits}} | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 188 | ||
| {{# | | {{#ifexpr: {{{p}}} < 142 | ||
| {{# | | {{#ifexpr: {{{p}}} < 122 | ||
| | | {{#ifexpr: {{{p}}} < 116 | ||
| | | {{#vardefine:headingTitle|The Steef}} | ||
| {{#vardefine:headingTitle|Wild Things}} | |||
}} | |||
| {{#ifexpr: {{{p}}} < 138 | |||
| {{#vardefine:headingTitle|Nature & Symbiosis}} | |||
| {{#vardefine:headingTitle|Isolation & Exploration}} | |||
}} | |||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 174 | ||
| {{# | | {{#ifexpr: {{{p}}} < 158 | ||
| | | {{#vardefine:headingTitle|Scale & Detail}} | ||
| | | {{#ifexpr: {{{p}}} < 168 | ||
| {{#vardefine:headingTitle|Community & Identity}} | |||
}} | |||
}} | |||
| {{#ifexpr: {{{p}}} < 176 | |||
| {{#ifexpr: {{{p}}} >= 174 | |||
| {{#vardefine:headingTitle|Growing Pains}} | |||
}} | |||
| {{#vardefine:headingTitle|The Glukkons}} | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 234 | ||
| {{# | | {{#ifexpr: {{{p}}} < 210 | ||
| | | {{#ifexpr: {{{p}}} < 200 | ||
| | | {{#vardefine:headingTitle|RuptureFarms}} | ||
| {{#vardefine:headingTitle|SoulStorm Brew}} | |||
}} | |||
| {{#ifexpr: {{{p}}} < 222 | |||
| {{#vardefine:headingTitle|The Sligs}} | |||
| {{#vardefine:headingTitle|Necrum & Bonewerkz}} | |||
}} | |||
}} | }} | ||
| {{# | | {{#ifexpr: {{{p}}} < 244 | ||
| {{# | | {{#ifexpr: {{{p}}} < 240 | ||
| The | | {{#vardefine:headingTitle|The Queens}} | ||
| | | {{#vardefine:headingTitle|FeeCo Train & Depots}} | ||
}} | |||
| {{#ifexpr: {{{p}}} < 254 | |||
| {{#vardefine:headingTitle|Air Domination}} | |||
| {{#vardefine:headingTitle|The Vykkers}} | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
{{#if: {{{ | {{#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 | : 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 | : 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 | : 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 | : 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 offalse
, which causes the reference header to be rendered with no extra weight. This is useful if theref: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, butp
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
, butp
is still required to add the section titles. Thus, ifpp
is set,p
should equal the first page in the value ofpp
, 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 ofdouble
. Only set the value todouble
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.