टेम्पलेट:Page numbers

विकिपीडिया से


Usage[संपादन करीं]

Designed to sit in a parent template (e.g. the Cite family) and ensure that p. or pp is prepended as and if appropriate.

Code Result
{{Page numbers}}. .
{{Page numbers|page 22}}. page 22.
{{Page numbers|Page 122}}. Page 122.
{{Page numbers|4, 6-12}}. pp. 4, 6-12.
{{Page numbers|2232}}. p. 2232.
{{Page numbers|22a}}. p. 22a.
{{Page numbers|22 f.}}. p. 22 f..
{{Page numbers|22 ff.}}. p. 22 ff..
{{Page numbers|22 etc.}}. p. 22 etc..
{{Page numbers|22 and index}}. p. 22 and index.
{{Page numbers|1,22}}. pp. 1,22.
{{Page numbers|12-23}}. pp. 12-23.
{{Page numbers|15–123}}.A pp. 15–123.
{{Page numbers|15–123}}.B pp. 15–123.
{{Page numbers|xvi}}. p. xvi.
{{Page numbers|Introduction}}. Introduction.
{{Page numbers|Section 4 part 2}}. Section 4 part 2.
Notes
  • A - Uses an n-dash character, "–".
  • B - Uses an n-dash HTML entity, "–".

Caveat[संपादन करीं]

Since we don't have proper string functions available, this template is likely to be relatively expensive in size terms - a set of short string functions would help this.