This template is used to present markup or code side by side with the rendered output. It is very similar to the {{Markup}} template but the two columns output are both based on the same input. This makes this template easier to use but there are some situations where it doesn't work.

Parameters:

  • unnamed 1: Content of row 1, columns 1 and 2
  • unnamed 2: Content of row 2, columns 1 and 2
through
  • unnamed 19: Content of row 19, columns 1 and 2
  • unnamed 20: Content of row 20, columns 1 and 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

Examples of this template working

edit

Simple example:

Markup Renders as
[markup]

[rendering]

[markup]

[rendering]

With title:

Foxes and dogs
Markup Renders as
[markup]

[rendering]

[markup]

[rendering]

Image:

Markup Renders as
[markup]

[rendering]

Named character:

Markup Renders as
[markup]

[rendering]

Examples of this template not working

edit

Template:

Markup Renders as
[markup]

[rendering]

We want the left side to show {{USA}}. The template is parsed before being passed to Lua so the nowiki function returns the lower-level code for the template.

Table:

Markup Renders as
[markup]

[rendering]

[markup]

[rendering]

[markup]

[rendering]

[markup]

[rendering]

[markup]

[rendering]

[markup]

[rendering]

[markup]

[rendering]

As with the {{Markup}} template, the vertical bars within the table code are interpreted as separating inputs to the template.

Footnotes and section headings:

Markup Renders as
[markup]

[rendering]

The footnotes use templates and so suffer from the same problems as all templates. Arguably, the section headings come out of this example OK but we might not want the new section to appear in the contents list at the top of the page.

Section heading at the start of the template and signatures:

Markup Renders as
[markup]

[rendering]

Headings aren't parsed on the right if they are the first thing. (And adding white space doesn't help.) Signatures are are parsed even on the left. Ideally it would show ~~~~ on the left and Example (talk) 22:41, 18 November 2024 on the right.

See also

edit

Closely related templates: