Template:Harry Potter reference
- This template uses WP:SSTS ; see that page for complete system documentation.
This template generates citations to the Harry Potter book series and companion books by Bloomsbury.
The key=value parameters such as |author=, |title=, etc., are defined in Module:SST/shards/sets/ROWLING_HARRY_POTTER.
Usage
[edit ]{{HPref | book = | chapter = | page = }}
Default
[edit ]{{HPref }}
Result:
Rowling, J. K. (1997–2007). Harry Potter. Bloomsbury.
Book Example
[edit ]{{HPref | book = 3 }}
Result:
Rowling, J. K. (1999). Harry Potter and the Prisoner of Azkaban. Bloomsbury. ISBN 0747542155.
Page Example
[edit ]{{HPref | book = 3 | page = 18 }}
Result:
Rowling, J. K. (1999). Harry Potter and the Prisoner of Azkaban. Bloomsbury. p.18. ISBN 0747542155.
Chapter Example
[edit ]{{HPref | book = 3 | chapter = 2 | page = 18 }}
Result:
Rowling, J. K. (1999). "Aunt Marge's Big Mistake". Harry Potter and the Prisoner of Azkaban. Bloomsbury. p.18. ISBN 0747542155.
- Note: The
|page=indicates where the chapter begins. To link to a page within a chapter leave off|chapter=.
Parameters
[edit ]|book=(Required): The specific book being cited. Accepts `1` through `7` for the main series, `f` for Fantastic Beasts, and `q` for Quidditch Through the Ages.|chapter=(Optional): The chapter number or letter. The template will automatically generate the full chapter title.|page=or|pages=(Optional): The page number(s) being cited.
Book Codes
[edit ]| Code | Book Title |
|---|---|
| 1 | Harry Potter and the Philosopher's Stone |
| 2 | Harry Potter and the Chamber of Secrets |
| 3 | Harry Potter and the Prisoner of Azkaban |
| 4 | Harry Potter and the Goblet of Fire |
| 5 | Harry Potter and the Order of the Phoenix |
| 6 | Harry Potter and the Half-Blood Prince |
| 7 | Harry Potter and the Deathly Hallows |
| f | Fantastic Beasts and Where to Find Them |
| q | Quidditch Through the Ages |
Chapter Codes
[edit ]Book 1: Philosopher's Stone
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | The Boy Who Lived | 2 | The Vanishing Glass | 3 | The Letters From No One | 4 | The Keeper of the Keys | 5 | Diagon Alley | 6 | The Journey from Platform Nine and Three-Quarters |
| 7 | The Sorting Hat | 8 | The Potions Master | 9 | The Midnight Duel | 10 | Halloween | 11 | Quidditch | 12 | The Mirror of Erised |
| 13 | Nicholas Flamel | 14 | Norbert the Norwegian Ridgeback | 15 | The Forbidden Forest | 16 | Through the Trapdoor | 17 | The Man with Two Faces |
Book 2: Chamber of Secrets
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | The Worst Birthday | 2 | Dobby's Warning | 3 | The Burrow | 4 | At Flourish and Blotts | 5 | The Whomping Willow | 6 | Gilderoy Lockhart |
| 7 | Mudbloods and Murmurs | 8 | The Deathday Party | 9 | The Writing on the Wall | 10 | The Rogue Bludger | 11 | The Dueling Club | 12 | The Polyjuice Potion |
| 13 | The Very Secret Diary | 14 | Cornelius Fudge | 15 | Aragog | 16 | The Chamber of Secrets | 17 | The Heir of Slytherin | 18 | Dobby's Reward |
Book 3: Prisoner of Azkaban
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Owl Post | 2 | Aunt Marge's Big Mistake | 3 | The Knight Bus | 4 | The Leaky Cauldron | 5 | The Dementor | 6 | Talons and Tea Leaves |
| 7 | The Boggart in the Wardrobe | 8 | Flight of the Fat Lady | 9 | Grim Defeat | 10 | The Marauder's Map | 11 | The Firebolt | 12 | The Patronus |
| 13 | Gryffindor Versus Ravenclaw | 14 | Snape's Grudge | 15 | The Quidditch Final | 16 | Professor Trelawney's Prediction | 17 | Cat, Rat and Dog | 18 | Moony, Wormtail, Padfoot, and Prongs |
| 19 | The Servant of Lord Voldemort | 20 | The Dementor's Kiss | 21 | Hermione's Secret | 22 | Owl Post Again |
Book 4: Goblet of Fire
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | The Riddle House | 2 | The Scar | 3 | The Invitation | 4 | Back to the Burrow | 5 | Weasley's Wizard Wheezes | 6 | The Portkey |
| 7 | Bagman and Crouch | 8 | The Quidditch World Cup | 9 | The Dark Mark | 10 | Mayhem at the Ministry | 11 | Aboard the Hogwart's Express | 12 | The Triwizard Tournament |
| 13 | Mad-Eye Moody | 14 | The Unforgivable Curses | 15 | Beauxbatons and Durmstrang | 16 | The Goblet of Fire | 17 | The Four Champions | 18 | The Weighing of the Wands |
| 19 | The Hungarian Horntail | 20 | The First Task | 21 | The House-Elf Liberation Front | 22 | The Unexpected Task | 23 | The Yule Ball | 24 | Rita Skeeter's Scoop |
| 25 | The Egg and the Eye | 26 | The Second Task | 27 | Padfoot Returns | 28 | The Madness of Mr. Crouch | 29 | The Dream | 30 | The Pensieve |
| 31 | The Third Task | 32 | Flesh, Blood, and Bone | 33 | The Death Eaters | 34 | Priori Incantatem | 35 | Veritaserum | 36 | The Parting of the Ways |
| 37 | The Beginning |
Book 5: Order of the Phoenix
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Dudley Demented | 2 | A Peck of Owls | 3 | The Advance Guard | 4 | Number Twelve, Grimmauld Place | 5 | The Order of the Phoenix | 6 | The Noble and Most Ancient House of Black |
| 7 | The Ministry of Magic | 8 | The Hearing | 9 | The Woes of Mrs. Weasley | 10 | Luna Lovegood | 11 | The Sorting Hat's New Song | 12 | Professor Umbridge |
| 13 | Detention with Dolores | 14 | Percy and Padfoot | 15 | The Hogwarts High Inquisitor | 16 | In the Hog's Head | 17 | Educational Decree Number Twenty-Four | 18 | Dumbledore's Army |
| 19 | The Lion and the Serpent | 20 | Hagrid's Tale | 21 | The Eye of the Snake | 22 | St. Mungo's Hospital for Magical Maladies and Injuries | 23 | Christmas on the Closed Ward | 24 | Occlumency |
| 25 | The Beetle at Bay | 26 | Seen and Unforeseen | 27 | The Centaur and the Sneak | 28 | Snape's Worst Memory | 29 | Careers Advice | 30 | Grawp |
| 31 | O.W.L.s | 32 | Out of the Fire | 33 | Fight and Flight | 34 | The Department of Mysteries | 35 | Beyond the Veil | 36 | The Only One He Ever Feared |
| 37 | The Lost Prophecy | 38 | The Second War Begins |
Book 6: Half-Blood Prince
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | The Other Minister | 2 | Spinner's End | 3 | Will and Won't | 4 | Horace Slughorn | 5 | An Excess of Phlegm | 6 | Draco's Detour |
| 7 | The Slug Club | 8 | Snape Victorious | 9 | The Half-Blood Prince | 10 | The House of Gaunt | 11 | Hermione's Helping Hand | 12 | Silver and Opals |
| 13 | The Secret Riddle | 14 | Felix Felicis | 15 | The Unbreakable Vow | 16 | A Very Frosty Christmas | 17 | A Sluggish Memory | 18 | Birthday Surprises |
| 19 | Elf Tails | 20 | Lord Voldemort's Request | 21 | The Unknowable Room | 22 | After the Burial | 23 | Horcruxes | 24 | Sectumsempra |
| 25 | The Seer Overheard | 26 | The Cave | 27 | The Lightning-Struck Tower | 28 | Flight of the Prince | 29 | The Phoenix Lament | 30 | The White Tomb |
Book 7: Deathly Hallows
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | The Dark Lord Ascending | 2 | In Memoriam | 3 | The Dursleys Departing | 4 | The Seven Potters | 5 | Fallen Warrior | 6 | The Ghoul in Pyjamas |
| 7 | The Will of Albus Dumbledore | 8 | The Wedding | 9 | A Place to Hide | 10 | Kreacher's Tale | 11 | The Bribe | 12 | Magic is Might |
| 13 | The Muggle-Born Registration Commission | 14 | The Thief | 15 | The Goblin's Revenge | 16 | Godric's Hollow | 17 | Bathilda's Secret | 18 | The Life and Lies of Albus Dumbledore |
| 19 | The Silver Doe | 20 | Xenophilius Lovegood | 21 | The Tale of the Three Brothers | 22 | The Deathly Hallows | 23 | Malfoy Manor | 24 | The Wandmaker |
| 25 | Shell Cottage | 26 | Gringotts | 27 | The Final Hiding Place | 28 | The Missing Mirror | 29 | The Lost Diadem | 30 | The Sacking of Severus Snape |
| 31 | The Battle of Hogwarts | 32 | The Elder Wand | 33 | The Prince's Tale | 34 | The Forest Again | 35 | King's Cross | 36 | The Flaw in the Plan |
| 37 | Nineteen Years Later |
Book f: Fantastic Beasts and Where to Find Them
[edit ]| Code | Chapter Title | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| a | About the Author | f | Foreword | 1 | Introduction by Newt Scamander | 2 | About This Book | 3 | What Is a Beast? |
| 4 | A Brief History of Muggle Awareness of Fantastic Beasts | 5 | Magical Beasts in Hiding | 6 | Why Magizoology Matters | 7 | Ministry of Magic Classifications | 8 | An A-Z of Fantastic Beasts |
Book q: Quidditch Through the Ages
[edit ]| Code | Chapter Title | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| a | About the Author | f | Foreword | 1 | The Evolution of the Flying Broomstick | 2 | Ancient Broom Games | 3 | The Game From Queerditch Marsh | 4 | The Arrival of the Golden Snitch |
| 5 | Anti-Muggle Precautions | 6 | Changes in Quidditch Since the Fourteenth Century | 7 | Quidditch Teams of Britain and Ireland | 8 | The Spread of Quidditch Worldwide | 9 | The Development of the Racing Broom | 10 | Quidditch Today |
Short citations
[edit ]To create a short inline citation that links to this template, use the specific tag for the volume or edition you are citing:
| Volume / Title | SFN Tag |
|---|---|
| 1 | {{sfn |Rowling|1997}} |
| 2 | {{sfn |Rowling|1998}} |
| 3 | {{sfn |Rowling|1999}} |
| 4 | {{sfn |Rowling|2000}} |
| 5 | {{sfn |Rowling|2003}} |
| 6 | {{sfn |Rowling|2005}} |
| 7 | {{sfn |Rowling|2007}} |
| Fantastic Beasts and Where to Find Them | {{sfn |Rowling|2001}} |
| Quidditch Through the Ages | {{sfn |Rowling|2001a}} |
- Note: This assumes
{{Harry Potter reference}}exists elsewhere in the article.
Options
[edit ]Supplement and Override
[edit ]You have the option to supplement or override parameters.
- Supplement: You can add additional parameters supported by standard citation templates (like
{{cite book }}or{{cite encyclopedia }}) such as|quote=,|ref=, etc. - Override: You can override parameters already defined by the template (for example, providing a custom
|url=if you are citing a specific digital scan not mapped by the system).
Digital availability
[edit ]Because texts have complex publication histories, digital availability may vary by volume. Some volumes may be physical-only, while others may be hosted digitally (e.g., on the Internet Archive, Google Books, or Wikisource). If a specific volume is hosted digitally, the underlying SST Module will automatically generate the correct links and activate the relevant digital features below.
Volumes and editions
[edit ]Many historical works span multiple volumes or have been printed in various editions. SSTS templates are built to handle these variations natively. You can pass the |volume= or |edition= parameters exactly as you would in standard wikitext.
- Edition:
{{The Ottoman Empire |edition=Second |page=112}}
- Volume:
{{The Ottoman Empire |volume=2 |page=112}}
SSTS uses a normalization module that understands that "Second", "2nd", and "2" all mean the same thing, or "Vol. 1", "Volume 1", and "1".
Chapters
[edit ]To link to a specific chapter, use |chapter= and |chapter-page=.
{{The Cambridge History of Iran |volume=1 |chapter=Introduction |chapter-page=12}}
Page numbers
[edit ]The system supports page number formatting of various types:
|page=42- single page|pages=42-50- page ranges|pages=42, 50, 60- multiple pages|pages=42-49, 50-59, 60-69- multiple page range groups
All of these will get automatically linked to the specific page numbers.
Page number options
[edit ]Leaf numbers
[edit ]Because the page number printed on the physical page (e.g., Roman numeral "xii") might not match the digital file's "leaf" or "sequence" number (e.g., scan #7), SSTS uses a special display@machine syntax within the |page= or |pages= parameters to bridge this gap.
- Left of the @: The page number as it is printed in the physical book. This is what readers will see in the citation text.
- Right of the @: The machine code instructing the URL how to find that exact page in the digital archive.
Different digital libraries require slightly different machine codes.
Use the format display@<host code><leaf #>.
- Example Internet Archive:
xiii@n7means printed page "xiii" is located at Internet Archive leaf number 7 (e.g. the URL../page/n7). Thus,|page=xiii@n7 - Example Google Books:
xiii@gPR13means printed page "xiii" is located at Google Books leaf number 13 (e.g. the URL...&pg=PR13).
| Host Service | Host Code | Format | Resulting Link | Citation and Destination Printed Page |
|---|---|---|---|---|
| Internet Archive | n | 42 | .../page/42 | 42 |
| Internet Archive | n | xii@n7 | .../page/n7 | xii |
| HathiTrust | s | 42 | Not Available | Does not support printed-page-number linking |
| HathiTrust | s | 42@s54 | ...&seq=54 | 42 |
| Project Gutenberg | u | 42 | .../pg78102-images.html#page-42 | 42 |
| Project Gutenberg | u | 42@u42 | .../pg78102-images.html#page-42 | 42 |
| Wikisource | w | 42 | Not Available | Does not support printed-page-number linking |
| Wikisource | w | 42@w54 | [[s:Page:FileName.pdf/54|42]] | 42 |
| Wikisource | w | 42@w"Chapter 1" | [[s:Page:FileName.pdf/Chapter_1|42]] | 42 |
| Google Books | g | 42 | ...&pg=PA42 | 42 |
| Google Books | g | 42@gPA42 | ...&pg=PA42 | 42 (PA is "Page Arabic") |
| Google Books | g | xiii | ...&pg=PR13 | xiii |
| Google Books | g | xiii@gPR13 | ...&pg=PR13 | xiii (PR is "Page Roman") |
| Google Books | g | cover@gPP1 | ...&pg=PP1 | cover (PP is "Page Physical" or unnumbered pages, covers, blank pages etc) |
| Google Books | g | insert@gPT15 | ...&pg=PT15 | insert (PT is "Page Text" unnumbered inserts, photo plates, etc) |
Search
[edit ]Many digital libraries support a "search inside" feature that automatically highlights a specific word or phrase on the page when the reader opens the link. SSTS allows you to trigger this feature directly from the citation by enclosing your search term in square brackets [] within the |page= or |pages= parameter.
This syntax can be used on its own, or appended to the @ linking syntax.
- Basic search:
{{The Ottoman Empire |page=42 [Suleiman]}}
- Result: Links to printed page 42 and searches the text for the word "Suleiman", highlighting it on the digital scan.
- Combined with leaf linking:
{{The Ottoman Empire |page=xii@n7 [Constantinople]}}
- Result: Displays printed page "xii" in the citation, routes the reader to machine leaf "n7", and searches the page for "Constantinople".
- Multiple terms:
{{The Ottoman Empire |page=45 [military reform], 57-60 [justinian] }}
- Result: You can include multiple search terms one for each page grouping separated by a comma.
Please note that this feature relies on the destination host's capabilities. Based on current engine configurations, search-highlighting is supported by:
- Internet Archive
- HathiTrust
- Google Books
Dummy search
[edit ]A core feature of this module is its handling of the Internet Archive's restricted viewing modes.
If an editor provides a page number, the module automatically appends that number as a "dummy" search string (e.g., ?q=42). This is a necessary architectural workaround: supplying a search string forces the IA viewer to open and highlight specific pages that might be blocked due to restrictions (similar to Google Books snippet view with search strings).
Documentation
[edit ]The examples in this documentation are based on stock / generic page numbers and search terms; they may not work precisely for this particular book. For more details on the underlying system, see Wikipedia:SSTS.
TemplateData
[edit ]TemplateData for Harry Potter reference
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Book | book | The specific book being cited (1-7, f, or q). | String | required |
| Chapter | chapter | The chapter number or letter. | String | optional |
| Page | page | no description | String | optional |
| Pages | pages | no description | String | optional |
See also
[edit ]Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.