Template:Samp

From OpenMW Wiki
Revision as of 15:45, 15 August 2017 by Darklocq (talk | contribs) (creating template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

output

Documentation

This is a convenient template wrapper for the <samp>...</samp> HTML element, the proper markup for output, broadly defined. It is rendered in monospace by most browsers. This can be used in running text or inside <code>...</code>.

It is usually used for:

  • Output messages from executables (in running text or in code examples). This is helpful in code to distinguish between code per se and what code produces. It is helpful in running text to make it clear we're talking about such output and not something in-game.
  • Game object IDs and coordinates (in running text, i.e. as output of Console, script, or CS lookups). This is helpful in running text because it distinguishes IDs from plain-English material, such as the non-ID names for things in the game.
  • Directory/folder paths, filenames, and filename extensions (in running text, i.e. as partial output of a directory listing). This is helpful in running text because it distinguishes operating-system stuff from plain-English material, such as the published title of a mod as distinct from a particular .esp or other resource included in it.

It is best to consistently use this template or its underlying element for things like directories, files, extensions, and IDs, and not overload the use of the <code>...</code> element, because that element on many wikis (including this one) is given a background color and a border, and this can be distracting in running text, especially when used for a single short string. In code, it also doesn't make sense to nest two <code>...</code> elements, but it often does make sense to mark output as such within blocks of "code" in a lose sense of that word.

Usage:

{{samp|the output here}}

If the content contains a = character, the parameter must be named (as |1=), but this is unlikely to arise.

For user input, see {{kbd}}.

These templates should not be used as a way to just get monospaced font for some other purpose; use <span style="font-family: monospace;">...</span>.