Template:Markup/doc

From blackwiki
Jump to navigation Jump to search

the table's overall appearance.", "type": "string" }, "title": { "description": "Title above table.", "type": "string" }, "noheaders": { "description": "Set (as e.g. noheaders=on) ] }, "outputstyle": { "description": "For CSS styles amending the presentation of the second column (output)'s content.", "type": "string heading. Overrides (but does not replace) colheaderstyle.", "type": "string" }, "colheaderstyle": { "description": "For CSS styling to amend the appearance of each column's heading.", "type": "string" } } } </templatedata>

Usage

Each cell in the first ("Markup") column uses <pre> to retain newlines and spaces but styled to allow content to wrap within it. It is usually desirable to escape the content of these cells so that the markup is displayed by wrapping the markup in <nowiki>. It is technically not possible to add this feature to the template.

Each cell in theare instances where this may differ:

  • If the first line includes wikimarkup that must start on a new line such as #, * or ; then use <nowiki /> before the first line; see examples below.
  • Header will show
  • Some templates will place the page in a maintenance category, which is usually undesired:
  • Some templates may

Examples

Simple

Markup Renders as
'''Bold text'''</ here uses {{tl2|fake heading}} 

== References ==
{{reflist}
| The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group=nb}} The cow jumped over the moon.{{fake citation needed}}

{{fake heading|sub=2|Notes}}
{{reflist|group=nb}}

{{fake heading|sub=2|References}}
{{reflist|close}}
}}

====Multiple rows====
{{Markup
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
}}

====With title====
{{Markup |title=Foxes and dogs
| The quick brown fox jumps over the lazy dog. | The quick brown fox jumps over the lazy dog.
}}

====Showing rendered HTML====
When a template is enclosed within {{tl|code}}, it shows the rendered HTML:

{{Markup
 | <nowiki>{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}}

White, T. H. (1977). The Book of Merlyn.

{{code|lang=html|{{cite book |last=White |first=T. H. |title=The Book of Merlyn |year=1977}}}}

<cite id="CITEREFWhite1977" class="citation book cs1">White, T. H. (1977). ''The Book of Merlyn''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+Book+of+Merlyn&rft.date=1977&rft.aulast=White&rft.aufirst=T.+H.&rfr_id=info%3Asid%2Fblackwiki.org%3ATemplate%3AMarkup%2Fdoc" class="Z3988"></span>'"`UNIQ--templatestyles-00000006-QINU`"'

See also

  • {{Markup2}} for bulleted and indented markup.
  • {{Markupv}} for the vertical presentation (above/below) of markup/code and its output.
  • {{Automarkup}} does not require to write the code samples twice.