Template:Quran ref/doc

Source: Wikipedia, the free encyclopedia.

Makes references to the Quran, linking to pages under https://quran-archive.org – a resource hosting a growing number of the digitized translations of the Quran from the XVII century to the current days. This template should be used ONLY in the body of an article, preferably within <ref></ref> tags.

Usage

{{Quran ref
| <unnamed>     ( page= , p= , from= , f= )     # Page number (from).         Mandatory.
| to=           ( t= )                          # Page number (to).  
| quote=        ( q= )                          # Quote.
| translator=   ( a= )                          # Translator short code.
| edition=      ( e= )                          # First available edition.
| chapter=      ( ch= , chapter from= , chf= )  # Chapter number (from).
| chapter to=   ( cht= )                        # Chapter number (to).
| verse=        ( v= , verse from= , vf= )      # Verse number (from).
| verse to=     ( vt= )                         # Verse number (to).
| extend=       ( x= )                          # Display translator and edition switch.
| inline=       ( i= )                          # Inline format switch.
| short=        ( s= )                          # Abbreviation switch.
| hide=         ( h= )                          # Hide pages switch.
}}

Required parameters

  • Page number is the only required parameter. It can be the only unnamed parameter or you can use any of the allowed aliases: page=, p=, from=, f=. If no translation is specified, the link defaults to the translation by Marmaduke Pickthall[1].

Optional parameters

  • to, or, t parameter:
    • last page in the referred range. Must be an integer. An explanatory parameter, the link will lead to the first page in the range.
  • quote, or, q:
    • the text of the quotation. The template adds quotation marks, so don't put them.
  • translator, or, a parameter can have values as per "Available translations" table below (case insensitive).
  • edition, or, e can have values corresponding to the specified translator as per "Available translations" table below. If no edition is specified for the given translator, the default one will be used (marked with an asterisk in the table).
  • chapter, or, ch, or, chapter from, or, chf parameter is an integer representing the number of the surah, or the first surah in the range [2].
  • chapter to, or, cht parameter is an integer representing the number of the last surah in the range [2].
  • verse, or, v, or, verse from, or, vf parameter is an integer representing the number of the ayah, or the first ayah in the range [2].
  • verse to, or, vt parameter is an integer representing the number of the last ayah in the range [2].

Optional format switches

All switches default to false and can be set to true using any of the following values: 1, y, yes, true (all case insensitive).

  • extend=1, or, x=1. If set, it makes the name of the translator and the edition ID shown into the template printout.
  • inline=1, or, i=1. If set, it suppresses the superscript formatting. For use within <ref></ref> tag, for example.
  • short=1, or, s=1. If set, it makes some fragments abbreviated or omitted. For example, it will output "p." instead of "page", etc.
  • hide=1, or, h=1. If set, it suppresses page number output. The link will continue using the page number internally, to build the correct URL, though.

Available translations

Translator ID Translator Name Available Edition ID Is default
translator=, or, t= edition=, or, e=
ROS Alexander Ross 1649 *
SAL George Sale 1734 *
ROD John Medows Rodwell 1861 *
ROD John Medows Rodwell 1909
PAL Edward Henry Palmer 1880 *
MKH Mohammad Akram Khan 1905 *
FAZ Abu'l-Fazl 1912 *
DIH Hairat Dihlawi 1916 *
MAL Muhammad Ali 1917 *
GSA Ghulam Sarwar 1929 *
PIC Marmaduke Pickthall 1930 * [3]
BEL Richard Bell 1939 *
CHI Ali Muhammad Fazil Chinoy 1954 *
PSA Salahuddin 1969 *
HAA Hashim Amir Ali 1974 *
ASA Muhammad Asad 1980 *
MSA Shaykh Muhammad Sarwar 1982 *
AHA Ahmed Ali Lahori 1988 *

Examples

Please, modify output of the resulting reference combining parameters and switches in order to keep your reference in agreement with the context, aims of referencing, and Wikipedia standards (WP:MOS).

Basic mode

Example 1. Page only
{{Quran ref|23}}

 [Quran page 23]

Example 2. Incorrect data type for the "page" URL parameter, falls back to "1" silently
{{Quran ref|pages 105 - 116}}

 [Quran]

Example 3. Page range
{{Quran ref|from=23|to=29}}

 [Quran pages 23–29]

Example 4. Quote
{{Quran ref|23|q=Quoted text}}

"Quoted text" [Quran page 23]

Example 5. Quote with Chapter and Verse
{{Quran ref|q=Quoted text|p=84|chapter=92|verse=24}}

"Quoted text" [Quran page 84, chapter 92:24]

Example 6. Quote with Chapter and Verse range
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24}}

"Quoted text" [Quran page 84, chapter 92:21–24]

Example 7. Quote with Chapter range
{{Quran ref|q=Quoted text|p=84|chf=92|cht=96}}

"Quoted text" [Quran page 84, chapters 92–96]

Extended mode (x)

The same examples with x switch enabled.

Example 1x. Page only
{{Quran ref|23|x=1}}

 [Quran page 23, translated by Pickthall, 1930]

Example 2x. Incorrect data type for the "page" URL parameter, falls back to "1" silently
{{Quran ref|pages 105 - 116|x=true}}

 [Quran, translated by Pickthall, 1930]

Example 3x. Page range
{{Quran ref|from=23|to=29|x=y}}

 [Quran pages 23–29, translated by Pickthall, 1930]

Example 4x. Quote
{{Quran ref|23|q=Quoted text|x=yes}}

"Quoted text" [Quran page 23, translated by Pickthall, 1930]

Example 5x. Quote with Chapter and Verse
{{Quran ref|q=Quoted text|p=84|chapter=92|verse=24}}

"Quoted text" [Quran page 84, chapter 92:24]

Example 6x. Quote with Chapter and Verse range
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24|x=1}}

"Quoted text" [Quran page 84, chapter 92:21–24, translated by Pickthall, 1930]

Example 7x. Quote with Chapter range
{{Quran ref|q=Quoted text|p=84|chf=92|cht=96|x=1}}

"Quoted text" [Quran page 84, chapters 92–96, translated by Pickthall, 1930]

Inline mode (i)

The same examples with i switch enabled.

Example 1i. Page only
{{Quran ref|23|i=1}}

 Quran page 23

Example 2i. Incorrect data type for the "page" URL parameter, falls back to "1" silently
{{Quran ref|pages 105 - 116|i=1}}

 Quran

Example 3xi. Page range
{{Quran ref|from=23|to=29|x=y|i=yes}}

 Quran pages 23–29 translated by Pickthall, 1930

Example 4xi. Quote
{{Quran ref|23|q=Quoted text|x=yes|i=1}}

"Quoted text" Quran page 23 translated by Pickthall, 1930

Example 5xi. Quote with Chapter and Verse
{{Quran ref|q=Quoted text|p=84|chapter=92|verse=24|i=true|x=1}}

"Quoted text" Quran page 84, chapter 92:24 translated by Pickthall, 1930

Example 6i. Quote with Chapter and Verse range
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24|i=yes}}

"Quoted text" Quran page 84, chapter 92:21–24

Example 7i. Quote with Chapter range
{{Quran ref|q=Quoted text|p=84|chf=92|cht=96|i=1}}

"Quoted text" Quran page 84, chapters 92–96

Shorter mode (s)

The same examples with s switch enabled.

Example 1is. Page only
{{Quran ref|23|i=1|s=1}}

 Quran p. 23

Example 2s. Incorrect data type for the "page" URL parameter, falls back to "1" silently
{{Quran ref|pages 105 - 116|s=yes}}

 [Quran]

Example 3xs. Page range
{{Quran ref|from=23|to=29|x=y|s=true}}

 [Quran p. 23–29, tr. by Pickthall, 1930]

Example 4xis. Quote
{{Quran ref|23|q=Quoted text|x=yes|i=1|s=1}}

"Quoted text" Quran p. 23 tr. by Pickthall, 1930

Example 5xs. Quote with Chapter and Verse
{{Quran ref|q=Quoted text|p=84|chapter=92|verse=24|x=1|s=y}}

"Quoted text" [Quran p. 84, 92:24, tr. by Pickthall, 1930]

Example 6is. Quote with Chapter and Verse range
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24|i=yes|s=1}}

"Quoted text" Quran p. 84, 92:21–24

Example 7s. Quote with Chapter range
{{Quran ref|q=Quoted text|p=84|chf=92|cht=96|s=yes}}

"Quoted text" [Quran p. 84, 92–96]

Hidden pages mode (h)

The same examples with h switch enabled.

Example 1sh. Page only
{{Quran ref|23|s=1|h=y}}

 [Quran]

Example 2ish. Incorrect data type for the "page" URL parameter, falls back to "1" silently
{{Quran ref|pages 105 - 116|i=1|s=yes|h=1}}

 Quran

Example 3xsh. Page range
{{Quran ref|from=23|to=29|x=y|s=true|h=1}}

 [Quran, tr. by Pickthall, 1930]

Example 4xish. Quote
{{Quran ref|23|q=Quoted text|x=yes|i=1|s=1|h=yes}}

"Quoted text" Quran tr. by Pickthall, 1930

Example 5xsh. Quote with Chapter and Verse
{{Quran ref|q=Quoted text|p=84|chapter=92|verse=24|x=1|s=y|h=true}}

"Quoted text" [Quran 92:24, tr. by Pickthall, 1930]

Example 6ish. Quote with Chapter and Verse range
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24|i=yes|s=1|h=1}}

"Quoted text" Quran 92:21–24

Example 7sh. Quote with Chapter range
{{Quran ref|q=Quoted text|p=84|chf=92|cht=96|s=yes|h=y}}

"Quoted text" [Quran 92–96]

Translators and Editions

Defaults to PIC translator (Picthall) (+ extend)
{{Quran ref|q=Quoted text|p=84|chapter=92|vf=21|vt=24|x=yes}}

"Quoted text" [Quran page 84, chapter 92:21–24, translated by Pickthall, 1930]

Defaults to the pre-defined edition (+ extend + short)
{{Quran ref|q=Quoted text|p=84|chapter=92|v=21|verse to=24|x=1|a=ROD|s=1}}

"Quoted text" [Quran p. 84, 92:21–24, tr. by Rodwell, 1861]

Edition year can be set explicitly (+ extend + hidden pages)
{{Quran ref|q=Quoted text|p=84|ch=92|v=21|vt=24|x=1|e=1909|a=ROD|h=yes}}

"Quoted text" [Quran 92:21–24, translated by Rodwell, 1909]

URL is generating correctly even if printout is the shortened (+ hidden pages)
{{Quran ref|q=Quoted text|p=84|ch=92|v=21|vt=24|e=1909|a=ROD|h=yes}}

"Quoted text" [Quran 92:21–24]

Example. Unavailable Translator ID
{{Quran ref|q=Quoted text|f=84|a=ZZZ|x=yes}}

"Quoted text" [ERROR: "ZZZ" ID is unknown.]

References

Example. Footnotes
<ref>{{Quran ref|q=Quoted text|f=84|a=ROD|x=yes}}</ref>

Some text [4]

Notes

  1. ^ Marmaduke Pickthall, The Meaning of The Glorious Koran. An Explanatory Translation, Alfred A. Knopf, New York, 1930
  2. ^ a b c d Chapters and verses are provided for informational purposes, the linking is done using "page", "translator" and "edition" parameters
  3. ^ If no translation were specified this one will be used.
  4. ^ "Quoted text" [Quran page 84, translated by Rodwell, 1861]