Template:Template name explanation

From Angelina Jordan Wiki

Documentation

This template shows quoted text rendered in a monospace font (in which all the characters have the same width — also known as "typewriter type" and matching the rendering of the <tt> HTML element), alternating between underlined text and non-underlined text. This is used to format "mnemonic" phrases that explain the names of certain templates in their documentation. (See the examples below.)

Usage

  • {{template name explanation|underlined|and regular|text|alternating|}}
  • {{template name explanation|underlined|and regular|text|alternating||first=|second=|this=|the phrase=|quote-only=|.=}}

Up to 9 underlined segments can be shown (and as many non-underlined segments). If you need more than that… why the heck would need more than that??

The optional parameters first and second can be used to format two different phrases in the same sentence. See the examples below.

The optional parameters this, the phrase, and . (note that these are the names of parameters) allow you to override those specific parts of the output. Again, see the examples below.

If you set the optional parameter quote-only to a true value, the output is restricted to only the quoted part, omitting the beginning of the sentence and the final punctuation.

Examples

  • {{template name explanation}}
    ⇒ The name of this template is based on the phrase "".
  • {{template name explanation|t|ypewriter |t|ype with |u|nder|l|ining}}
    ⇒ The name of this template is based on the phrase "typewriter type with underlining".
  • {{template name explanation||e|xternal |l|link}}
    ⇒ The name of this template is based on the phrase "external link".
  • {{template name explanation|abbr|eviation|the phrase=the word}}
    ⇒ The name of this template is based on the word "abbreviation".
  • {{template name explanation|…|this=the}}
    ⇒ The name of the template is based on the phrase "".
  • {{template name explanation|th|is|.=}} or perhaps {{template name explanation|th|at|quote-only=y}}.
    ⇒ The name of this template is based on the phrase "this" or perhaps "that".
  • {{template name explanation|th|is|first=y}} or perhaps {{template name explanation|th|at|second=y}}
    ⇒ The name of this template is based on the phrase "this" or perhaps "that".

The point of using this=the in the fifth example is to avoid over-using the word "this" in cases where that word has already been used multiple times in the text immediately preceding or following the call to this template.

As seen in the third example, if the first bit of text is not to be underlined, just leave the first positional parameter empty.

The last two examples are almost equivalent ways of suggesting two different mnemonic phrases. Notice how you have to provide your own final punctuation after the second template call using quote-only but not when using second.