Template:Book ref: Difference between revisions

From The Reed and Rite
No edit summary
Tag: Reverted
m Removed background color to allow dynamic color shift in dark mode.
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#tag:ref|
<includeonly>{{#if:{{{link|}}}<!--
{{#if:{{{1|}}} | <!-- Check if book title is provided -->
  {{#switch:{{lc:{{{1}}}}}
    | beast = [[Summary:The Beast of Ten#Chapter {{{2}}}|''The Beast of Ten'', Chapter {{{2}}}]]
    | tbot = [[Summary:The Beast of Ten#Chapter {{{2}}}|''The Beast of Ten'', Chapter {{{2}}}]]
    | bot = [[Summary:The Beast of Ten#Chapter {{{2}}}|''The Beast of Ten'', Chapter {{{2}}}]]
    | b10 = [[Summary:The Beast of Ten#Chapter {{{2}}}|''The Beast of Ten'', Chapter {{{2}}}]]
    | tqg = [[Summary:The Queen's Gambit#Chapter {{{2}}}|''The Queen's Gambit'', Chapter {{{2}}}]]
    | qg = [[Summary:The Queen's Gambit#Chapter {{{2}}}|''The Queen's Gambit'', Chapter {{{2}}}]]
    | trp = [[Summary:The Ruby Prince#Chapter {{{2}}}|''The Ruby Prince'', Chapter {{{2}}}]]
    | rp = [[Summary:The Ruby Prince#Chapter {{{2}}}|''The Ruby Prince'', Chapter {{{2}}}]]
    | twm = [[Summary:The Wanderer's Mark#Chapter {{{2}}}|''The Wanderer's Mark'', Chapter {{{2}}}]]
    | wm = [[Summary:The Wanderer's Mark#Chapter {{{2}}}|''The Wanderer's Mark'', Chapter {{{2}}}]]
    | tq = [[Summary:The Q#Chapter {{{2}}}|''The Q'', Chapter {{{2}}}]]
    | q = [[Summary:The Q#Chapter {{{2}}}|''The Q'', Chapter {{{2}}}]]
    | emma1 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 1#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 1: {{{2}}} {{{3}}} {{{4}}}]]
    | eml1 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 1#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 1: {{{2}}} {{{3}}} {{{4}}}]]
    | e1 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 1#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 1: {{{2}}} {{{3}}} {{{4}}}]]
    | v1 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 1#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 1: {{{2}}} {{{3}}} {{{4}}}]]
    | emma2 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 2#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 2: {{{2}}} {{{3}}} {{{4}}}]]
    | eml2 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 2#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 2: {{{2}}} {{{3}}} {{{4}}}]]
    | e2 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 2#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 2: {{{2}}} {{{3}}} {{{4}}}]]
    | v2 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 2#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 2: {{{2}}} {{{3}}} {{{4}}}]]
    | emma3 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 3#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 3: {{{2}}} {{{3}}} {{{4}}}]]
    | eml3 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 3#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 3: {{{2}}} {{{3}}} {{{4}}}]]
    | e3 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 3#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 3: {{{2}}} {{{3}}} {{{4}}}]]
    | v3 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 3#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 3: {{{2}}} {{{3}}} {{{4}}}]]
    | emma4 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 4#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 4: {{{2}}} {{{3}}} {{{4}}}]]
    | eml4 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 4#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 4: {{{2}}} {{{3}}} {{{4}}}]]
    | e4 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 4#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 4: {{{2}}} {{{3}}} {{{4}}}]]
    | v4 = [[Summary:The Unselected Journals of Emma M. Lion: Volume 4#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. 4: {{{2}}} {{{3}}} {{{4}}}]]
    <!-- Continue this pattern for all volumes -->
    | {{#ifexpr: {{{2}}} > 0 and {{{2}}} <= 31
        | [[Summary:The Unselected Journals of Emma M. Lion: Volume {{{1}}}#{{{2}}} {{{3}}} {{{4}}}|''Emma, Vol. {{{1}}}: {{{2}}} {{{3}}} {{{4}}}]]
        | <span style="color:red">Error: Day exceeds 31</span>
      }}
  }}
| <span style="color:red">Error: Missing book title</span>}}
| name={{{name|{{{1}}}-{{{2}}}}}}
| group={{{group|}}}
}}</includeonly><noinclude>
This template is used to refer to chapter summaries on The Reed and Rite.


To use, include {{t|book ref|book|chapter}}
PASS "|link=y" TO REMOVE REFERENCE TAG AND INSERT A PLAINLINK
* Replace <code>book</code> with the appropriate code from {{t|b}}
-->| {{#if:{{{1|}}}<!--
* <code>chapter</code> should be the chapter number, <code>prologue</code>, or <code>epilogue</code>
  -->| {{#switch:{{lc:{{{2}}}}}<!--
* When referencing chapters which have names in place of numbers, such as several chapters in the [[Alcatraz Versus the Evil Librarians (series)|Alcatraz]] books, use the name of the chapter in place of a number. For example: {{t|book ref|a5|mary}}
  -->| prologue = [[Summary:{{B|{{{1}}}}}#Prologue|''{{B|{{{1}}}}}'', Prologue]]<!--
* When referring to interludes, replace <code>chapter</code> with <code>i|number</code>, where the latter is the interlude number
  -->| epilogue = [[Summary:{{B|{{{1}}}}}#Epilogue|''{{B|{{{1}}}}}'', Epilogue]]<!--
* For parts that aren't any of the above, replace <code>chapter</code> with <code>part=name</code>; for example, <code>part=ars</code> for Ars Arcanum (don't use this for parts that are comprised of multiple chapters, like in ''[[The Stormlight Archive]]'' books; always reference a specific chapter, or put {{t|cite}} if you can't find it)
  -->| {{#ifexpr: {{{2}}} > 0 and {{{2}}} <= 75<!--
* {{{pre}}} is included before the link
    -->| [[Summary:{{B|{{{1}}}}}#Chapter_{{{2}}}|''{{B|{{{1}}}}}'', Chapter {{{2}}}]]<!--
* {{{post}}} is included after the link
    -->| <span style="color:red">Error: Chapter exceeds 75</span><!--
* {{{name}}} replaces the generated reference name
  -->}}<!--
* {{{group}}} sets the reference group
  -->}}<!--
  -->| <span style="color:red">Error: Missing book title</span><!--
-->}}<!--
 
ADD A REFERENCE FOOTNOTE TO BOOK SUMMARY
-->| {{#tag:ref|<!--
  -->{{#if:{{{1|}}}<!--
  -->| {{#switch:{{lc:{{{2}}}}}<!--
    -->| prologue = [[Summary:{{B|{{{1}}}}}#Prologue|''{{B|{{{1}}}}}'', Prologue]]<!--
    -->| epilogue = [[Summary:{{B|{{{1}}}}}#Epilogue|''{{B|{{{1}}}}}'', Epilogue]]<!--
    -->| {{#ifexpr: {{{2}}} > 0 and {{{2}}} <= 75<!--
    -->| [[Summary:{{B|{{{1}}}}}#Chapter_{{{2}}}|''{{B|{{{1}}}}}'', Chapter {{{2}}}]]<!--
    -->| <span style="color:red">Error: Chapter exceeds 75</span><!--
    -->}}<!--
  -->}}<!--
  -->| <span style="color:red">Error: Missing book title</span><!--
  -->}}<!--
  -->| name={{{name|{{{1}}}-{{{2}}}}}}<!--
  -->| group={{{group|}}}<!--
-->}}<!--
-->}}</includeonly><noinclude>
== Description ==
{{for|Template:Emma ref|linking to a Emma M. Lion chapter summary}}
This template is used to create a reference with a footnote that links to a book's chapter summary of a non-Emma M. Lion book. It can also be used to insert a simple link to a chapter summary instead of a reference. For more information on using references, see [[:Help:References]].
 
== Usage ==
To use, include {{t|book ref|BOOK|CHAPTER}}
* Replace <code>BOOK</code> with the appropriate abbreviation from the [[:Template:Book ref#Accepted Abbreviations|table below]].
* <code>CHAPTER</code> should be the chapter number, <code>prologue</code>, or <code>epilogue</code>
 
 
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
|-
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Basic Usage</span><br><div style="text-align: left;"><span style="font-weight: normal;">This example displays the basic usage of the template to create a footnote with a link to a specific chapter on a [[:Category:Summary|Summary page]].</span></div>
|-
! width=55%|You Type
!You Get
|-
| style="text-align: left;" |<pre>The Q is located on Gainsford Street.{{book ref|tq|1}}
 
== Notes ==
<references /></pre>
|
The Q is located on Gainsford Street.{{book ref|tq|1}}
 
<span style="display: block; font-size: 1.65em; font-family: serif; font-weight: normal; margin-top: 1em; border-bottom: 1px solid #a2a9b1;">Notes</span>
<references />
|-
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Nickname a Reference for Repeated Use</span><br><div style="text-align: left;"><span style="font-weight: normal;">If you use the same reference multiple times on the same page, you can assign that reference a nickname by passing <code>name=</code>. Then using {{t|ref}} with the same <code>name=</code> parameter for every other use of that reference.</span></div>
|-
! width=50%|You Type
!You Get
|-
| style="text-align: left;" |<pre>Queen Eleanor studies papers of state in the garden.{{book ref|qg|1|name=qg1}}
 
She is approached by a stranger.{{ref|name=qg1}}
 
== Notes ==
<references /></pre>
|
Queen Eleanor studies papers of state in the garden.{{book ref|qg|1|name=qg1}}
 
She is approached by a stranger.{{ref|name=qg1}}
 
<span style="display: block; font-size: 1.65em; font-family: serif; font-weight: normal; margin-top: 1em; border-bottom: 1px solid #a2a9b1;">Notes</span>
<references />
|-
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Plain Link, Instead of Reference</span><br><div style="text-align: left;"><span style="font-weight: normal;">Occasionally, you may find it useful to insert a plain link to a chapter summary instead of a reference footnote. (Such as when inserting a reference in an infobox.) To do this, simply append <code>link=y</code> at the end of the template call.</span></div>
|-
! width=50%|You Type
!You Get
|-
| style="text-align: center;" |<pre>{{book ref|beast|epilogue|link=y}}</pre>
|{{book ref|beast|epilogue|link=y}}
|}
 
 
=== Accepted Abbreviations ===
The following abbreviations are accepted, as defined by template {{t|b}}:
{| class="wikitable" width="50%"
! class="title" width="40%" | Book
! class="title" colspan="2" | Accepted Abbreviations
|-
! [[The Beast of Ten]]
| <code>beast</code>, <code>tbot</code>, <code>bot</code>, <code>b10</code>
|-
! [[The Queen's Gambit]]
| <code>i1</code>, <code>imirillia1</code>, <code>tqg</code>, <code>qg</code>
|-
! [[The Ruby Prince]]
| <code>i2</code>, <code>imirillia2</code>, <code>trp</code>, <code>rp</code>
|-
! [[The Wanderer's Mark]]
| <code>i3</code>, <code>imirillia3</code>, <code>twm</code>, <code>wm</code>
|-
! [[The Q]]
| <code>tq</code>, <code>q</code>
|}
 
== Articles using Template ==
:{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=100|limit=100}}
 
[[Category: Reference Templates]]

Latest revision as of 22:45, 27 May 2025

Description

This template is used to create a reference with a footnote that links to a book's chapter summary of a non-Emma M. Lion book. It can also be used to insert a simple link to a chapter summary instead of a reference. For more information on using references, see Help:References.

Usage

To use, include {{book ref|BOOK|CHAPTER}}

  • Replace BOOK with the appropriate abbreviation from the table below.
  • CHAPTER should be the chapter number, prologue, or epilogue


Basic Usage
This example displays the basic usage of the template to create a footnote with a link to a specific chapter on a Summary page.
You Type You Get
The Q is located on Gainsford Street.{{book ref|tq|1}}

== Notes ==
<references />

The Q is located on Gainsford Street.[1]

Notes

Nickname a Reference for Repeated Use
If you use the same reference multiple times on the same page, you can assign that reference a nickname by passing name=. Then using {{ref}} with the same name= parameter for every other use of that reference.
You Type You Get
Queen Eleanor studies papers of state in the garden.{{book ref|qg|1|name=qg1}}

She is approached by a stranger.{{ref|name=qg1}}

== Notes ==
<references />

Queen Eleanor studies papers of state in the garden.[1]

She is approached by a stranger.[1]

Notes

Plain Link, Instead of Reference
Occasionally, you may find it useful to insert a plain link to a chapter summary instead of a reference footnote. (Such as when inserting a reference in an infobox.) To do this, simply append link=y at the end of the template call.
You Type You Get
{{book ref|beast|epilogue|link=y}}
The Beast of Ten, Epilogue


Accepted Abbreviations

The following abbreviations are accepted, as defined by template {{b}}:

Book Accepted Abbreviations
The Beast of Ten beast, tbot, bot, b10
The Queen's Gambit i1, imirillia1, tqg, qg
The Ruby Prince i2, imirillia2, trp, rp
The Wanderer's Mark i3, imirillia3, twm, wm
The Q tq, q

Articles using Template