Template:Q/documentation


 * See also: Template:Ԛ (the Cyrillic letter Qa)

This module allows for easier and more consistent formatting of quotations, designed especially for the requirements of classical and ancient languages. It uses Module:Quotations as a back-end.

Parameters

 * 1
 * The language of the quotation.


 * 2
 * The name of the author. If the author is listed in the relevant data module (for example, Module:Quotations/grc/data for Ancient Greek), the name will automatically link to a Wikipedia article.


 * 3
 * The title of the work. If the work is listed in the relevant data module (for example, Module:Quotations/grc/data for Ancient Greek), the title will automatically link to a Wikipedia article (if one exists), and there will also be a link to the work on Wikisource (if it exists there).


 * 4, 5, 6, 7, 8
 * The reference of the text within the work, with chapters, verses, subverses, etc. each added in a separate parameter, using as many (or as few) as are needed.


 * thru
 * Used to specify a range, so if the passage is 1:120–122, use.


 * quote
 * The actual text.


 * year
 * The year or range of years of the work. This will be automatically filled in if the title is listed in the data module as above.


 * t or trans
 * An English translation of the text.


 * transyear
 * The year of the translation.


 * transauthor
 * The author of the translation.


 * tr
 * A manual Latin transliteration for quotes in non-Latin script; often unnecessary, as many languages automatically transliterate.


 * ts
 * Transcription for non-Latin-script text whose transliteration is markedly different from the actual pronunciation. Should not be used for IPA pronunciations.


 * lit
 * A literal translation.


 * notes
 * Parentheses enclosed information after the reference.


 * object
 * The object or artifact on which the work is found, e.g. for ancient papyri or tombs.


 * refn
 * To include references or links to a source for the quotation, such as a book or external site. They can be enclosed in  tags or.


 * form
 * Determines the amount of information presented. The default is, which displays all information.   skips the year, quote, and translation,   further trims the author, and   further eliminates the work, leaving only the chapter and verse(s).


 * style
 * Determines the format of the work’s title. The default is  (italicized). Other possible values are   (unformatted) and   (enclosed in quotation marks).


 * subst
 * Substitutions to be applied to handle irregular transliterations in certain languages (e.g. Russian, Yiddish, Hindi). If specified, should be one or more substitution expressions separated by commas. Each substitution expression is of the form  (  is also accepted), where   is the source text as found in the quote, and   is the corresponding respelling in the source script (e.g. Cyrillic, Hebrew or Devanagari). The substitutions are applied in order and before transliteration. The idea is to phonetically respell words with irregular transliteration so that the transliteration comes out correctly, without the need to manually transliterate the entire quote using tr. Note that   and   are actually Lua patterns (see WT:LUA). This means, for example, that a hyphen in the source text needs to be "escaped" by writing it as  . See below for an example of using this parameter. Other examples may be found in the documentation for  and.

With the exception of the first parameter, all parameters are optional; the template/module is designed to work around whatever information is given.

Operation
The module accesses language-specific libraries of information on works and authors, and if the information is coded, will add formatting to the quote, such as linking the author and/or work, as well as linking to the relevant text. If no information can be found on the information given, it will simply display it with basic text formatting. Thus the following code results in the following displays:

&rarr;

&rarr;

Here is a full list of language-specific libraries in the Module: namespace. The libraries end in /data.

Examples
Wikitext (with subst=) #*

Output (with subst=)

Here, a substitution is used to force अपरिचित to be transliterated as aparicit instead of the default apricit.