Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a253f9cab8358682

Jump to content

Template:Resratio/doc

From Wikipedia, the free encyclopedia

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

Examples

[edit]
Examples
Single parameter Two parameters
0
f=float0 |f=floatxy
|xy ||x
11∶1 1|11∶1
1.26∶5
1.255∶4
1.2505∶4
1.25005∶4
{{#expr:4/3}}4∶3
4/34∶3
8/64∶3
12/94∶3
16/124∶3
20/154∶3
400/3004∶3
4 / 34∶3
4/ 34∶3
4 /34∶3
4 / 3 4∶3
1.31.3
1.334∶3
1.3304∶3
1.3334∶3
1.33334∶3
1.3344∶3
1.341.34
1.47∶5
tv4∶3
TV4∶3
4 :34 :3
4: 34: 3
4 : 34 : 3
4:34∶3 4|34∶3
f=float|4:31.333 4|3|f=float1.333
8:64∶3 8|64∶3
12:94∶3 12|94∶3
16:124∶3 16|124∶3
20:1520:15 20|154∶3
3:43:4 3|43∶4
4.0:3.04.0:3.0 4.0|3.04∶3
4:3.04:3.0 4|3.04∶3
4.0:34.0:3 4.0|34∶3
4,0:3,04,0:3,0 4,0|3,04,0∶3,0
4:3,04:3,0 4|3,04∶1
4,0:34,0:3 4,0|34,0∶3
1.333:11.333:1 1.333|14∶3
1,333:11,333:1 1,333|11,333∶1
1,3331,333
1=4:34∶3 2=4:3∶4:3
x=4:34∶3 y=4:3∶4:3

Two parameters

[edit]
  • 400|300: 4∶3
  • 20|12: 5∶3
  • 4:3|3: 4∶3
  • 4|4:3: 4∶1
  • 2+2|2+1: 4∶3
  • 2|1.5: 4∶3
  • 2|1+1/2: 4∶3
  • 1+1/3|1: 4∶3
  • 4/3|1: 4∶3
  • 4/3|3/3: 4∶3

f

[edit]
  • 4:3|f=: 4∶3
  • 4:3|f=float: 1.333
  • 4:3|f=true: 1.333
  • 4:3|f=false: 1.333
  • 4:3|f=1: 1.333
  • 4:3|f=0: 1.333
  • f=float|4|3: 1.333
  • 4|f=float|3: 1.333
  • f=float|1=4:3: 1.333
  • 4|3|f=3: 4∶3
  • 4|3|f=4: 1.333
  • 4|3|f=5: 1.333
  • 4|3|f=6: 8∶6
  • 4|3|f=9: 12∶9
  • 4:3|f=float|r=: xy
  • 4:3|f=float|r=1: 1
  • 4:3|f=float|r=1,4: 1.333
  • 4:3|f=float|r=1.30: 1.30
  • 4:3|f=float|r=1.34: 1.34
  • 4:3|f=float|r=TV: 1.333
  • 4:3|f=float|r=3:4: 1.333
  • 4:3|f=float|r=AR: 1.333
  • 4:3|f=float|r=4/3: 4/3
  • 4:3|f=float|r=4:3: 1.333
  • 4:3|f=float|r=1⅓: 1.333

See also

[edit]