Template:Template name explanation/doc
Documentation
This template renders text 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), and allows you to easily alternate between regular text and underlined text, which is something that is necessary on this wiki in our template documentation.
Usage
{{template name explanation|underlined|and regular|text|alternating|…}}{{template name explanation|underlined|and regular|text|alternating|…|this=|the phrase=|.=|quote-only=}}
Up to 9 underlined segments can be shown. If you need more than that… why the heck would need more than that??
The optional parameters this, the phrase, and . allow you to override those specific parts of the output, as seen in the examples below.
The point of using this=the, as in the second-to-last 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.
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|A|.=}}or perhaps{{template name explanation|B|quote-only=y}}.
⇒ The name of this template is based on the phrase "A" or perhaps "B".
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 point of using this=the, as in the second-to-last example, is to avoid using the word "this" too much (i.e., if the text immediately preceding the call to this template contains multiple uses of the phrase "this template".)
In the last example, notice how you have to provide your own final punctuation when you specify quote-only=y.