ଉଇକିପିଡ଼ିଆ ରୁ
Jump to navigation Jump to search


The formatter Template:Gapnum formats a number by inserting small gaps (rather than commas) between each 3-digit group, with the decimal portion displayed in groups of 3 or 4 decimal digits. The gap size can be set by: gap=3px (default: gap=0.25em).


{{Gapnum |34000.123456}}   → 34000.123456
{{Gapnum |7100.123000777|gap=11px}}   → 7100.123000777
{{Gapnum |7100.123000777|prec=5}}   → 7100.12300

This template formats any number to have space gaps, showing a specified number of decimal digits. It shows the decimal digits in groups of 3 or 4, separated by narrow spaces (small gaps), as the left-margin space of digit groups.


Parameter 1 is a number (with no embedded spaces), to display with gaps.

Parameter prec=5 (optional) is the number of decimals to display (the count of digits after the decimal point), and can be less, or more than the actual number to show trailing zeroes. Setting prec= (as blank) will also use the full precision of the amount in parameter 1.

Parameter gap=3px sets the gap between digit groups (default: gap=0.25em).

Performance impact[ସମ୍ପାଦନା]

The template cannot process numbers with a trailing space, unless the precision prec=n is specified (due to processing restrictions in Template:Precision). The expansion depth usage is 11, by default, or 6 levels if precision prec=n is set.

See also[ସମ୍ପାଦନା]

  • {{Gapnum/dec}} - to format only the decimal portion of a number
  • {{Val/delimitnum}} - to format a number with commas & decimal gaps
  • {{Space}} - to create alignment between adjacent text lines, or to space out titles, etc.