Template:Resratio/doc

This template is employed by Template:resrow to achieve consistent nomenclature for aspect ratios. It works differently with one and two parameters. This has been moved from Template:ratio to free up the name of the Ratio template for more versatile purposes.

Template parameters

ParameterDescriptionTypeStatus
ratio or width1 x

If it is the only parameter provided, a float number or a ratio of two integers with colon in between without spaces. Otherwise, the larger of both dimensions in pixels.

Stringrequired
height2 y

The smaller of both dimensions in pixels

Numberoptional
float outputf

if provided, a float will be returned instead of a string; except when set to a small integer like 9, some values will use a reasonable approximation with that as a denominator

Stringoptional
ratior

forced literal output

Stringoptional