Template:Article
This template is used for linking directly to a what if? article on xkcd.com in the first column of the what if? articles index, or for labelling a book-only chapter that has no online article. For linking to a what if? article or book chapter in an explanation, use {{what if}}.
Usage[edit]
{{Article|article number|article title}}
Or, to link to the chapter of one of the What If? books, add the book number and a hyphen (-) before the chapter number:
{{Article|chapter title}}
If the second parameter is omitted, the entry is treated as a book-only chapter that was never published online: the text is shown bolded and centred, without a link, and without a thumbnail, since there is no online article or image to point to. This is the intended way to reference such chapters, rather than something to avoid.
When the article title is given, a thumbnail of the article's image is shown below the link by default, using the title as the image filename. The image is assumed to be a .png file, so only the base name is needed. To suppress the thumbnail, pass noimage=yes:
{{what if|article number|article title|noimage=yes}}
To use a different image filename, add it as the third parameter (without the File: prefix or the .png extension):
{{what if|article number|article title|image file name}}
To also set a custom thumbnail width in pixels, add it as the fourth parameter (just the number, no px). Note that the third parameter is required in this case, even if it is the same as the title:
{{what if|article number|article title|image file name|width in pixels}}
The width defaults to 100px if omitted.
It also creates a unique anchor that can be linked to. Just add #ARTICLE_NUMBER (or #BOOK_NUMBER-CHAPTER_NUMBER for book chapters) or #Title_of_the_Article (only available if a title was given) to the end of an internal link to jump to the position of this template on that page (see the examples below). Note that you must use underscores instead of spaces and use sentence case, because the links are case-sensitive. Especially useful to link to a specific row of the table in what if? articles, what if? (blog), and all the What If? book pages.
Examples[edit]
- Example with a thumbnail:
{{what if|2|SAT Guessing}}shows the default 100px thumbnail using "SAT Guessing" as the filename. - To suppress it:
{{what if|2|SAT Guessing|noimage=yes}} - To shrink it to 30px (passing the title again as the third parameter since a custom width requires it):
{{what if|2|SAT Guessing|SAT Guessing|30}}
How to link to a what if? article in an explanation[edit]
- Further information: explain xkcd:Editor FAQ#How do I link to a what if? article?.
what if? is Randall Munroe's blog and book series. To link to one of the blog articles or a book chapter, you should always use the {{what if}} template. It links to the matching row of the what if? articles index, where every official what if? blog article, book chapter, and YouTube video are collected and explained. In the examples, the first part is the identifier of the row you want to reach, while the second part is the text that readers see. There are several kinds of identifiers:
- To link to an article from the blog, use the article number. For example, use
''{{what if|158|Hot Banana}}''to link to the 158th blog article, which results in: Hot Banana. This is the shortest and most common option, but it only works for articles that were published on the blog.
- To link to a chapter of one of the books, use the book number and the chapter number separated by a hyphen.
{{''what if|2-63|Walking on the Sun}}''links to the 63rd chapter of the 2nd book and results in: Walking on the Sun. The book numbers are1-for What If? (the original book),2-for What If? 2, and3-for What If? 10th Anniversary Edition, whose only new chapter is Bonus Chapter (''{{what if|3-70|Bonus Chapter}}''). If the article is also on the blog, either form works.
- There are two ways to link to an official what if? YouTube video. This is the best option when an article has more than one video and you want to reference a specific one:
- For full-length horizontal videos, use the number from the "YouTube" column with a
Ybefore it.{{what if|Y34|the ''Keyboard Power'' video}}links to the 34th video in that column, the Keyboard Power video. - For short vertical videos, do the same but with the number from the "YT Shorts" column and an
Sbefore it.{{what if|S16|video on swimming in spent nuclear pools}}links to the 16th short and results in: video on swimming in spent nuclear pools. Long videos and shorts are numbered separately, soY16andS16are different videos.
- For full-length horizontal videos, use the number from the "YouTube" column with a
- You can also simply use the article title with the correct capitalisation.
''{{what if|Pigeon Chair|Pigeon Chair}}''results in: Pigeon Chair. This suits articles that exist only in a book.
- To link to a single question of a grouped article, there are two methods:
- Use the name of the reader who asked it.
{{what if|Henry M.|last question of ''Weird & Worrying #2''}}results in: last question of Weird & Worrying #2. This anchor is more precise for multiple-question articles such as Short Answers sections, because it takes readers to the specific question. It cannot be used for anonymous readers: for that, use the method below: - Use the full question as written in the index.
{{what if|Could life evolve in a constantly running microwave?|first question of ''Short Answers #5''}}results in: first question of Short Answers #5. It is the only option for anonymous readers, but it is longer and might break in the future.
- Use the name of the reader who asked it.
- In all of the options above, leaving out the displayed text also works (e.g.,
{{what if|130}}results in what if? 130), but it does not show the title, so it is best to always add some displayed text. It usually matches the name of the article itself, but it can also be another wording if it fits your sentence better. - You should use a simpler method when linking to a what if? article from one of these pages: what if? (blog), What If? (book), What If? 2, and What If? 10th Anniversary Edition. Because those four pages already embed the index, avoid using the
{{what if}}template and instead use a normal anchor wikilink to keep the reader on the same page. To do this, place[[#and then any of the identifiers above, such as''[[#2-63|Tire Rubber]]''which results in: Tire Rubber (this link will not work outside the four pages).
When you mention an article in a sentence, the words what if? should link to the blog page or the specific book page, and the title should be in italics. You can copy these and replace the coloured parts:
See the ''[[what if? (blog)|what if?]]'' article ''{{what if|28|Steak Drop}}''.results in: See the what if? article Steak Drop.See the chapter ''{{what if|2-38|Eat a Cloud}}'' in ''[[What If? 2]]''.results in: See the chapter Eat a Cloud in What If? 2.