Difference between revisions of "Template:Markup/doc"
imported>Iceblock (→Short cut: Update) |
|||
| Line 1: | Line 1: | ||
| − | + | the table's overall appearance.", | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
| Line 72: | Line 7: | ||
}, | }, | ||
"noheaders": { | "noheaders": { | ||
| − | "description": "Set (as e.g. noheaders=on) | + | "description": "Set (as e.g. noheaders=on) |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
] | ] | ||
}, | }, | ||
"outputstyle": { | "outputstyle": { | ||
"description": "For CSS styles amending the presentation of the second column (output)'s content.", | "description": "For CSS styles amending the presentation of the second column (output)'s content.", | ||
| − | "type": "string | + | "type": "string heading. Overrides (but does not replace) colheaderstyle.", |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
| Line 115: | Line 26: | ||
Each cell in the first ("Markup") column uses {{tag|pre|o}} 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 {{xtag|nowiki}}. It is technically not possible to add this feature to the template. | Each cell in the first ("Markup") column uses {{tag|pre|o}} 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 {{xtag|nowiki}}. It is technically not possible to add this feature to the template. | ||
| − | Each cell in | + | 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 {{tag|nowiki|s}} before the first line; see examples below. | * If the first line includes wikimarkup that must start on a new line such as #, * or ; then use {{tag|nowiki|s}} before the first line; see examples below. | ||
| − | * Header | + | * Header will show |
* Some templates will place the page in a maintenance category, which is usually undesired: | * Some templates will place the page in a maintenance category, which is usually undesired: | ||
| − | ** Instead of {{tlx|citation needed}}, use {{tlx|fake | + | ** Instead of {{tlx|citation needed}}, use {{tlx|fake |
| − | * Some templates may | + | * Some templates may |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Examples=== | ===Examples=== | ||
| Line 174: | Line 37: | ||
====Simple==== | ====Simple==== | ||
{{Markup | {{Markup | ||
| − | | <nowiki>'''Bold text'''</ | + | | <nowiki>'''Bold text'''</ here uses {{tl2|fake heading}} |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
== References == | == References == | ||
| − | {{reflist} | + | {{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}} | | 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}} | ||
Revision as of 01:04, 1 August 2016
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>
Contents
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:
- Instead of
{{citation needed}}, use {{tlx|fake
- Instead of
- 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}}}}
|
|
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.