Template:Page numbers

From blackwiki
Jump to navigation Jump to search


Template documentation[view] [edit] [history] [purge]

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}}. pp. page 22.
{{Page numbers|Page 122}}. pp. Page 122.
{{Page numbers|4, 6–12}}. pp. 4, 6–12.
{{Page numbers|2232}}. pp. 2232.
{{Page numbers|22a}}. pp. 22a.
{{Page numbers|22 f.}}. pp. 22 f..
{{Page numbers|22 ff.}}. pp. 22 ff..
{{Page numbers|22 etc.}}. pp. 22 etc..
{{Page numbers|22 and index}}. pp. 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}}. pp. xvi.
{{Page numbers|Introduction}}. pp. Introduction.
{{Page numbers|Section 4 part 2}}. pp. 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.

ja:Template:Page numbers