Template:Quran ref/doc

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  tags.

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:,  ,  ,  . If no translation is specified, the link defaults to the translation by Marmaduke Pickthall.

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.
 * chapter to, or, cht parameter is an integer representing the number of the last surah in the range.
 * 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.
 * verse to, or, vt parameter is an integer representing the number of the last ayah in the range.

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  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.

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


 * Example 2. Incorrect data type for the "page" URL parameter, falls back to "1" silently


 * Example 3. Page range


 * Example 4. Quote


 * Example 5. Quote with Chapter and Verse


 * Example 6. Quote with Chapter and Verse range


 * Example 7. Quote with Chapter range

Extended mode (x)
The same examples with  switch enabled.


 * Example 1x. Page only


 * Example 2x. Incorrect data type for the "page" URL parameter, falls back to "1" silently


 * Example 3x. Page range


 * Example 4x. Quote


 * Example 5x. Quote with Chapter and Verse


 * Example 6x. Quote with Chapter and Verse range


 * Example 7x. Quote with Chapter range

Inline mode (i)
The same examples with  switch enabled.


 * Example 1i. Page only


 * Example 2i. Incorrect data type for the "page" URL parameter, falls back to "1" silently

<pre class="mw-collapsible mw-collapsed">
 * Example 3xi. Page range

<pre class="mw-collapsible mw-collapsed">
 * Example 4xi. Quote

<pre class="mw-collapsible mw-collapsed">
 * Example 5xi. Quote with Chapter and Verse

<pre class="mw-collapsible mw-collapsed">
 * Example 6i. Quote with Chapter and Verse range

<pre class="mw-collapsible mw-collapsed">
 * Example 7i. Quote with Chapter range

Shorter mode (s)
The same examples with  switch enabled.

<pre class="mw-collapsible mw-collapsed">
 * Example 1is. Page only

<pre class="mw-collapsible mw-collapsed">
 * Example 2s. Incorrect data type for the "page" URL parameter, falls back to "1" silently

<pre class="mw-collapsible mw-collapsed">
 * Example 3xs. Page range

<pre class="mw-collapsible mw-collapsed">
 * Example 4xis. Quote

<pre class="mw-collapsible mw-collapsed">
 * Example 5xs. Quote with Chapter and Verse

<pre class="mw-collapsible mw-collapsed">
 * Example 6is. Quote with Chapter and Verse range

<pre class="mw-collapsible mw-collapsed">
 * Example 7s. Quote with Chapter range

Hidden pages mode (h)
The same examples with  switch enabled.

<pre class="mw-collapsible mw-collapsed">
 * Example 1sh. Page only

<pre class="mw-collapsible mw-collapsed">
 * Example 2ish. Incorrect data type for the "page" URL parameter, falls back to "1" silently

<pre class="mw-collapsible mw-collapsed">
 * Example 3xsh. Page range

<pre class="mw-collapsible mw-collapsed">
 * Example 4xish. Quote

<pre class="mw-collapsible mw-collapsed">
 * Example 5xsh. Quote with Chapter and Verse

<pre class="mw-collapsible mw-collapsed">
 * Example 6ish. Quote with Chapter and Verse range

<pre class="mw-collapsible mw-collapsed">
 * Example 7sh. Quote with Chapter range

Translators and Editions
<pre class="mw-collapsible mw-collapsed">
 * Defaults to PIC translator (Picthall) (+ extend)

<pre class="mw-collapsible mw-collapsed">
 * Defaults to the pre-defined edition (+ extend + short)

<pre class="mw-collapsible mw-collapsed">
 * Edition year can be set explicitly (+ extend + hidden pages)

<pre class="mw-collapsible mw-collapsed">
 * URL is generating correctly even if printout is the shortened (+ hidden pages)

<pre class="mw-collapsible mw-collapsed">
 * Example. Unavailable Translator ID