Template:Xt2/doc

From LNF Wiki
Jump to navigation Jump to search

Usage

Use template {{xt2}} to format a style example (for example, on the Manual of Style and its subpages) to be displayed on its own line, in green, in a serif font, and indented in block-quotation style. (Use 1= before the argument if it contains equals signs.) For examples to be displayed inline within running text, use {{xt}}. For bad/wrong examples, use {{!xt2}} (or {{!xt}} inline).

Examples
What you write
For nested quotations, use double quotes for the outermost level, single quotes for the next inner level, and continue alternating: {{xt2|The Dalai Lama stated in his book ''The Universe in a Single Atom'': "I am told that one of the greatest of all quantum theorists, Richard Feynman, wrote 'I think I can safely say that nobody understands quantum mechanics', so at least I feel I am in good company."}}
What you get
For nested quotations, use double quotes for the outermost level, single quotes for the next inner level, and continue alternating:

The Dalai Lama stated in his book The Universe in a Single Atom: "I am told that one of the greatest of all quantum theorists, Richard Feynman, wrote 'I think I can safely say that nobody understands quantum mechanics', so at least I feel I am in good company."

For blocks of code, such as template code, use {{xt2|1=<code>code here</code>}}.

The parameter |title= takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" (in most browsers) when the cursor hovers over the block of text.

See also

  • {{xt}} inline positive example text, in green, with serif font
  • {{bxt}} same as {{xt}} but uses bold instead of serif font
  • {{mxt}} same as {{xt}} but uses mono-spaced font (especially useful in source code)
  • {{xt2}} same as {{xt}} but for blocks of text
  • {{!xt}} inline negative example text, in red, with serif font
  • {{!bxt}} same as {{!xt}} but uses boldface
  • {{!mxt}} same as {{!xt}} but uses mono-spaced font
  • {{!xt2}} same as {{!xt}} but for blocks
  • {{xtd}} inline deprecated (or uncertain, unavailable, lorem, etc.) example text, in grey
  • {{bxtd}} same as {{xtd}} but uses boldface
  • {{mxtd}} same as {{xtd}} but uses mono-spaced font
  • {{xtn}} inline neutral example text, with no color change, when none of the above applies
  • {{bxtn}} same as {{xtn}} but uses boldface; it still applies a CSS class, so it's not simply boldfacing
  • {{dc}} inline deprecated or deleted code or text; {{dc2}} variant has strikethrough (both explicitly use the <del> element)