Template:Infobox element/doc
This is a documentation subpage for
Template documentation[edit]
Template sandbox and testcases for TEMPLATE_NAME[edit]Overview[edit]This page provides a clean workflow to safely edit and validate TEMPLATE_NAME:
Use this page to:
Quick links[edit]
How to test[edit]1. Edit the sandbox at Template:TEMPLATE_NAME/sandbox. 2. Open this test page and click “Show preview” to render the sandbox with inputs below. 3. Verify each testcase: Does the “Actual output” match the “Expected output”? 4. If all pass, consider copying sandbox to live using an edit summary like: “Sync from /sandbox: passes all /testcases as of YYYY-MM-DD.” Previewing tips[edit]
Test harness[edit]The following sections render the sandbox template against curated inputs. Each testcase shows:
Testcase A: Minimal invocation[edit]Parameters: {{TEMPLATE_NAME}} Expected output: [Minimal successful output with defaults: e.g., a neutral message or basic box] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase B: Common parameters[edit]Parameters: {{TEMPLATE_NAME | param1 = Alpha | param2 = Beta | flag = yes }} Expected output: [Example: shows "Alpha" and "Beta" in designated slots; flag toggles enhanced styling] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase C: Edge values and escaping[edit]Parameters: {{TEMPLATE_NAME | param1 = [[Linked target|Visible text]] | param2 = {{subst:CURRENTTIMESTAMP}} | raw = <code><span class="x">escaped</span></code> }} Expected output: [Links render correctly; timestamp subst is literal in expected; raw shows escaped markup] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase D: Internationalization (i18n)[edit]Parameters: {{TEMPLATE_NAME | lang = ja | text = こんにちは世界 }} Expected output: [Text displays correctly for non-ASCII; applies lang attribute or rtl/ltr where applicable] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase E: Error handling[edit]Parameters: {{TEMPLATE_NAME | param1 = | required = <!-- intentionally omitted --> }} Expected output: [Shows a gentle error or maintenance category; does not break page layout] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Maintenance[edit]
Categories[edit]Copy-paste skeletons[edit]Below are ready-to-use skeletons for the sandbox and testcases subpages. Skeleton: Template:TEMPLATE_NAME/sandbox[edit]<!-- Sandbox for TEMPLATE_NAME --> <!-- Copy the entire template source here; edit safely. --> {{#if:{{{required|}}} | <!-- normal output --> <div class="tmpl"> <b>{{{param1|}}}</b> · <i>{{{param2|}}}</i> {{#if:{{{flag|}}}|<span class="flag">✓</span>|}} {{#if:{{{raw|}}}|<span class="raw">{{{raw}}}</span>|}} </div> | <!-- error / missing required --> <span class="error">TEMPLATE_NAME: missing required parameter</span> [[Category:Pages with TEMPLATE_NAME errors]] }} Skeleton: Template:TEMPLATE_NAME/testcases[edit]<!-- Testcases for TEMPLATE_NAME; render against /sandbox --> ; Minimal : {{TEMPLATE_NAME/sandbox}} ; Common params : {{TEMPLATE_NAME/sandbox | param1 = Alpha | param2 = Beta | flag = yes }} ; Edge and escaping : {{TEMPLATE_NAME/sandbox | param1 = [[Linked target|Visible text]] | param2 = 20250101T000000Z | raw = <code><span class="x">escaped</span></code> }} ; I18n : {{TEMPLATE_NAME/sandbox | lang = ja | text = こんにちは世界 }} ; Error handling : {{TEMPLATE_NAME/sandbox | required = }} Review checklist[edit]
Template:Terminate sentence ensures a sentence ends with a specified terminator (default: a period). It avoids adding duplicate terminators and can optionally trim trailing spaces. It attempts to ignore trailing closing quotes or brackets when deciding whether a terminator is already present. Usage[edit]Basic: {{Terminate sentence|This is a sentence}}
→ This is a sentence.
Named parameters: {{Terminate sentence
|text=He said "Hello"
|term=.
}}
→ He said "Hello".
Custom terminator: {{Terminate sentence|text=Warning|term=!}}
→ Warning!
Avoid duplicate terminator: {{Terminate sentence|text=Already done.|term=.}}
→ Already done.
Trim trailing spaces: {{Terminate sentence|text=Ends with space |trim=yes}}
→ Ends with space.
Skip processing: {{Terminate sentence|text=No changes here|skip=yes}}
→ No changes here
Append a note: {{Terminate sentence|text=Complete|note=(source: 2025)}}
→ Complete. (source: 2025)
Parameters[edit]
Behavior details[edit]
Examples[edit]
{{Terminate sentence|text=He whispered "hush"|term=.}}
→ He whispered "hush".
{{Terminate sentence|text=Complete (verified)|term=.}}
→ Complete (verified).
{{Terminate sentence|text=Alert|term=!}}
→ Alert!
{{Terminate sentence|text=Wait...|term=.|allowdup=yes}}
→ Wait.... Best practices[edit]
Lua-powered variant (optional)[edit]For more robust detection (including multilingual quotes and punctuation), create -- Module:TerminateUtil
local M = {}
local closing = {
[")"] = true, ["]"] = true, ["}"] = true,
['"'] = true, ["'"] = true, ["”"] = true, ["’"] = true, ["»"] = true, ["›"] = true
}
local function trimRight(s)
return (s:gsub("%s+$",""))
end
function M.lastVisibleChar(args)
local s = args.s or ""
s = trimRight(s)
local i = #s
while i > 0 do
local c = s:sub(i,i)
if closing[c] then
i = i - 1
else
return c
end
end
return ""
end
return M
Then update the template to call: {{#invoke:TerminateUtil|lastVisibleChar|s=text}}
This improves detection for closing quotes and brackets. See also[edit]It may contain usage information, categories and other content that is not part of the original template page. |
Atomic number 119 and above
[edit]When the atomic number is >=119, the miniature periodic table shows an extended version (group 8). See for example {{infobox ununennium}}.
Hydrogen example
[edit]
| |||||||||||||||
| Appearance | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 无色气体 等离子态的氢发出的紫色光 | |||||||||||||||
| General properties | |||||||||||||||
| Name, symbol, number | 氢, Lua error in Module:Wd at line 2519: The function "p246" does not exist.
| ||||||||||||||
| Element category | 非金属 | ||||||||||||||
| Group, period, block | 1, 1, s | ||||||||||||||
| Standard atomic weight | 1.00794(7) g·mol−1 | ||||||||||||||
| Electron configuration | 1s1 | ||||||||||||||
| Electrons per shell | 1 (Image) | ||||||||||||||
| Physical properties | |||||||||||||||
| Color | 无色 | ||||||||||||||
| Phase | 气体 | ||||||||||||||
| Density | (0 °C, 101.325 kPa) 0.08988 g/L | ||||||||||||||
| Melting point | 14.01 K, -259.14 °C, -434.45 °F | ||||||||||||||
| Boiling point | 20.28 K, -252.87 °C, -423.17 °F | ||||||||||||||
| Triple point | 13.8033 K (-259°C), 7.042 kPa | ||||||||||||||
| Critical point | 32.97 K, 1.293 MPa | ||||||||||||||
| Heat of fusion | (H2) 0.117 kJ·mol−1 | ||||||||||||||
| Heat of vaporization | (H2) 0.904 kJ·mol−1 | ||||||||||||||
| Specific heat capacity | (25 °C) (H2) 28.836 J·mol−1·K−1 | ||||||||||||||
| Vapor pressure | |||||||||||||||
| |||||||||||||||
| Atomic properties | |||||||||||||||
| Oxidation states | 1, -1 (两性) | ||||||||||||||
| Electronegativity | 2.20 (Pauling scale) | ||||||||||||||
| Ionization energies | 1st: 1312.0 kJ·mol−1 | ||||||||||||||
| Covalent radius | 31±5 pm | ||||||||||||||
| Van der Waals radius | 120 pm | ||||||||||||||
| Miscellanea | |||||||||||||||
| Crystal structure | 六方晶系 | ||||||||||||||
| Magnetic ordering | 抗磁性 | ||||||||||||||
| Thermal conductivity | (300 K) 0.1805 W·m−1·K−1 | ||||||||||||||
| Speed of sound | (gas, 27 °C) 1310 m/s | ||||||||||||||
| CAS registry number | 1333-74-0 | ||||||||||||||
| Most stable isotopes | |||||||||||||||
| Main article: Isotopes of 氢 | |||||||||||||||
| |||||||||||||||
Bare parameters
[edit]{{infobox element
<!-- HEADER and id's -->
|name=
|number=
|symbol=
<!-- PERIODIC TABLE -->
|left=
|right=
|above=
|below=
<!-- APPEARANCE -->
|appearance=
|image name=
|image size=
|image alt=
|image name comment=
|image name 2=
|image size 2=
|image alt 2=
|image name 2 comment=
<!-- GENERAL -->
|pronounce=
|series=
|series comment=
|series color=
|group=
|period=
|block=
|atomic mass=
|atomic mass 2=
|atomic mass comment=
|electron configuration=
|electrons per shell=
<!-- PHYSICAL PROPERTIES -->
|physical properties=
|color=
|phase=
|phase comment=
|phase color=
|density gplstp=
|density gpcm3nrt=
|density gpcm3nrt 2=
|density gpcm3nrt 3=
|density gpcm3mp=
|melting point K=
|melting point C=
|melting point F=
|melting point pressure=
|sublimation point K=
|sublimation point C=
|sublimation point F=
|sublimation point pressure=
|boiling point K=
|boiling point C=
|boiling point F=
|boiling point pressure=
|triple point K=
|triple point kPa=
|triple point K 2=
|triple point kPa 2=
|critical point K=
|critical point MPa=
|heat fusion=
|heat fusion 2=
|heat fusion pressure=
|heat vaporization=
|heat vaporization pressure=
|heat capacity=
|heat capacity pressure=
|vapor pressure 1=
|vapor pressure 10=
|vapor pressure 100=
|vapor pressure 1 k=
|vapor pressure 10 k=
|vapor pressure 100 k=
|vapor pressure comment=
|atomic properties=
|oxidation states=
|oxidation states comment=
|electronegativity=
|number of ionization energies=
|1st ionization energy=
|2nd ionization energy=
|3rd ionization energy=
|atomic radius=
|atomic radius calculated=
|covalent radius=
|Van der Waals radius=
<!-- MISCELLANEA -->
|crystal structure=
|crystal structure ref=
|crystal structure comment=
|crystal structure2=
|crystal structure ref2=
|crystal structure comment2=
|magnetic ordering=
|electrical resistivity=
|electrical resistivity at 0=
|electrical resistivity at 20=
|thermal conductivity=
|thermal conductivity 2=
|thermal diffusivity=
|thermal expansion=
|thermal expansion at 25=
|speed of sound=
|speed of sound rod at 20=
|speed of sound rod at r.t.=
|Tensile strength=
|Young's modulus=
|Shear modulus=
|Bulk modulus=
|Poisson ratio=
|Mohs hardness=
|Vickers hardness=
|Brinell hardness=
|CAS number=
<!-- ISOTOPES -->
|isotopes=
|isotopes comment=
<!-- WP:ENGVAR (currently used for P only) -->
|engvar=
<!-- HISTORY -->
|predicted by=
|prediction date=
|discovered by=
|discovery date=
|first isolation by=
|first isolation date=
|named by=
|named date=
|history comment label=
|history comment=
}}
Subtemplates used
[edit]Note: {{Elementbox}} is an earlier name for {{infobox element}}.
Headers:
Periodic table graph:
Crystal structure:
Isotopes:
Language and pronouciation:
{{engvar}}{{IPAc-en}}{{IPAc-en/pronunciation}}{{respell}}
Template tecnical:
{{main other}}{{template other}}{{!}}
See also
[edit]Template:Index to chemical element infoboxes Template:Periodic table templates