Jump to content

Template:Floating right mark/doc

From Wikisource


This template (the shortcut {{frm}} is available) adds a floating mark to the right of right-aligned text. By default the template emits a degree symbol (°).

This is particularly useful for alignment in tables, for example where there is a unit symbol attached to the first cell in a right-aligned column.

Usage

[edit]

Add {{frm}} where the mark would be.

Example
{| 
|January ||{{ts|ar}}| 27{{frm}}
|-
|February ||{{ts|ar}}| 4 
|-
|March ||{{ts|ar}}| 208
|}
January 27°
February 4
March 208

If the template is used in a table, padding should be applied to the column (using page styles is recommended), otherwise the floating text is likely to overlap borders or the following column:

{| class="wikitable"
|colspan="2"| Without padding ||colspan="2"| With padding
|-
|{{ts|ar}}| 27{{frm}} || Medium ||{{ts|ar|pr1}}| 27{{frm}} || Medium
|-
|{{ts|ar}}| 4 || Low ||{{ts|ar|pr1}}| 4 || Low
|-
|{{ts|ar}}| 208 || High ||{{ts|ar|pr1}}| 208 || High
|}
Without padding With padding
27° Medium 27° Medium
4 Low 4 Low
208 High 208 High

Character override

[edit]

The first parameter overrides the default degree symbol (°) with the text specified, for example:

{| 
|April ||{{ts|ar}}| 136
|-
|May ||{{ts|ar}}| 26{{frm|¼}}
|-
|June ||{{ts|ar}}| 37
|}
April 136
May 26¼
June 37

This is useful when references appear in tables:

{| 
|North ||{{ts|ar}}| 208
|-
|West ||{{ts|ar}}| 56{{frm|<ref>Including northwest.</ref>}}
|-
|East ||{{ts|ar}}| 9
|-
|South ||{{ts|ar}}| 137
|}
North 191
West 56[1]
East 9
South 137
  1. Including northwest.


Spacing

[edit]

The second parameter specifies the gap between the text to be floated on the right and the text before it, for example:

{| 
|July ||{{ts|ar}}| 58{{frm|°|0.2em}}
|-
|August ||{{ts|ar}}| 56
|-
|September ||{{ts|ar}}| 54
|}
July 58°
August 56
September 54

See also

[edit]