Template:Mono/doc

From Second Life Wiki
Jump to navigation Jump to search

Usage

See also

  • {{Strong}} – for semantically indicating strong emphasis instead of simple typographical boldfacing.
  • {{Strongbad}} – same as {{Strong}} but red like this: Never use {{Strongbad}} in articles.
  • {{Stronggood}} – same as {{Strongbad}} but green like this: Only use {{Stronggood}} on non-article pages.
  • {{Em}} – similar template for semantically indicating mild emphasis instead of simple typographical italicization.
  • {{Var}} – same as {{Varserif}} use for all variables (e.g. StrIllustratePrefix), except for 'I' (upper-case i) and 'l' (lower-case L) for which use {{Varserif}} allows visible distinctions.
  • {{Varserif}} – same as {{Var}} but uses serif font (e.g. <templatestyles src="Var serif/styles.css" />StrIllustratePrefix), especially for distinguishing between 'I' (upper-case i) and 'l' (lower-case L) as variables.
  • {{Wikivar}} – for displaying wikicode variables and magicwords as they would appear in source code, e.g. Template:Wikivar, Template:Wikivar.
  • {{Para}} – for displaying wiki template parameters (e.g. |title =) or parameters and values (e.g. |year = 2008)
  • {{Tlx}} and related – for displaying entire templates (with or without parameters and values) as code
  • {{HtmlTag}} – for using HTML elements ("tags") in prose (e.g. "When coding HTML <span class="plainlinks nourlexpansion lx">[[Template:{{{1}}}]]&nbsp;<span style="font-size:90%;">([{{fullurl:Template:{{{1}}}|action=edit}} edit] &#124; [[Template talk:{{{1}}}|talk]] &#124; [{{fullurl:Template:{{{1}}}|action=history}} history] &#124; [{{fullurl:Special:Whatlinkshere/Template:{{{1}}}}} links] &#124; [{{fullurl:Template:{{{1}}}|action=watch}} watch] &#124; [https://wiki.secondlife.com/w/index.php?title=Special:Log&page=Template%3A%7B%7B%7B1%7D%7D%7D logs])</span></span>img> tags, always include ...")
  • {{Code}} – for computer source code (e.g. "... always include the alt parameter.").
    Note: to nest code that looks like other templates like {{Var|name}} inside, or that contains any equal sign (=),
    • use: {{Code|code= code with {{Var|name}} nested }} which gives code with <span lang="en" dir="ltr" class="mw-content-ltr plainlinks" style="margin:1px; border:1px solid #EEE; padding:1px; background:#FFF; color:#333; unicode-bidi:embed; unicode-bidi:isolate; line-height:1.4; font-family:monospace; font-weight:normal; font-style:normal; font-size:1.1em; white-space:nowrap;">{{[[Template:Var|Var]]|<span>name</span>}}</span> nested
    • or: {{Code|1= code with {{Var|name}} nested }} which gives code with <span lang="en" dir="ltr" class="mw-content-ltr plainlinks" style="margin:1px; border:1px solid #EEE; padding:1px; background:#FFF; color:#333; unicode-bidi:embed; unicode-bidi:isolate; line-height:1.4; font-family:monospace; font-weight:normal; font-style:normal; font-size:1.1em; white-space:nowrap;">{{[[Template:Var|Var]]|<span>name</span>}}</span> nested
  • {{Syntaxhighlight}} or {{Sxhl}} – wrapper for <span class="plainlinks nourlexpansion lx">[[Template:{{{1}}}]]&nbsp;<span style="font-size:90%;">([{{fullurl:Template:{{{1}}}|action=edit}} edit] &#124; [[Template talk:{{{1}}}|talk]] &#124; [{{fullurl:Template:{{{1}}}|action=history}} history] &#124; [{{fullurl:Special:Whatlinkshere/Template:{{{1}}}}} links] &#124; [{{fullurl:Template:{{{1}}}|action=watch}} watch] &#124; [https://wiki.secondlife.com/w/index.php?title=Special:Log&page=Template%3A%7B%7B%7B1%7D%7D%7D logs])</span></span>syntaxhighlight />, but will wrap overflowing text
  • {{Deprecated code}} or {{Dc}} – for deprecated source code in template documentation, articles on HTML specs, etc.
  • {{Pre}} – for larger blocks of source code and other pre-formatted text
  • {{Bq}} – for indented blocks of content, such as block quotations, examples, poems, etc.
  • {{Kbd}} – for indicating user input
  • {{Key press}} – for indicating the input of specific keystrokes, e.g. Ctrl+X
  • {{Samp}} – for example output