Jump to content

Template:TEMPLATE NAME/doc

Unchecked
From Wikipedia


Purpose

[edit]

{{TEMPLATE NAME}} is a lightweight infobox for small articles (e.g., months, people, places). It floats to the right, shows a title, optional image with caption, a short summary, key attributes, and a "See also" list.

Usage

[edit]

Place the template at the very top of an article: {{TEMPLATE NAME | title = March | image = Wenceslas Hollar - The Greek gods. Mars.jpg | caption = The Roman war god Mars | summary = March is the third month of the year with 31 days, named after Mars. | attr1 = Flower: Jonquil | attr2 = Birthstone: Bloodstone (meaning: Courage) | attr3 = Zodiac: Pisces → Aries | see_also = March (music), Roman calendar | category = Months }}

Parameters

[edit]
  • title — optional; defaults to TEMPLATE NAME/doc.
  • image — file name only (e.g., Example.jpg).
  • caption — optional image caption.
  • summary — a short lead summary sentence/paragraph.
  • attr1, attr2, attr3 — any key attributes you want to list.
  • see_also — comma-separated links (displayed as bullets).
  • category — adds the page to this category.

Including mathematics

[edit]

Use the Failed to parse (syntax error): {\displaystyle …} tag for inline mathematics inside the template parameters or the article text. For example:

  • Minimal expression:
  • With result:
  • Inline in a sentence: The sum is .

Common pitfalls

[edit]
  • Do not use HTML entities inside , not Failed to parse (syntax error): {\displaystyle x > 0} .
  • Do not include display-style commands like {\displaystyle …}; Failed to parse (syntax error): {\displaystyle …} handles appropriate rendering automatically.
  • Keep long formulas on their own line to improve readability.

Examples

[edit]

Below are short, practical examples you can copy and adapt.

Infobox with a mathematical attribute {{TEMPLATE NAME | title = Simple sum | summary = A tiny page demonstrating an inline math expression in the lead. | attr1 = Sum: <math>3 + 2 = 5</math> | attr2 = Inequality example: <math>x > 0</math> | attr3 = Fraction: <math>\tfrac{1}{3}</math> }}

Article text snippet The result of the simple addition is . For comparison, a product may be written as , and a fraction as .

Troubleshooting

[edit]
  • If you see “parse error” messages, check for stray HTML entities (&gt;, &lt;, &ne;) or residual style commands.
  • Ensure math expressions are inside Failed to parse (syntax error): {\displaystyle …} . Example: write instead of plain text “a ≠ 1” when formatting consistency matters.

See also

[edit]