(Created page with "<includeonly>{| {{{width|width="90%"}}} style="border-width: medium; margin-left: {{{margin|}}}"}} {{#if: {{{title|}}} | {{!}}+ '''{{{title}}}'''}} {{#if: {{{notitle|}}} || !...") |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{| {{{width| | <includeonly>{| style="table-layout:fixed; width:{{{width|100%}}}; margin-top:0;margin-left:{{{margin-left|{{{margin|0}}}}}}; border-width:medium; padding:0; {{{style|}}}" | ||
{{#if: {{{title|}}} | {{!}}+ '''{{{title}}}'''}} | {{#if:{{{title|}}} |{{!}}+ '''{{{title}}}'''}} | ||
{{#if: {{{notitle|}}} || ! | {{#if:{{{noheaders|}}}{{{notitle|}}} | | ||
{{ | |! scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col1headerstyle|}}}"{{!}} {{{col1|{{{t1|Markup}}}}}} {{!!}}<!-- | ||
-->{{ | -->scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col2headerstyle|}}}"{{!}} {{{col2|{{{t2|Renders as}}}}}} | ||
-->{{#if: {{{ | }}<!-- | ||
-->{{#if:{{{1|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{1|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{2|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{3|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{3|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{4|}}} }} }}<!-- | ||
-->{{#if:{{{5|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{5|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{6|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{7|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{7|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{8|}}} }} }}<!-- | ||
-->{{#if:{{{9|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{9|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{10|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{11|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{11|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{12|}}} }} }}<!-- | ||
-->{{#if:{{{13|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{13|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{14|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{15|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{15|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{16|}}} }} }}<!-- | ||
-->{{#if:{{{17|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{17|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{18|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{19|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{19|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{20|}}} }} }}<!-- | ||
-->{{#if:{{{21|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{21|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{22|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{23|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{23|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{24|}}} }} }}<!-- | ||
-->{{#if:{{{25|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{25|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{26|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{27|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{27|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{28|}}} }} }}<!-- | ||
-->{{#if:{{{29|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{29|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{30|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{31|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{31|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{32|}}} }} }}<!-- | ||
-->{{#if:{{{33|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{33|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{34|}}} }} }}<!-- | |||
-->{{#if: {{{ | -->{{#if:{{{35|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{35|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{36|}}} }} }}<!-- | ||
-->{{#if:{{{37|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{37|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{38|}}} }} }}<!-- | |||
-->{{#if:{{{39|}}} |{{Markup/row |c1style={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|c1={{{39|}}} |c2style={{{col2style|{{{outputstyle|}}}}}}|c2={{{40|}}} }} }} | |||
|- | |- | ||
| | |style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"| | ||
| | |style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"| | ||
|}</includeonly><noinclude>{{ | |}</includeonly><noinclude> | ||
{{Documentation}} | |||
</noinclude> |
Latest revision as of 04:21, 17 February 2016
This template is used to present markup or code side by side with the rendered output.
Parameters:
- unnamed 1: Content of row 1, column 1
- unnamed 2: Content of row 1, column 2
- through
- unnamed 39: Content of row 20, column 1
- unnamed 40: Content of row 20, column 2
- t1: Title of column one; defaults to Markup
- t2: Title of column two; defaults to Renders as
- title: Title of table; defaults to none
- notitle: When set, suppresses table and column titles
- margin: set table left margin in em
Limitations
If you don't wrap the content of the markup cell in <nowiki>, then any template markup will not be escaped, it will be expanded.
This example shows the markup for {{tl|tag}}:
Renders as | Expected renderingTemplate:Markup/row |
---|---|
HTML entities are parsed in the markup cell
Mowikied markup shows as | Expected markupTemplate:Markup/row |
---|---|
To work around this, replace the &
with &
thus &nbsp;
will show as
Examples
Simple examples:
Markup | Renders asTemplate:Markup/rowTemplate:Markup/rowTemplate:Markup/row |
---|---|
Multiple rows:
Markup | Renders asTemplate:Markup/rowTemplate:Markup/rowTemplate:Markup/rowTemplate:Markup/rowTemplate:Markup/row |
---|---|
With title:
Markup | Renders asTemplate:Markup/row |
---|---|
See also
The above documentation is transcluded from Template:Markup/doc. Please add categories to the /doc subpage. Subpages of this template. |