Шаблон:Q/док
- 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
|3=1|4=120|thru=122
. |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
<ref>
tags or{{refn}}
. |form=
- Determines the amount of information presented. The default is
full
, which displays all information.inline
skips the year, quote, and translation,work
further trims the author, andref
further eliminates the work, leaving only the chapter and verse(s). |style=
- Determines the format of the work’s title. The default is
i
(italicized). Other possible values areno
(unformatted) andq
(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
FROM//TO
(FROM/TO
is also accepted), whereFROM
is the source text as found in the quote, andTO
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 thatFROM
andTO
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{{usex}}
and{{quote}}
.
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:
{{Q|grc|Homer|Iliad|1|23}}
→ Homer, Iliad 1.23
{{Q|grc|Author|Work|Chapter 1|Verse 2}}
→ Author, Work Chapter 1.Verse 2
Here is a full list of language-specific libraries in the Module: namespace. The libraries end in /data.
Examples
[уреди]Wikitext (with subst=)
#* {{Q|hi|Premchand|Aatmaaraam|quote=उस धुँधले प्रकाश में उसका जर्जर शरीर, पोपला मुँह, और झुकी हुई कमर देखकर किसी '''अपरिचित''' मनुष्य को उसके पिशाच होने का भ्रम हो सकता था।|trans=In that dimmed light, his aged body, toothless mouth, and hunched-over waist might cause a '''stranger''' to mistake him for an evil spirit.|subst=अपरिचित//अप*रिचित}}
Output (with subst=)
- package.lua:80: module 'Module:Quotations/hi' not found
Here, a substitution is used to force अपरिचित to be transliterated as aparicit instead of the default apricit.