Template:Infobox/doc: Difference between revisions
mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{dochead}}{{lua}} | |||
'''{{ARTICLEROOTPAGENAME}}''' is intended as a meta-template (i.e. a template intended mainly for constructing other templates). Although using [[Module:Infobox]] directly is the primary way to create infoboxes (such as those that automatically add entries), this template can be used standalone, such as with prototyping or making simple infoboxes. See [[:Category:Infoboxes]] to see all templates that generate infoboxes.{{clear}} | |||
=== Basic usage === | === Basic usage === | ||
Rows in an infobox can be added by adding parameters <code><nowiki>Header N</nowiki></code> and <code><nowiki>Row N</nowiki></code>. Up to 30 rows can be added, each with a separate header and data entry. | Rows in an infobox can be added by adding parameters <code><nowiki>Header N</nowiki></code> and <code><nowiki>Row N</nowiki></code>. Up to 30 rows can be added, each with a separate header and data entry. | ||
{{Infobox | {{Infobox | ||
|Title=3/2 | | Title=3/2 | ||
|Header 1 = Size in cents | | Header 1 = Size in cents | ||
|Data 1 = 701.9¢ | | Data 1 = 701.9¢ | ||
|Header 2 = Common name(s) | | Header 2 = Common name(s) | ||
|Data 2 = Just perfect 5th | | Data 2 = Just perfect 5th | ||
|Header 3 = Harmonic entropy | | Header 3 = Harmonic entropy | ||
|Data 3 = 3.42385 bits | | Data 3 = 3.42385 bits | ||
}} | }} | ||
<pre>{{Infobox | <pre>{{Infobox | ||
|Title=3/2 | | Title=3/2 | ||
|Header 1 = Size in cents | | Header 1 = Size in cents | ||
|Data 1 = 701.9¢ | | Data 1 = 701.9¢ | ||
|Header 2 = Common name(s) | | Header 2 = Common name(s) | ||
|Data 2 = Just perfect 5th | | Data 2 = Just perfect 5th | ||
|Header 3 = Harmonic entropy | | Header 3 = Harmonic entropy | ||
|Data 3 = 3.42385 bits | | Data 3 = 3.42385 bits | ||
}}</pre> | }}</pre> | ||
Line 26: | Line 28: | ||
=== Left and right links === | === Left and right links === | ||
Basic navigation can be added by including <code><nowiki>Left Link</nowiki></code> and <code><nowiki>Right Link</nowiki></code>. | |||
Note that links are ''not'' automatically formatted. | |||
{{Infobox | {{Infobox | ||
|Title=12edo | | Title=12edo | ||
|Header 1 = Size of fifth | | Header 1 = Size of fifth | ||
|Data 1 = 700¢ | | Data 1 = 700¢ | ||
|Header 2 = Size of step | | Header 2 = Size of step | ||
|Data 2 = 100¢ | | Data 2 = 100¢ | ||
|Left Link = ← 11edo | | Left Link = ← 11edo | ||
|Right Link = 13edo → | | Right Link = 13edo → | ||
}} | }} | ||
<pre>{{Infobox | <pre>{{Infobox | ||
|Title=12edo | | Title=12edo | ||
|Header 1 = Size of fifth | | Header 1 = Size of fifth | ||
|Data 1 = 700¢ | | Data 1 = 700¢ | ||
|Header 2 = Size of step | | Header 2 = Size of step | ||
|Data 2 = 100¢ | | Data 2 = 100¢ | ||
|Left Link = ← 11edo | | Left Link = ← 11edo | ||
|Right Link = 13edo → | | Right Link = 13edo → | ||
}}</pre> | }}</pre> | ||
Line 53: | Line 55: | ||
=== Omitting links === | === Omitting links === | ||
Links can be omitted, such as with border cases. | Links can be omitted, such as with border cases. | ||
{{Infobox | {{Infobox | ||
|Title=Prime Limit 2 | | Title=Prime Limit 2 | ||
|Right Link = 3-limit → | | Right Link = 3-limit → | ||
}} | }} | ||
<pre>{{Infobox | <pre>{{Infobox | ||
|Title=Prime Limit 2 | | Title=Prime Limit 2 | ||
|Right Link = 3-limit → | | Right Link = 3-limit → | ||
}}</pre> | }}</pre> | ||
Line 69: | Line 70: | ||
=== Upper and lower links === | === Upper and lower links === | ||
Additional navigation can be added by including any of the following: <code><nowiki>Upper Left Link</nowiki></code>, <code><nowiki>Upper Link</nowiki></code>, <code><nowiki>Upper Right Link</nowiki></code>, <code><nowiki>Lower Left Link</nowiki></code>, <code><nowiki>Lower Link</nowiki></code>, and <code><nowiki>Lower Right Link</nowiki></code>. As with the left and right links, links can be omitted. | Additional navigation can be added by including any of the following: <code><nowiki>Upper Left Link</nowiki></code>, <code><nowiki>Upper Link</nowiki></code>, <code><nowiki>Upper Right Link</nowiki></code>, <code><nowiki>Lower Left Link</nowiki></code>, <code><nowiki>Lower Link</nowiki></code>, and <code><nowiki>Lower Right Link</nowiki></code>. As with the left and right links, links can be omitted. | ||
{{Infobox | {{Infobox | ||
|Title=5L 2s | | Title=5L 2s | ||
|Header 1 = Generator | | Header 1 = Generator | ||
|Data 1 = 685.7¢ to 720¢ | | Data 1 = 685.7¢ to 720¢ | ||
|Header 2 = Basic tuning | | Header 2 = Basic tuning | ||
|Data 2 = 12edo (gen = 700¢) | | Data 2 = 12edo (gen = 700¢) | ||
|Left Link = ← 5L 1s | | Left Link = ← 5L 1s | ||
|Right Link = 5L 3s → | | Right Link = 5L 3s → | ||
|Upper Link = ↑ 4L 2s | | Upper Link = ↑ 4L 2s | ||
|Lower Link = ↓ 6L 2s | | Lower Link = ↓ 6L 2s | ||
}} | }} | ||
<pre>{{Infobox | <pre>{{Infobox | ||
|Title=5L 2s | | Title=5L 2s | ||
|Header 1 = Generator | | Header 1 = Generator | ||
|Data 1 = 685.7¢ to 720¢ | | Data 1 = 685.7¢ to 720¢ | ||
|Header 2 = Basic tuning | | Header 2 = Basic tuning | ||
|Data 2 = 12edo (gen = 700¢) | | Data 2 = 12edo (gen = 700¢) | ||
|Left Link = ← 5L 1s | | Left Link = ← 5L 1s | ||
|Right Link = 5L 3s → | | Right Link = 5L 3s → | ||
|Upper Link = ↑ 4L 2s | | Upper Link = ↑ 4L 2s | ||
|Lower Link = ↓ 6L 2s | | Lower Link = ↓ 6L 2s | ||
}}</pre> | }}</pre> | ||
Line 99: | Line 99: | ||
=== Headerless rows === | === Headerless rows === | ||
A row that only contains a <code><nowiki>Data N</nowiki></code> entry and no corresponding <code><nowiki>Header N</nowiki></code> is interpreted as a headerless row. This can be used as separators for grouping related information or for information that does not require a header, such as external links. | A row that only contains a <code><nowiki>Data N</nowiki></code> entry and no corresponding <code><nowiki>Header N</nowiki></code> is interpreted as a headerless row. This can be used as separators for grouping related information or for information that does not require a header, such as external links. | ||
{{Infobox | {{Infobox | ||
|Title=5L 2s | | Title=5L 2s | ||
|Data 1 = Generator information | | Data 1 = Generator information | ||
|Header 2 = Bright gen | | Header 2 = Bright gen | ||
|Data 2 = 685.7¢ to 720¢ | | Data 2 = 685.7¢ to 720¢ | ||
|Header 3 = Dark gen | | Header 3 = Dark gen | ||
|Data 3 = 480¢ to 514.3¢ | | Data 3 = 480¢ to 514.3¢ | ||
|Data 4 = Tunings | | Data 4 = Tunings | ||
|Header 5 = Hard tuning | | Header 5 = Hard tuning | ||
|Data 5 = 17edo (gen = 705.9¢) | | Data 5 = 17edo (gen = 705.9¢) | ||
|Header 6 = Basic tuning | | Header 6 = Basic tuning | ||
|Data 6 = 12edo (gen = 700¢) | | Data 6 = 12edo (gen = 700¢) | ||
|Header 7 = Soft tuning | | Header 7 = Soft tuning | ||
|Data 7 = 19edo (gen = 694.7¢) | | Data 7 = 19edo (gen = 694.7¢) | ||
|Data 30 = Listen on Xenpaper | | Data 30 = Listen on Xenpaper | ||
|Left Link = ← 5L 1s | | Left Link = ← 5L 1s | ||
|Right Link = 5L 3s → | | Right Link = 5L 3s → | ||
|Upper Link = ↑ 4L 2s | | Upper Link = ↑ 4L 2s | ||
|Lower Link = ↓ 6L 2s | | Lower Link = ↓ 6L 2s | ||
}} | }} | ||
<pre>{{Infobox | <pre>{{Infobox | ||
|Title=5L 2s | | Title=5L 2s | ||
|Data 1 = Generator information | | Data 1 = Generator information | ||
|Header 2 = Bright gen | | Header 2 = Bright gen | ||
|Data 2 = 685.7¢ to 720¢ | | Data 2 = 685.7¢ to 720¢ | ||
|Header 3 = Dark gen | | Header 3 = Dark gen | ||
|Data 3 = 480¢ to 514.3¢ | | Data 3 = 480¢ to 514.3¢ | ||
|Data 4 = Tunings | | Data 4 = Tunings | ||
|Header 5 = Hard tuning | | Header 5 = Hard tuning | ||
|Data 5 = 17edo (gen = 705.9¢) | | Data 5 = 17edo (gen = 705.9¢) | ||
|Header 6 = Basic tuning | | Header 6 = Basic tuning | ||
|Data 6 = 12edo (gen = 700¢) | | Data 6 = 12edo (gen = 700¢) | ||
|Header 7 = Soft tuning | | Header 7 = Soft tuning | ||
|Data 7 = 19edo (gen = 694.7¢) | | Data 7 = 19edo (gen = 694.7¢) | ||
|Data 30 = Listen on Xenpaper | | Data 30 = Listen on Xenpaper | ||
|Left Link = ← 5L 1s | | Left Link = ← 5L 1s | ||
|Right Link = 5L 3s → | | Right Link = 5L 3s → | ||
|Upper Link = ↑ 4L 2s | | Upper Link = ↑ 4L 2s | ||
|Lower Link = ↓ 6L 2s | | Lower Link = ↓ 6L 2s | ||
}}</pre>{{clear}} | |||
{{ | |||
=== Advanced use === | === Advanced use === | ||
{{todo|inline=1| work-in-progress }} | |||
Latest revision as of 18:07, 18 March 2025
![]() |
This template uses Lua: |
Template:Infobox is intended as a meta-template (i.e. a template intended mainly for constructing other templates). Although using Module:Infobox directly is the primary way to create infoboxes (such as those that automatically add entries), this template can be used standalone, such as with prototyping or making simple infoboxes. See Category:Infoboxes to see all templates that generate infoboxes.
Basic usage
Rows in an infobox can be added by adding parameters Header N
and Row N
. Up to 30 rows can be added, each with a separate header and data entry.
Size in cents | 701.9¢ |
Common name(s) | Just perfect 5th |
Harmonic entropy | 3.42385 bits |
{{Infobox | Title=3/2 | Header 1 = Size in cents | Data 1 = 701.9¢ | Header 2 = Common name(s) | Data 2 = Just perfect 5th | Header 3 = Harmonic entropy | Data 3 = 3.42385 bits }}
Left and right links
Basic navigation can be added by including Left Link
and Right Link
.
Note that links are not automatically formatted.
← 11edo | 12edo | 13edo → |
{{Infobox | Title=12edo | Header 1 = Size of fifth | Data 1 = 700¢ | Header 2 = Size of step | Data 2 = 100¢ | Left Link = ← 11edo | Right Link = 13edo → }}
Omitting links
Links can be omitted, such as with border cases.
Prime Limit 2 | 3-limit → |
{{Infobox | Title=Prime Limit 2 | Right Link = 3-limit → }}
Upper and lower links
Additional navigation can be added by including any of the following: Upper Left Link
, Upper Link
, Upper Right Link
, Lower Left Link
, Lower Link
, and Lower Right Link
. As with the left and right links, links can be omitted.
↑ 4L 2s | ||
← 5L 1s | 5L 2s | 5L 3s → |
↓ 6L 2s |
{{Infobox | Title=5L 2s | Header 1 = Generator | Data 1 = 685.7¢ to 720¢ | Header 2 = Basic tuning | Data 2 = 12edo (gen = 700¢) | Left Link = ← 5L 1s | Right Link = 5L 3s → | Upper Link = ↑ 4L 2s | Lower Link = ↓ 6L 2s }}
Headerless rows
A row that only contains a Data N
entry and no corresponding Header N
is interpreted as a headerless row. This can be used as separators for grouping related information or for information that does not require a header, such as external links.
↑ 4L 2s | ||
← 5L 1s | 5L 2s | 5L 3s → |
↓ 6L 2s |
{{Infobox | Title=5L 2s | Data 1 = Generator information | Header 2 = Bright gen | Data 2 = 685.7¢ to 720¢ | Header 3 = Dark gen | Data 3 = 480¢ to 514.3¢ | Data 4 = Tunings | Header 5 = Hard tuning | Data 5 = 17edo (gen = 705.9¢) | Header 6 = Basic tuning | Data 6 = 12edo (gen = 700¢) | Header 7 = Soft tuning | Data 7 = 19edo (gen = 694.7¢) | Data 30 = Listen on Xenpaper | Left Link = ← 5L 1s | Right Link = 5L 3s → | Upper Link = ↑ 4L 2s | Lower Link = ↓ 6L 2s }}