• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Ratio

  • Template
  • Talk
  • Language
  • Watch
  • Edit

∶

Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:String (sandbox)

Outputs the ratio character (U+2236) between two optional arguments or instead of any colon character in a single argument.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
width1

width or larger of both dimensions

Numberoptional
height2

height or smaller of both dimensions

Numberoptional

Example usage

edit
SourceOutputComment
{{ratio}}
∶
4{{ratio}}3
4∶3
{{ratio|4|3}}
4∶3
{{ratio|4|3|2}}
4∶3 only two parameters are supported
{{ratio|4}}
4∶1 "∶1" is automatically added when only 1 argument with no colon is given
{{ratio|4:3}}
4∶3 Single argument with colon is replaced with ratio symbol.
{{ratio|4:4:4}}
4∶4∶4 Works with multiple colons

See also

edit
  • {{resratio}} also converts and harmonizes entries like "16:10"
  • {{resx}} for the multiplication sign
  • {{Frac}}
  • {{Fractions and ratios}}
  • {{date range}}
  • {{page range}}
The above documentation is transcluded from Template:Ratio/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Ratio&oldid=1065884720"