Template:Italic title: Difference between revisions

From Research Realm
(copied old wikipedia template)
(stolen from mario wiki, including description. sorry.)
Line 1: Line 1:
<includeonly>{{DISPLAYTITLE:{{#switch: {{#ifexpr: {{str find|{{PAGENAME}}|(}} != -1
<includeonly><div>{{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{#if:{{{1|}}}|{{{1}}}|{{#if:{{{id|}}}|{{#if:{{#pos:{{PAGENAME}}|(}}|{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|(}}}} (''{{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|(}}+1}}|-1}}'')|{{PAGENAME}}}}|{{#if:{{#pos:{{PAGENAME}}|(}}|''{{#sub:{{PAGENAME}}|0|{{#rpos:{{PAGENAME}}|(}}}}'' ({{#sub:{{PAGENAME}}|{{#expr:{{#rpos:{{PAGENAME}}|(}}+1}}|-1}})|''{{PAGENAME}}''}}}}}}}}</div></includeonly><noinclude>
  | 1
To italicize the full article title, ignoring the identifier (if present), use:
  | 0
:<code><nowiki>{{italic title}}</nowiki></code>
  }}{{#if: {{{force|}}}  
 
  | 1
To italicize just the article identifier (e.g. a game name in parenthesis), use:
  | 0
:<code><nowiki>{{italic title|id=yes}}</nowiki></code>
  }}{{str ≤ len | {{PAGENAME}} | 49 <!-- The max {{str find}} can handle is 50 --> | 1 | 0 }}| 100 = {{#if:{{NAMESPACE}}|{{NAMESPACE}}: }}{{#switch:{{PAGENAME}}
 
  | {{{1}}} ({{{2|}}}) = ''{{{1}}}'' ({{{2|}}})
For custom italics, use the desired title as the given parameter:
  | {{{1}}} ({{{3|}}}) = ''{{{1}}}'' ({{{3|}}})
:<code><nowiki>{{italic title|List of ''LEGO Island'' characters}}</nowiki></code>
  | {{{1}}} ({{{4|}}}) = ''{{{1}}}'' ({{{4|}}})
</noinclude>
  | {{{1}}} ({{{5|}}}) = ''{{{1}}}'' ({{{5|}}})
  | {{{1}}} ({{{6|}}}) = ''{{{1}}}'' ({{{6|}}})
  | #default = {{PAGENAME}}
  }}| 101 = {{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}''{{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}}|(}}-2}} }}'' {{substr any| {{PAGENAME}} | {{#expr: {{str find|{{PAGENAME}}|(}} - 1}} | {{#expr: {{str len|{{PAGENAME}}}} - {{str find|{{PAGENAME}}|(}} }} + 1 }}
| 010
| 011
| 110
| 111
| 001 = {{#if:{{NAMESPACE}}|{{NAMESPACE}}: }}''{{PAGENAME}}'' | 000 = {{FULLPAGENAME}} }} }}</includeonly>

Revision as of 03:58, 18 January 2023

To italicize the full article title, ignoring the identifier (if present), use:

{{italic title}}

To italicize just the article identifier (e.g. a game name in parenthesis), use:

{{italic title|id=yes}}

For custom italics, use the desired title as the given parameter:

{{italic title|List of ''LEGO Island'' characters}}