Module:Build bracket/doc: Difference between revisions

Content deleted Content added
 
(134 intermediate revisions by 7 users not shown)
Line 1:
{{#switch:{{NAMESPACE}}
== Description ==
| Module =
This template is intended to be used to create and edit intricate sports brackets that cannot be made by [[Module:RoundN]] or [[Module:Team bracket]]. For example, additional headers (for double-elimination brackets; 3rd-, 5th-, 7th-place matches; etc), singular omitted matches (i.e., having a horizonal line instead of a match), and ''N''-way brackets (''N'' teams per match). The syntax is slightly more complicated than the aforementioned brackets, but simpler than using the standard wikitable code.
{{high-use|| Wikipedia talk:High-risk templates}}
{{Module rating|release}}
 
This module is intended to be used to create and edit intricate sports brackets that cannot be made by [[Module:RoundN]] or [[Module:Team bracket]]. For example, additional headers (for double-elimination brackets; 3rd-, 5th-, 7th-place matches; etc), singular omitted matches (i.e., having a horizonal line instead of a match), and ''N''-way brackets (''N'' teams per match). The syntax is slightly more complicated than the aforementioned brackets, but simpler than using the standard wikitable code.
The template breaks down the brackets into rows and columns.
| #default =
{{lua|Module:Build bracket}}
}}
 
== Bracket builderUsage ==
{{#switch:{{NAMESPACE}}
<pre>
| Module =
<pre style="overflow:auto">
{{#invoke:Build bracket|main
| rounds =
| rows =
 
| col1-headers =
<!--Column 1 -->
| 0col1-1 matches =
 
| 1-1 =
| 2col2-1 headers =
| 3col2-1 matches =
...
 
<!--Column 1.5 -->
| 0-1a =
| 1-1a =
| 2-1a =
| 3-1a =
...
 
| col1-col2-paths =
<!--Column 2 -->
| 0col2-2 col3-paths =
 
| 1-2 =
| 2-2 =
| 3-2 =
...
 
}}
</pre>
| #default = {{#tag:syntaxhighlight|
 
{{((}}{{BASEPAGENAME}}<nowiki>
{| border=1 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;" style="text-align:center"
| RD1 =
|-
| RD1-seed1 =
| &nbsp; || <code>0-1</code> || || <code>0-2</code> || || <code>0-3</code> || …
| RD1-team1 =
|-
| RD1-score1 =
| width=5 | &nbsp;
...</nowiki>
| width=175 | &nbsp;
{{))}}|lang="wikitext"}}
| width=45 | &nbsp;
Per [[MOS:ACCESS#Font size]] and [[MOS:SMALLFONT]], "avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and reference sections". Since this template's text is already reduced to 90% of the normal size, use of the {{tl|Small}} template or {{tag|small}} tags within this template produces a font size that is 77% of the page default, well below the 85% minimum specified in the linked guidelines.
| width=175 | &nbsp;
}}
| width=45 | &nbsp;
| width=175 | &nbsp;
| width=45 | …
|-
| &nbsp; || <code>1-1</code> || <code>1-1a</code> || <code>1-2</code> || <code>1-2a</code> || <code>1-3</code> || …
|-
| &nbsp; || <code>2-1</code> || <code>2-1a</code> || <code>2-2</code> || <code>2-2a</code> || <code>2-3</code> || …
|-
| &nbsp; || <code>3-1</code> || <code>3-1a</code> || <code>3-2</code> || <code>3-2a</code> || <code>3-3</code> || …
|-
| &nbsp; || ⋮ || ⋮ || ⋮ || ⋮ || ⋮ || ⋱
|}
 
'''Note:''' Borders are not actually present. They are only here to help visualization.
 
=== Parameters ===
{| class="wikitable"
|-
! Parameter !! Description !! Default
|-
{{#switch:{{NAMESPACE}}
| <code>rounds</code> || number of rounds (columns).
| Module =
{{!}} <code>rounds</code> {{!!}} number of rounds (columns). {{!!}} <code>1</code>
{{!-}}
{{!}} <code>autocol</code> {{!!}} set to <code>yes</code> to automatically set set maximum round to display based on entries. {{!!}} <code>no</code>
{{!-}}
{{!}} <code>rows</code> {{!!}} manually set the number of rows. {{!!}} Automatic
{{!-}}
{{!}} <code>teams-per-match</code> {{!!}} enter the number of teams in each match. Use <code>col<i>m</i>-teams-per-match</code> to set individual columns {{!!}} <code>2</code>
{{!-}}
{{!}} <code>col<i>m</i>-headers</code> {{!!}} (optional) enter the row numbers where headers are desired in column ''m''. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}} Automatic
{{!-}}
{{!}} <code>col<i>m</i>-matches</code> {{!!}} enter the row numbers where a match is desired in column ''m''. Matches take up two rows by default. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}}
{{!-}}
{{!}} <code>col<i>m</i>-text</code> {{!!}} enter the row numbers where additional text is desired in column ''m''. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}}
{{!-}}
{{!}} <code>col<i>m</i>-col<i>m</i>+1-paths</code> {{!!}} enter the starting and ending row numbers, separated by <code>-</code>, from columns ''m'' and ''m''+1 where a path is desired. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}}
{{!-}}
{{!}} <code>col<i>m</i>-col<i>m</i>+1-cross</code> {{!!}} enter the row number where paths intersect from column ''m'' to ''m''+1. {{!!}}
<!--
{{!-}}
{{!}} <code>compact</code> {{!!}} set to <code>yes</code> to vertically condense the bracket. {{!!}} <code>no</code>
-->
{{!-}}
{{!}} <code>RD<i>m</i>-altname</code> {{!!}} Alternate name for <code>RD<i>m</i></code> (e.g., if {{para|RD1-altname|first}}, then <code>first-team1</code> can be used instead of <code>RD1-team1</code>). Use <code>RD<i>mh</i>-altname</code> for cells under header ''mh''. {{!!}}
{{!-}}
{{!}} <code>text-altname</code> {{!!}} Alternate name for <code>RD<i>m</i>-text<i>k</i></code> (e.g., if {{para|text-altname|details}}, then <code>RD<i>m</i>-details1</code> can be used instead of <code>RD<i>m</i>-text1</code>). {{!!}}
{{!-}}
{{!}} colspan=3 {{!}}
}}
|-
| <code>maxround</code> || final round to display. This parameter should be omitted unless it is less than the default value set by <code>rounds</code>. ||
| <code>rows</code> || number of rows.
|-
| <code>minround</code> || first round to display. || <code>1</code>
| colspan=2 |
|-
| <code><i>n</i>-<i>m</i>height</code> || Entrythe amount of vertical visibility desired for rowthe ''n''bracket. Creates a columnvertical ''m''scroll bar. ValidEnter a number entrieswith are<code>header</code>units (e.g., <code>team30em</code>, or <code>text480px</code>). Note: {{para|0-m}}| will only accept <code>header</code> for all ''m''.
|-
| <code><i>n</i>col-<i>m</i>aspacing</code> || Thethe lineamount pathof codehorizontal directlyspace afterbetween ''n''rounds. columnEnter ''m''.as Seea belowplain number (e.g., <code>10</code> for details10px). || <code>5</code>
|-
| <code>seed-width</code> || the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., <code>25</code> for 25px or <code>2em</code> for 2em) || <code>25</code>
| colspan=2 |
|-
| <code>team-width</code> || the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., <code>200</code> for 200px or <code>15em</code> for 15em) || <code>150</code>
| <code>RD<i>m</i></code><br /><code>RD<i>m</i>-<i>k</i></code> || The header text of the (''k''th) header in round ''m''.
|-
| <code>score-width</code> || the width of the cells for scores. Plain numbers are assumed to be in px units (e.g., <code>25</code> for 25px or <code>2em</code> for 2em) || <code>25</code>
| <code>RD<i>m</i>-seed<i>k</i></code> || The seed of the ''k''th team in round ''m''.
|-
| <code>agg-width</code> || the width of the cells for aggregate scores. <code>score-width</code> will change aggregate score widths unless this parameter is used. Plain numbers are assumed to be in px units (e.g., <code>25</code> for 25px or <code>2em</code> for 2em) || <code>25</code>
| <code>RD<i>m</i>-team<i>k</i></code> || The name of the ''k''th team in round ''m''.
|-
| <code>RD<i>mseeds</icode>-score || set to <i>k</icode>no</code><br />to omit seeds in in all matches. set to <code>RD<i>m</i>-score<i>k</i>-<i>l</i>yes</code> ||to Theshow scoreseed ofcells (theto ''l''thshow legfor of)all thematches. ''k''th|| team in round ''m''.
|-
| <code>legs</code> || the number of legs for all rounds. Use <code>RD<i>m</i>-legs</code> to individually set columns. Use <code>RD<i>m</i>-legs<i>k</i></code> to individually set teams. || <code>1</code>
| <code>RD<i>m</i>-text<i>k</i></code> || The text of the ''k''th text entry in round ''m''.
|-
| <code>autolegs</code> || set to <code>yes</code> to automatically generate score cells per team. If <code>legs</code> or <code>RD<i>m</i>-legs</code> is used, <code>autolegs</code> will be set to <code>no</code> .|| <code>no</code>
| colspan=2 |
|-
| <code>byes</code> || set to <code>yes</code> to hide any team cells that are empty. Alternatively, set to <code>m</code> to have rounds <code>1</code> through <code>m</code> hide any team cells that are empty. Use <code>RD<i>m</i>-byes</code> for just matches under column ''m''. Use <code>RD<i>mh</i>-byes</code> for just matches under header ''h'' only in column ''m''. || <code>no</code>
| <code>seed-width</code> || the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., <code>25</code> or 25px <code>2em</code> for 2em)
|-
| <code>RD<i>m</i>-hide</code> || set to <code>yes</code> to hide the all matches in columns ''m'' unless any of those entries are non empty. Use <code>RD<i>mh</i>-byes</code> to hide the (alpha) ''h''th header and all matches beneath it in column ''m''. Useful for consolation matches. {{!!}}
| <code>team-width</code> || the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., <code>200</code> for 200px or <code>15em</code> for 15em)
|-
| <code>scoreshow-widthbye-paths</code> || theset widthto of<code>yes</code> theto cellsreplace forany scores.team Plaincells numbersthat that are assumed to be in px units (e.g.,hidden <code>25byes</code> orwith 25pxa path. || <code>2emno</code> for 2em)
<!--
|-
| <code>RD<i>m</i>-score<i>k</i>-shade</code><br /><code>RD<i>m</i>-score<i>k</i>-<i>l</i>-shade</code> || the background color (in hex format, e.g. <code>#ABCDEF</code>) the (''l''th leg of) ''k''th team's score column ''m''.
| <code>seeds</code> || set to <code>no</code> to omit seeds in all rounds.
-->
|-
| <code>aggregate</code> || Set to <code>sets</code> or <code>legs</code> to sum the sets/legs won and append to the end of the scores. Set to <code>score</code> to sum the scores from each set/leg and append to the end of the scores. Set to <code>y</code> or <code>yes</code> to enable the <code>-agg</code> suffix, but without any auto computation. Only works when there are two or more legs/sets in the round. Any automatically computed value can be overridden by setting the value manually with the <code>-agg</code> suffix for the score. || <code>no</code>
| <code>legs</code> || the number of legs for all rounds.
|-
| <code>boldwinner</code> || set to <code>high</code> to automatically bold the seed/team/score with the higher score in each match. Set to <code>low</code> for the lowest score. Set to <code>aggregate</code> to only bold the higher aggregate score. Set to <code>aggregate-low</code> to only bold the lower aggregate score. || <code>no</code>
| <code>RD<i>m</i>-legs</code> || the number of legs in round ''m''. Overrides {{para|legs}}.
|-
| <code>RD-shadeshift</code> || thevertically backgroundshifts colorall (inof hexthe format,entries e.gby the number entered. Use <code>#ABCDEFRD<i>m</i>-shift</code>) offor allindividual headersin columns. || <code>0</code>
|-
| colspan=3 |
| <code>RD<i>m</i>-shade</code><br /><code>RD<i>m</i>-<i>k</i>-shade</code> || the background color (in hex format, e.g. <code>#ABCDEF</code>) of the (''k''th) header in round ''m''. Overrides {{para|RD-shade}}.
|-
| <code>RD<i>m</i>-score<i>k</i>-shade</code><br, /><code>RD<i>mmh</i>-score<i>k</i>-<i>l</i>-shade</code> || theThe backgroundheader colortext of the (alpha ''h''th) header in hexcolumn format,''m'' (e.g., <code>#ABCDEFRD1</code>) or <code>RD1a</code> for the (''l''thfirst legheader of)and ''k''th<code>RD1b</code> team'sfor scorethe roundsecond ''m''header in column 1). ||
|}
 
=== Path codes ===
{| class="wikitable"
|-
! Input !! Output !! Notes
|-
|<code>out</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| width=5 style="border-width:0 0 1px 0; border-style:solid;border-color:black;" | &nbsp; || &nbsp;
|-
| <code>RD<i>m</i>-seed<i>k</i></code> || The seed of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-seed<i>k</i></code> for the ''k''th team under header ''mh''. ||
| width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp; || &nbsp;
{{!)}}
| rowspan="4" | Paths connect between two cells, e.g.:
{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| <code>RD<i>m</i>-team<i>k</i></code> || The name of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-team<i>k</i></code> for the ''k''th team under header ''mh''. ||
| width=25 style="text-align:center;background-color:#f2f2f2;border:1px solid #aaa;" | &nbsp;
| width=125 style="border:1px solid #aaa;background-color:#f9f9f9;padding-left:0.3em;" | &nbsp;
| width=25 style="text-align:center;border:1px solid #aaa;background-color:#f9f9f9;" | &nbsp;
| width=10 style="border-width:0 0 1px 0; border-style:solid;border-color:black;" | &nbsp;
|-
| <code>RD<i>m</i>-score<i>k</i></code> || The score of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-score<i>k</i></code> for the ''k''th team under header ''mh''. Append the suffix <code>-<i>l</i></code> for the ''l''th leg or <code>-agg</code> for the aggregate score. ||
| width=25 style="text-align:center;background-color:#f2f2f2;border:1px solid #aaa;" | &nbsp;
| width=125 style="border:1px solid #aaa;background-color:#f9f9f9;padding-left:0.3em;" | &nbsp;
| width=25 style="text-align:center;border:1px solid #aaa;background-color:#f9f9f9;" | &nbsp;
| width=10 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp;
{{!)}}
|-
| <code>RD<i>m</i>-text<i>k</i></code> || The text above the ''k''th match in column ''m''. Alternatively, use <code>RD<i>mh</i>-text<i>k</i></code> for the ''k''th match under header ''mh''. ||
|<code>in</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| <code>RD<i>m</i>-group<i>k</i></code> || The text for the ''k''th group in column ''m''. Group text will appear to the left of whenever two paths meet. ||
| width=5 | &nbsp; || width=5 style="border-width:0 0 1px 0; border-style:solid;border-color:black;" | &nbsp;
|-
| <code>RD-shade</code> || the background color (in hex format, e.g. <code>#ABCDEF</code>) of all headers. Use <code>RD<i>m</i>-shade</code> or <code>RD<i>mh</i>-shade</code> for individual headers. || <code>#F2F2F2</code>
| width=5 | &nbsp; || width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp;
{{!)}}
|-
| <code>RD<i>m</i>-RD(<i>m</i>+1)-path</code>{{efn|name=note1}} || set to <code>no</code> or <code>0</code> to omit the paths from round ''m'' to round ''m''+1. || <code>yes</code>
|<code>up</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| <code>paramstyle</code>{{efn|name=note2}} || set to <code>numbered</code> change the parameter name style of <code>RD<i>m</i>-text<i>k</i></code>, <code>RD<i>m</i>-seed<i>k</i></code>, <code>RD<i>m</i>-team<i>k</i></code>, and <code>RD<i>m</i>-score<i>k</i></code> to a numbered notation ({{para|1}},{{para|2}}...). Set {{para|seeds|yes}} add seeds. ||
| width=5 style="border-width:0 1px 0 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:0 0 0 1px; border-style:solid;border-color:black;" | &nbsp;
|-}
{{notelist|refs=
| width=5 | &nbsp; || width=5 | &nbsp;
{{efn|name=note1|Does not currently work for paths under subheaders.}}
{{!)}}
{{efn|name=note2|<code>numbered</code> may not be compatible with certain other features, e.g. groups.}}
|-
}}
|<code>down</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| width=5 | &nbsp; || width=5 | &nbsp;
|-
| width=5 style="border-width:0 1px 0 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:0 0 0 1px; border-style:solid;border-color:black;" | &nbsp;
{{!)}}
|-
| colspan="3" |
|-
|<code>out split</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| width=5 style="border-width:0 0 1px 0; border-style:solid;border-color:black;" | &nbsp; || &nbsp;
|-
| width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp; || &nbsp;
{{!)}}
| rowspan="4" | Paths connect in the middle of a cell, e.g.:
 
=== Parameter hierarchy ===
{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
*Whenever there are multiple headers in a single column, more than one parameter may be assigned to a cell value. For example, in the following bracket, both {{para|RD1-team3}} and {{para|RD1b-team1}} can be used to assign the third team in the first column. By default, entries with subheader prefixes will override those without. In the below example, <code>RD1b-team1</code> will override any value that has been set by <code>RD1-team3</code>.
|-
{{#invoke:Build bracket|main
| width=25 style="text-align:center;background-color:#f2f2f2;border:1px solid #aaa;" | &nbsp;
| rounds = 1
| width=125 style="border:1px solid #aaa;background-color:#f9f9f9;padding-left:0.3em;" | &nbsp;
| col1-headers = 1,6
| width=25 style="text-align:center;border:1px solid #aaa;background-color:#f9f9f9;" | &nbsp;
| col1-matches = 3,8
| colspan="2" | {{(!}} border=0 cellpadding=0 cellspacing=0
| RD1 = Upper round
{{!-}}
| RD1b = Lower round
| style="border-width:0 0 1px 0; border-style:solid;border-color:black; font-size:50%;" | &#8195; || style="border-width:0 0 1px 0; border-style:solid;border-color:black; font-size:50%;" | &#8195;
| RD1-team3 = <code>RD1-team3</code> or <code>RD1b-team1</code>
{{!-}}
}}
| style="border-width:1px 0 0 0; border-style:solid;border-color:black; font-size:50%;" | &#8195; || style="border-width:1px 0 0 0; border-style:solid;border-color:black; font-size:50%;" | &#8195;
 
{{!)}}
*Parameters used in articles take precedence over parameters used in the template itself. For example, suppose ArticleX used the template NTeamBracket, and suppose NTeamBracket had the parameter {{para|RD1-seed1|1}} set. If ArticleX implemented <code><nowiki>{{NTeamBracket|RD1-seed1=2}}</nowiki></code>, then the first team in round 1 would have a seed of 2.
{{!)}}
 
|-
{{#switch:{{NAMESPACE}}
|<code>in split</code>
| Module =
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
=== Path codes ===
|-
Path codes are entered in the form <code>a-b</code>, where <code>a</code> is associated match in the first column, and <code>b</code> is associated match in the second column. Path codes can be grouped; for example, <code>(a,b)-c</code> is equivalent to <code>a-c, b-c</code>. To add color, append <code>:''color''</code> to the end of a path, e.g. <code>3-5:red</code>. Only one extra color can be used in a bracket.
| width=5 | &nbsp; || width=5 style="border-width:0 0 1px 0; border-style:solid;border-color:black;" | &nbsp;
{{wikitable| class="wikitable"
|-
| width=5 | &nbsp; || width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp;
{{!)}}
|-
|<code>up split</code>
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
! Example !! Output
| width=5 style="border-width:0 1px 0 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:0 0 0 1px; border-style:solid;border-color:black;" | &nbsp;
|-
|<code>1-3</code>
| width=5 | &nbsp; || width=5 | &nbsp;
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=1|col2-matches=3|col1-col2-paths=1-3}}
{{!)}}
|-
|<code>down split(1,5)-3</code>
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=1,5|col2-matches=3|col1-col2-paths=(1,5)-3}}
|{{(!}} border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
|<code>3-1,3-5:red</code>
| width=5 | &nbsp; || width=5 | &nbsp;
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=3|col2-matches=1,5|col1-col2-paths=3-1,3-5:red}}
|-
}}
| width=5 style="border-width:0 1px 0 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:0 0 0 1px; border-style:solid;border-color:black;" | &nbsp;
{{!)}}
|}
 
Path codes can be combined to create any combination. For example, <code>out up down</code> creates
 
{| border=0 cellpadding=0 cellspacing=0 style="font-size: 90%; margin:1em 2em 1em 1em;"
|-
| width=5 style="border-width:0 1px 1px 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:0 0 1px 1px; border-style:solid;border-color:black;" | &nbsp;
|-
| width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp; || width=5 style="border-width:1px 0 0 0; border-style:solid;border-color:black;" | &nbsp;
|}
 
== Examples ==
{{#switch:{{NAMESPACE}}
'''Note''': These are only examples. [[Module:Team bracket]] and [[Module:RoundN]] handle some of these brackets much better than this template does.
| Module =
'''Note''': These are only examples to illustrate parameters. Standard 4-team, 8-team, etc. brackets are better handled by [[Module:Team bracket]].
 
=== Standard 4-team bracket ===
<pre style="overflow: auto;">
 
<pre>
{{#invoke:Build bracket|main
| rounds=2
| rows=6
 
| col1-headers = 1
<!-- Column1 -->
| 0col2-1 headers = header1
 
| 1-1 = team
| 2col1-1 matches = team3,7
| 5col2-1 matches = team5
 
| 6-1 = team
| col1-col2-paths = (3,7)-5
 
<!-- Column1.5Defaults -->
| 1-1a RD2 = outGrand downFinal
| 2-1a = down
| 3-1a = in
| 4-1a = up
| 5-1a = out up
 
| RD1-seed1 = 1
<!-- Column2 -->
| 0RD1-2 seed3 = header2
| 3-2 = team
| 4-2 = team
}}
</pre>
Line 246 ⟶ 200:
{{#invoke:Build bracket|main
| rounds=2
| rows=6
 
| col1-headers = 1
<!-- Column1 -->
| 0col2-1 headers = header1
| 1-1 = team
| 2-1 = team
| 5-1 = team
| 6-1 = team
 
| col1-matches = 3,7
<!-- Column1.5 -->
| 1col2-1a matches = out down5
| 2-1a = down
| 3-1a = in
| 4-1a = up
| 5-1a = out up
 
| col1-col2-paths = (3,7)-5
<!-- Column2 -->
 
| 0-2 = header
<!-- Defaults -->
| 3-2 = team
| 4-2 RD2 = teamGrand Final
 
| RD1-seed1 = 1
| RD1-seed3 = 2
}}
 
=== No3-way seedsbracket ===
<pre>
{{#invoke:Build bracket|main
| rounds=2
| teams-per-match = 3
| rows=2
| seeds = no
 
| col1-headers = 1
<!-- Column1 -->
| 0col2-1 headers = header1
| 1-1 = team
| 2-1 = team
 
| col1-matches = 3,7,11
<!-- Column1.5 -->
| 1col2-1a matches = out in7
 
| col1-col2-paths = (3,7,11)-7
<!-- Column2 -->
| 0-2 = header
| 1-2 = team
| 2-2 = team
}}
</pre>
{{#invoke:Build bracket|main
| rounds=2
| teams-per-match = 3
| rows=2
| seeds = no
 
| col1-headers = 1
<!-- Column1 -->
| 0col2-1 headers = header1
| 1-1 = team
| 2-1 = team
 
| col1-matches = 3,7,11
<!-- Column1.5 -->
| 1col2-1a matches = out in7
 
| col1-col2-paths = (3,7,11)-7
<!-- Column2 -->
| 0-2 = header
| 1-2 = team
| 2-2 = team
}}
 
=== LegsDouble-elimination bracket ===
<pre>
{{#invoke:Build bracket|main
| rounds=4
 
| col1-headers = 1,7
| col2-headers = 1,7
| col3-headers = 7
| col4-headers = 1
 
| col1-matches = 4,11
| col2-matches = 3,10
| col3-matches = 9
| col4-matches = 6
 
| col1-col2-paths = 4-3, 11-10
| col2-col3-paths = 3-3, 10-9
| col3-col4-paths = (3,9)-6
 
<!-- Defaults -->
| RD1 = Upper round 1
| RD2 = Upper final
| RD3b = Lower final
}}
</pre>
{{#invoke:Build bracket|main
| rounds=4
 
| col1-headers = 1,7
| col2-headers = 1,7
| col3-headers = 7
| col4-headers = 1
 
| col1-matches = 4,11
| col2-matches = 3,10
| col3-matches = 9
| col4-matches = 6
 
| col1-col2-paths = 4-3, 11-10
| col2-col3-paths = 3-3, 10-9
| col3-col4-paths = (3,9)-6
 
<!-- Defaults -->
| RD1 = Upper round 1
| RD2 = Upper final
| RD3b = Lower final
}}
 
=== Crossing paths ===
<pre>
{{#invoke:Build bracket|main
| rounds=2
 
| col1-matches = 3,7
| col2-matches = 3,7
 
| col1-col2-paths = 3-7, 7-3
| col1-col2-cross = 5
}}
</pre>
{{#invoke:Build bracket|main
| rounds=2
 
| col1-matches = 3,7
| col2-matches = 3,7
 
| col1-col2-paths = 3-7, 7-3
| col1-col2-cross = 5
}}
}}
 
=== Text ===
{{#switch:{{NAMESPACE}}
| Module =
<pre style="overflow: auto;">
{{#invoke:Build bracket|main
| rounds=2
| col1-matches = 3,6
| col2-matches = 4.5
| col1-col2-paths = (3,6)-4.5
 
| RD1-text1 = Text 1
| RD1-text2 = Text 2
| RD2-text1 = Text 3
}}
</pre>
{{#invoke:Build bracket|main
| rounds=2
| col1-matches = 3,6
| col2-matches = 4.5
| col1-col2-paths = (3,6)-4.5
 
| RD1-text1 = Text 1
| RD1-text2 = Text 2
| RD2-text1 = Text 3
}}
|#default =
{{#tag:syntaxhighlight|
{{((}}{{BASEPAGENAME}}<nowiki>
| RD1-text1 = Text 1
| RD1-text2 = Text 2
| RD2-text1 = Text 3
| RD1 =
| RD1-seed1 =
| RD1-team1 =
| RD1-score1 =
...</nowiki>
{{))}}|lang="wikitext"}}
{{{{#if:{{{limitexamples|}}}|void|{{BASEPAGENAME}}}}|RD1-text1=Text 1|RD1-text2=Text 2|RD2-text1=Text 3}}
}}
 
=== Groups ===
{{#switch:{{NAMESPACE}}
| Module =
<pre style="overflow: auto;">
{{#invoke:Build bracket|main
| rounds=3
| col1-matches = 3,6,9,12
| rows=4
| col2-matches = 4.5,10.5
| legs=2
| col3-matches = 7.5
| RD3-legs=3
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
<!-- Column1 -->
| col2-col3-paths = (4.5,10.5)-7.5
| 0-1 = header
| 3-1 = team
| 4-1 = team
 
| RD1-group1 = Group 1
<!-- Column1.5 -->
| 2RD1-1a group2 = inGroup 2
| 3RD2-1a group1 = outGroup up3
}}
</pre>
{{#invoke:Build bracket|main
| rounds=3
| col1-matches = 3,6,9,12
| col2-matches = 4.5,10.5
| col3-matches = 7.5
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
<!-- Column2 -->
| col2-col3-paths = (4.5,10.5)-7.5
| 0-2 = header
| 2-2 = team
| 3-2 = team
 
| RD1-group1 = Group 1
<!-- Column2.5 -->
| 1RD1-2a group2 = inGroup 2
| 2RD2-2a group1 = outGroup up3
}}
|#default =
{{#tag:syntaxhighlight|
{{((}}{{BASEPAGENAME}}<nowiki>
| RD1-group1 = Group 1
| RD1-group2 = Group 2
| RD2-group1 = Group 3
| RD1 =
| RD1-seed1 =
| RD1-team1 =
| RD1-score1 =
...</nowiki>
{{))}}|lang="wikitext"}}
{{{{#if:{{{limitexamples|}}}|void|{{BASEPAGENAME}}}}|RD1-group1=Group 1|RD1-group2=Group 2|RD2-group1=Group 3}}
}}
 
=== Legs and aggregate ===
<!-- Column3 -->
{{#switch:{{NAMESPACE}}
| 0-3 = header
| 1-3 Module = team
<pre style="overflow: auto;">
| 2-3 = team
{{#invoke:Build bracket|main
| rounds=3
| legs = 2
| RD1-legs = 3
| aggregate = y
 
| col1-matches = 3,6,9,12
| col2-matches = 4.5,10.5
| col3-matches = 7.5
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
| col2-col3-paths = (4.5,10.5)-7.5
}}
</pre>
{{#invoke:Build bracket|main
| rounds=3
| rowslegs =4 2
| RD1-legs =2 3
| aggregate = y
| RD3-legs=3
 
| col1-matches = 3,6,9,12
<!-- Column1 -->
| 0col2-1 matches = header4.5,10.5
| 3col3-1 matches = team7.5
| 4-1 = team
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
<!-- Column1.5 -->
| col2-col3-paths = (4.5,10.5)-7.5
| 2-1a = in
}}
| 3-1a = out up
|#default =
{{#tag:syntaxhighlight|
{{((}}{{BASEPAGENAME}}<nowiki>
| legs = 2
| RD1-legs = 3
| aggregate = y
| RD1 =
| RD1-seed1 =
| RD1-team1 =
| RD1-score1-1=
| RD1-score1-2=
| RD1-score1-3=
| RD1-score1-agg=
...</nowiki>
{{))}}|lang="wikitext"}}
{{{{#if:{{{limitexamples|}}}|void|{{BASEPAGENAME}}}}|legs=2|RD1-legs=3|aggregate=y}}
}}
 
=== Byes ===
<!-- Column2 -->
{{#switch:{{NAMESPACE}}
| 0-2 = header
| 2-2 Module = team
<pre style="overflow: auto;">
| 3-2 = team
{{#invoke:Build bracket|main
| rounds=3
| RD1-byes = y
 
| col1-matches = 3,6,9,12
<!-- Column2.5 -->
| 1col2-2a matches = in4.5,10.5
| 2col3-2a matches = out up7.5
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
<!-- Column3 -->
| col2-col3-paths = (4.5,10.5)-7.5
| 0-3 = header
 
| 1-3 = team
| 2RD1-3 team1 = teamTeam 1
| RD1-team2 = Team 2
}}
</pre>
{{#invoke:Build bracket|main
| rounds=3
| RD1-byes = y
 
| col1-matches = 3,6,9,12
=== 3-way bracket ===
| col2-matches = 4.5,10.5
<pre>
| col3-matches = 7.5
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
| col2-col3-paths = (4.5,10.5)-7.5
 
| RD1-team1 = Team 1
| RD1-team2 = Team 2
}}
|#default =
{{#tag:syntaxhighlight|
{{((}}{{BASEPAGENAME}}<nowiki>
| RD1-byes = y
| RD1 =
| RD1-seed1 =
| RD1-team1 = Team 1
| RD1-score1 =
| RD1-seed2 =
| RD1-team2 = Team 2
| RD1-score2 =
...</nowiki>
{{))}}|lang="wikitext"}}
{{{{#if:{{{limitexamples|}}}|void|{{BASEPAGENAME}}}}|RD1-byes=y|RD1-team1=Team 1|RD1-team2=Team 2}}
}}
 
<!--=== Numbered parameters ===
{{#switch:{{NAMESPACE}}
| Module =
<pre style="overflow: auto;">
{{#invoke:Build bracket|main
| rounds=2
| col1-matches = 3,7
| rows=11
| col2-matches = 5
| col1-col2-paths = (3,7)-5
 
| paramstyle = numbered
<!-- Column1 -->
| 0-1 seeds = headeryes
| 1-1 = team
| 2-1 = team
| 3-1 = team
| 5-1 = team
| 6-1 = team
| 7-1 = team
| 9-1 = team
| 10-1 = team
| 11-1 = team
 
| Text 1 | 1 | Team 1 | 5 | 4 | Team 2 | 11
<!-- Column1.5 -->
| Text 2 | 2 | Team 3 | 6 | 3 | Team 4 | 3
| 2-1a = out down split
| 3-1a = up
| 4-1a = up
| 5-1a = up
| 6-1a = out up down in split
| 7-1a = up
| 8-1a = up
| 9-1a = up
| 10-1a = out up split
 
| Text 3 | 4 | Team 2 | 2 | 2 | Team 3 | 1
<!-- Column2 -->
| 0-2 = header
| 5-2 = team
| 6-2 = team
| 7-2 = team
}}
</pre>
{{#invoke:Build bracket|main
| rounds=2
| col1-matches = 3,7
| col2-matches = 5
| col1-col2-paths = (3,7)-5
 
| paramstyle = numbered
| seeds = yes
 
| Text 1 | 1 | Team 1 | 5 | 4 | Team 2 | 11
| Text 2 | 2 | Team 3 | 6 | 3 | Team 4 | 3
 
| Text 3 | 4 | Team 2 | 2 | 2 | Team 3 | 1
}}
|#default =
{{#tag:syntaxhighlight|
{{((}}{{BASEPAGENAME}}<nowiki>
| paramstyle = numbered
| RD1 =
 
| Text 1 | Team 1 | S1 | Team 2 | S2
| Text 2 | Team 3 | S3 | Team 4 | S4
...</nowiki>
{{))}}|lang="wikitext"}}
{{{{#if:{{{limitexamples|}}}|void|{{BASEPAGENAME}}}}|paramstyle=numbered|1=Text 1|2=Team 1|3=S1 |4=Team 2|5=S2|6=Text 2|7=Team 3|8=S3|9=Team 4|10=S4}}
}}-->
 
{{#switch:{{NAMESPACE}}
| Module =
=== Bold winner ===
<pre style="overflow: auto;">
{{#invoke:Build bracket|main
| rounds=2
| rowslegs =11 3
| boldwinner=y
| col1-matches = 3,7
| col2-matches = 5
| col1-col2-paths = (3,7)-5
 
| RD1-seed1 = 1 | RD1-team1 = Team 1 | RD1-score1-1 = 5 | RD1-score1-2 = 12 | RD1-score1-3 = 15
<!-- Column1 -->
| RD1-seed2 = 4 | RD1-team2 = Team 2 | RD1-score2-1 = 11 | RD1-score2-2 = 10 | RD1-score2-3 = 4
| 0-1 = header
| 1-1 = team
| 2-1 = team
| 3-1 = team
| 5-1 = team
| 6-1 = team
| 7-1 = team
| 9-1 = team
| 10-1 = team
| 11-1 = team
 
| RD1-seed3 = 2 | RD1-team3 = Team 3 | RD1-score3-1 = 6 | RD1-score3-2 = 13 | RD1-score3-3 = {{ndash}}
<!-- Column1.5 -->
| RD1-seed4 = 3 | RD1-team4 = Team 4 | RD1-score4-1 = 3 | RD1-score4-2 = 2 | RD1-score4-3 = {{ndash}}
| 2-1a = out down split
| 3-1a = up
| 4-1a = up
| 5-1a = up
| 6-1a = out up down in split
| 7-1a = up
| 8-1a = up
| 9-1a = up
| 10-1a = out up split
 
| RD2-seed1 = 4 | RD2-team1 = Team 2 | RD2-score1-1 = 2 | RD2-score1-2 = 2 | RD2-score1-3 = 5
<!-- Column2 -->
| RD2-seed2 = 2 | RD2-team2 = Team 3 | RD2-score2-1 = 1 | RD2-score2-2 = 7 | RD2-score2-3 = 2
| 0-2 = header
| 5-2 = team
| 6-2 = team
| 7-2 = team
}}
</pre>
{{#invoke:Build bracket|main
| rounds=2
| legs = 3
| boldwinner=y
| col1-matches = 3,7
| col2-matches = 5
| col1-col2-paths = (3,7)-5
 
| RD1-seed1 = 1 | RD1-team1 = Team 1 | RD1-score1-1 = 5 | RD1-score1-2 = 12 | RD1-score1-3 = 15
| RD1-seed2 = 4 | RD1-team2 = Team 2 | RD1-score2-1 = 11 | RD1-score2-2 = 10 | RD1-score2-3 = 4
 
| RD1-seed3 = 2 | RD1-team3 = Team 3 | RD1-score3-1 = 6 | RD1-score3-2 = 13 | RD1-score3-3 = {{ndash}}
<includeonly>{{Sandbox other||
| RD1-seed4 = 3 | RD1-team4 = Team 4 | RD1-score4-1 = 3 | RD1-score4-2 = 2 | RD1-score4-3 = {{ndash}}
<!-- Categories below this path -->
 
| RD2-seed1 = 4 | RD2-team1 = Team 2 | RD2-score1-1 = 2 | RD2-score1-2 = 2 | RD2-score1-3 = 5
| RD2-seed2 = 2 | RD2-team2 = Team 3 | RD2-score2-1 = 1 | RD2-score2-2 = 7 | RD2-score2-3 = 2
}}
 
|#default=
{{{examples|}}}
}}
{{#switch:{{NAMESPACE}}
| Module =
== See also ==
* [[Module:Team bracket]]
* [[Module:RoundN]]
* [[Module:Bracket]]
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:Sports modules]]
}}</includeonly>
| #default =
==Alternatives to avoid Wikipedia's [[WP:PEIS|Post-expand include size]] limit==
Pages with many brackets or large brackets, especially those containing flag icons, may come close to or exceed Wikipedia's [[WP:PEIS|Post-expand include size]] limit. In these cases consider using modules directly instead:
* {{#invoke:Bracket|doc}}
* In most cases, flag templates can be replaced with {{ml|flag}}, e.g. {{tlx|flag|CAN}}→{{mlx|flag|{{!}}CAN}} or {{tlx|flag athlete|CAN}}→{{mlx|flag|athlete|CAN}}.
 
{{#if:{{{see also|}}}|
== See also ==
{{{see also|* {{tl|Build bracket}}}}}
}}
}}
<noinclude>
[[Category:Module documentation pages]]
</noinclude>