Ref:Art of Oddworld: Difference between revisions
m (Potential fix for printing empty page heading) |
m (Potential fix for #var:headingTitle and #var:pagePrinted affecting template calls after initial template call) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#vardefine:pagePrinted|0}}{{#vardefine:headingTitle|0}} | |||
{{#ifexpr: {{{p}}} = 7 | {{#ifexpr: {{{p}}} = 7 | ||
| {{ref:refHeader | | {{ref:refHeader | ||
Line 256: | Line 257: | ||
}} | }} | ||
}} | }} | ||
{{# | {{#ifexpr:{{#var:headingTitle}} = 0 | ||
| | |||
|‘<cite class="book-heading">{{#var:headingTitle}}</cite>’{{#if: {{{pp|}}} | |‘<cite class="book-heading">{{#var:headingTitle}}</cite>’{{#if: {{{pp|}}} | ||
| , <abbr title="pages">pp.</abbr> {{{pp}}} | | , <abbr title="pages">pp.</abbr> {{{pp}}} | ||
Line 291: | Line 293: | ||
}} | }} | ||
}} | }} | ||
}}</cite>’{{# | }}</cite>’{{#ifexpr:{{#var:pagePrinted}} = 0 | ||
| {{#if: {{{pp|}}} | | {{#if: {{{pp|}}} | ||
| , <abbr title="pages">pp.</abbr> {{{pp}}} | | , <abbr title="pages">pp.</abbr> {{{pp}}} | ||
Line 302: | Line 303: | ||
}} | }} | ||
}} | }} | ||
<cite class="book ArtOfOddworld">The Art of Oddworld Inhabitants: The First Ten Years 1994–2004</cite>{{# | <cite class="book ArtOfOddworld">The Art of Oddworld Inhabitants: The First Ten Years 1994–2004</cite>{{#ifexpr:{{#var:pagePrinted}} = 0 | ||
| {{#if: {{{pp|}}} | | {{#if: {{{pp|}}} | ||
| , <abbr title="pages">pp.</abbr> {{{pp}}} | | , <abbr title="pages">pp.</abbr> {{{pp}}} |
Latest revision as of 16:15, 13 February 2025
This reference template is used to easily reference the art book The Art of Oddworld Inhabitants: The First Ten Years 1994–2004. To use it, place it inside a <ref>
element in the reference list.
<ref name="Name of the reference"> {{ref:Art of Soulstorm | 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:Art of Oddworld
template is used within a larger reference, such as when citing a specific work within the book. p
- If included, adds up to three 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, if a heading is not manually set, the template checks if the given page corresponds to a single heading, which is then added to the reference. Thirdly, it automatically adds the title of the chapter of the book that page is in. Partially ignored if
pp
is set:pp
will overwrite the page numbers if set, butp
will still define the heading and chapter. pp
- If included, adds a range or sequence of page numbers after the title of the book. If set, overwrites the page number set by
p
, butp
is still required to add the chapter title. Thus, ifpp
is set,p
should equal the first page in the value ofpp
. heading
- If manually specified, replaces the nested parser functions that retreive the correct heading. Some headings need to be specified manually, namely ‘Iterations’, ‘The Temple Interior’, ‘Scrabs’, ‘Opening Wall’, and ‘Maggie’. The heading ‘Munch Poster’ also needs to be set manually if the page number is 156, and the heading ‘Kinto Slaves’ needs to be set manually if the page number is 228.
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.
The paramter p
should be between 5 and 256 inclusive, although there is no automatic verification for this, and no error if it is not.