Difference between revisions of "Template:Italic title"

From RRU Knowledge Base
Line 1: Line 1:
<includeonly>{{DISPLAYTITLE:{{#if:{{{1|}}}|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{1}}}|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}''{{PAGENAME}}''}}}}</includeonly><noinclude>
<includeonly>{{DISPLAYTITLE:{{#if:{{{1|}}}|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{1}}}|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}''{{PAGENAME}}''}}}}</includeonly><noinclude>{{italic title|''Italic'' title}}
==Documentation==
==Documentation==
This template displays all or part of the article's title in italics. This may be desired for proper names of books, movies, video games, etc. Note that aside from the apostrophes to create italic text, the title written in the template must be identical to the page's actual title, or it will spit out an error instead. The written title does not include the page's namespace.
This template italicizes all or part of a page's title. Italics should be used when italics would be used in running text. This primarily involves the titles of books, films, video games, and other creative works. Other syntax, such as taxonomic names, the names of ships, and foreign phrases, would also be italicized if applicable (eg. [[LMS Explorer|LMS ''Explorer'']]). Article titles can't contain working wiki formatting, such as single quote, as attempting to add it will result in it becoming part of the page's URL, and the title's font appearance will not be affected.
[[Wikipedia:WP:DISPLAYTITLE|DISPLAYTITLE]] [[Wikipedia:H:MW|magic word]], which this template uses, must instead be used when formatted titles are desired.
 
===Usage instructions===
To use this template, add <code><nowiki>{{italic title}}</nowiki></code> to an article, preferably at the top. This will cause the entire title to display in italics.
 
To italicize only part of the title, add a parameter consisting of the page's ''full exact title'' with normal Mediawiki italic formatting <code><nowiki>''</nowiki></code> around the parts of the title desired to be italicized. An example of this usage is <code><nowiki>{{italic title|''Italic'' title}}</nowiki></code>, which causes the word ''Italic'' in this template's title to display as italic text. Note that the page's [[mediawikiwiki:Namespaces|namespace]] does not count as part of its title, and can't be included as part of this parameter without returning an error message.
 
===Example usage===
*<code><nowiki>{{italic title}}</nowiki></code> →<br \><span style="font-weight: 600; font-size: 39px;">''Example title 1''</span>
 
*<code><nowiki>{{italic title|Example ''title'' 2}}</nowiki></code> →<br \><span style="font-weight: 600; font-size: 39px;">Example ''title'' 2</span>
===Errors===
Aside from the apostrophes needed to create italic text, the title given must be identical to the page title. Any changes will result in the template being ignored and an error message being displayed. For example, if the namespace is included in this template's title, the following error message will display on the editing screen:
 
{{error|Warning:|<nowiki>Display title "Template:Template:<i>Italic</i> title" was ignored since it is not equivalent to the page's actual title.</nowiki>}}
 
Multiple instances of <nowiki>{{italic title}}</nowiki> on a page will cause something like the following error message to display:
 
{{error|Warning:|<nowiki>Display title "Template:<i>Italic</i> title" overrides earlier display title "Template:<i>Italic title</i>".</nowiki>}}


An example of its usage is <code><nowiki>{{italic title|''Italic'' title}}</nowiki></code>, which causes the word ''Italic'' in this template's title to display as italic text.
{{italic title|''Italic'' title}}
[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Revision as of 02:45, 2 December 2017

Documentation

This template italicizes all or part of a page's title. Italics should be used when italics would be used in running text. This primarily involves the titles of books, films, video games, and other creative works. Other syntax, such as taxonomic names, the names of ships, and foreign phrases, would also be italicized if applicable (eg. LMS Explorer). Article titles can't contain working wiki formatting, such as single quote, as attempting to add it will result in it becoming part of the page's URL, and the title's font appearance will not be affected. DISPLAYTITLE magic word, which this template uses, must instead be used when formatted titles are desired.

Usage instructions

To use this template, add {{italic title}} to an article, preferably at the top. This will cause the entire title to display in italics.

To italicize only part of the title, add a parameter consisting of the page's full exact title with normal Mediawiki italic formatting '' around the parts of the title desired to be italicized. An example of this usage is {{italic title|''Italic'' title}}, which causes the word Italic in this template's title to display as italic text. Note that the page's namespace does not count as part of its title, and can't be included as part of this parameter without returning an error message.

Example usage

  • {{italic title}}
    Example title 1
  • {{italic title|Example ''title'' 2}}
    Example title 2

Errors

Aside from the apostrophes needed to create italic text, the title given must be identical to the page title. Any changes will result in the template being ignored and an error message being displayed. For example, if the namespace is included in this template's title, the following error message will display on the editing screen:

Warning: Display title "Template:Template:<i>Italic</i> title" was ignored since it is not equivalent to the page's actual title.

Multiple instances of {{italic title}} on a page will cause something like the following error message to display:

Warning: Display title "Template:<i>Italic</i> title" overrides earlier display title "Template:<i>Italic title</i>".