Module:RoundN/doc

Usage
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:

Alternatively, the shorthand form  (or any power of 2 between N2 and N512) is equivalent to

Parameter List
{| class='wikitable' style='width:75%' ! Parameter name ! Description
 * parameter names are required.
 * italicized parameter names are required in some cases
 * parameter names involve new features not available prior to the release of this module




 * style='text-align:center;vertical-align:top;width:9em'|
 * style='background-color:#fff'|Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.)

Note
 * For  less than 4 (i.e. Round2-Round8), the 3rd Place match box is hidden by default. For   greater or equal to  4, the 3rd Place match box is visible by default. This reflects the behavior of the templates prior to this module's release.

While required for invoking the main function, this module has meta functions in the form of 'N##' which can call main with the right columns for you. For example, you may replace  with. Valid for N# where # is a power of 2. You must invoke this module directly to use this (vs. a template that already has a columns value). Only works up to N512. If say N1024 ever becomes necessary, call main directly and set 10.

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).




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Unnamed parameters (i.e. a value not prefixed by ) are read sequentially in groups of 5 such that:

Example 1
undefined 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  on top and   above the first group of 5 in the finals round, etc.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'| Set the  parameter to add custom CSS to the table.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'| For large tables, set scroll_height to the desired height in pixels.

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 scroll_head_unlock is used.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'| If it is desirable to have the round heading scroll with the table (such as if a larger viewing area is desired), set scroll_head_unlock to 'yes'




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|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.

The shorthand  will do the same thing as: |skipmatch1=yes
 * skipmatch2=yes
 * skipmatch4=yes
 * skipmatch6=yes
 * skipmatch7=yes

Note:
 * Unlike in the original templates, this module does not require leading zeroes in this parameter, i.e. skipmatch001 is the same as skipmatch1 (though it may make your template code easier to read if lead with an appropriate number of zeroes).
 * The 5 parameters that would have populated the skipped box will be ignored regardless of value unless  is set to 'yes' (see below).
 * Previously, skipmatch only worked in the first round. This limitation no longer applies. (See Module talk:RoundN/testcases/3)


 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|If  is 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.)




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|The boldwinner parameter accepts either 'high' or 'low', 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
Note:
 * If entering a score that includes non-numberssuch as, the Semi Final score for team C in the above examplethe module will first remove all non-digit characters and concatenate the rest. For example,   and   would be converted to   and  , respectively, before being compared. This should be valid for most cases, however, you may override using the   parameter.
 * If the scores are tied or contain no numbers, then neither will be bolded, however, you may still manually bold them with wikimarkup.
 * This does not remove any formatting already present.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|

The form  is also available.



Set  to show numbers next to each match group (useful for skipmatch and manualboldmatch) when viewing on the template page.
 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|

Note that these numbers will not appear in article space.



undefined Note RD[N+1] = Third Place, and will perform the job of the  parameter if the latter is omitted, i.e. RD[N+1] is ignored if Consol is true. Also, this alternate name for Consol was not available prior to the release of this module (and is provided because the module's programmer thought 'Consol' was unintuitive).
 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Use, replacing # with the desired column such that 1 is the leftmost round and X is the rightmost when  . For example:


 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|By default,  is set to 'yes' when   is greater than 3 and 'no' otherwise. Override as desired. (See   if you wish to rename this heading)

undefined



undefined
 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Set  to change the 'Third Place' label to 'name'. You may also use the form RD# where # = columns + 1.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Add




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Set  to the desired width in pixels. (Default is 170)




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Set  to the desired width in pixels. (Default is 30)




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Setting  is basically equal to  . Provided for compatibility. Ignored if   is set.




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Set  if used to create a template for a specific game (add V.T.E. link using navbar).




 * style='text-align:center;vertical-align:top'|
 * style='background-color:#fff'|Name of the template. Required if used as a template for proper linking.


 * }