This is the documentation page for Module:RoundN
Usage edit source
This is a module for meta templates such as {{Round16}}, {{Round8}}, etc. Though originally designed for sports, it can be used to present any tree.
Basic form:
{{#invoke:RoundN|main|columns = [number of columns (3 columns for Round8, 4 columns for Round16, etc.)]}}
Alternatively, the shorthand form {{#invoke:RoundN|N16}} (or any power of 2 between N2 and N512) is equivalent to Template:Code
Parameter List edit source
- Template:Red parameter names are required.
- italicized parameter names are required in some cases
- Template:Blue parameter names involve new features not available prior to the release of this module
| Parameter name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Template:TOC tab | Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.) Note 
 Template:TOC tab
While required for invoking the main function ( PS: Though adding shorthands up to N ~70 trillion would be easy, it would make unnecessary overhead as these meta functions are generated eached time this module is called (granted generating such functions up to ~70 trillion is probably less expensive than making the table for columns = 3). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Unnamed parameters (i.e. a value not prefixed by [param_name] =) are read sequentially in groups of 5 such that:Example 1 edit sourceTemplate:Demo
Placing each group of 5 on a new line is optional, but does make it easier to read. Also, consider adding the comments such as  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set the styleparameter to add custom CSS to the table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | For large tables, set Template:Code to the desired height in pixels. Module talk:RoundN/testcases/1 CSS units are also allowed (i.e. '20em', '30%', etc.). Note This works by duplicating the entire table and then using CSS to lock the clone of the table to the top of the div. Conceivably, for extremely large tables, this can result in a significant amount of extra HTML code to download versus if Template:Code is used. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | If it is desirable to have the round heading scroll with the table (such as if a larger viewing area is desired), set Template:Code to 'yes' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | If set, boxes for the #th match group will not be shown. Most often used for playoffs or when the number of teams playing in the first round is not a power of 2. Module talk:RoundN/testcases/1
Template:TOC tab:
The shorthand  |skipmatch1=yes |skipmatch2=yes |skipmatch4=yes |skipmatch6=yes |skipmatch7=yes Note: 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | If omit_blanksis set to yes, then all parameters that would have been skipped will instead be shifted to the next non-skipped box. (This is turned off by default because most templates made before the release of this module were required to use empty parameters as placeholders.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | The Template:Code parameter accepts either Template:Code or Template:Code, which will automatically bold the text of the participant with the higher or lower score, respectively. In other words, set this to 'low' if the lower score wins and 'high' if the high score wins. Example 2 edit sourceModule talk:RoundN/testcases/2 Note: 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Module talk:RoundN/testcases/2 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set  Note that these numbers will not appear in article space. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Use RD#, replacing # with the desired column such that 1 is the leftmost round and X is the rightmost whencolumns = X. For example:Template:Demo
Note RD[N+1] = Third Place, and will perform the job of the  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | By default, |3rdplace=is set to 'yes' whencolumnsis greater than 3 and 'no' otherwise. Override as desired. (SeeConsolif you wish to rename this heading) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set Consol=nameto change the 'Third Place' label to 'name'. You may also use the form RD# where # = columns + 1. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Add |color=yes
 
 Add  
 Add  
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Add |color_repechage=yesfor repechage brackets, where the winner is awarded a bronze medal.
 
 
 Add  
 Add  
 Add  
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set team-widthto the desired width in pixels. (Default is 170) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set score-widthto the desired width in pixels. (Default is 30) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Setting |widescore=yesis basically equal to|score-width=40. Provided for compatibility. Ignored ifscore-widthis set. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set score-boxesto the desired number of score boxes per match. (Default is 1). The number can be followed by + sum, which will add one more score box with the sum of all the others. For examples, see test case 5 and test case 6. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set |template=yesif used to create a template for a specific game (add V.T.E. link using {{navbar}}). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set |flex_tree=yesto make the brackets vertically more compact. That is, to have less space between matches of the same round.
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Template:TOC tab | Set |short_brackets=yesto make the brackets horizontally more compact. That is, to have less space between matches of following rounds.
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Node Functions edit source
|  | Some of these functions are still in alpha testing and may not be stable. Please feel free to comment at the talk page. | 
For greater customization, node functions may be added to the parameter usually used for providing match information such as dates and location.  Simply insert node_function{function name} in the appropriate location. A demonstration of most of the node functions can be found at RoundN/testcases/4.
- orphan - Current node is disconnected from all other nodes (no lines will be drawn). One practical use for this may be when the winners of the previous round advance to a different tournament instead of playing each other but the losers still play a consolation match for 3rd place, as per this discussion.
For the next three node functions, the parameters usually used for team names and scores should be omitted if these node functions are used.
- line - Current node is omitted and replaced with a horizontal line. Text may be displayed above this line via node_function{line(text)}(at some point, the preferred format would benode_function{line}textto match the form of the canvas function though backwards compatibility would probably be maintained). If curly brackets are desired in the text, make sure to escape them with\.
- bridge - Current node is omitted and replaced with a vertical line.
- canvas - Current node is replaced with whatever you want via node_function{canvas}anything
- heading - Not yet implemented. Planned node function with the form node_function{heading(name)}date/location. Makes a round name heading like for the Consol parameter, but may be placed anywhere, as per the "Elimination Rounds" of RoundN/testcases/6 (which currently renders the planned output of this function without the functions).
Undocumented features edit source
Alas User:Codehydro seriously overbuilt this module and never found the time to document even half the features available. Check out the following examples which may contain some advanced features:
Partial List of undocumented params edit source
- no_column_head
- branch_upwards
Note that some of these features may not have been documented due to incomplete implementation.
