Module:RQ:pi:PTS Samyutta Nikaya 3
- The following documentation is located at Module:RQ:pi:PTS Samyutta Nikaya 3/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module is a data module providing a catalogue of passages from one particular book or article for each passage to demonstrate the existence of multiple Pali words. The modules returns a 3-D array (technically a Lua table), indexed as follows:
- The outer index is the page number.
- The second index is a character string serving as the name of the passage within the page - using the first word is the simplest scheme.
- The third index is an element number - the text (item 1), its transliteration (item 2) (optional) and its translation (item 3).
The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:PTS Samyutta Nikaya 3}}
) used to identify the source to the reader and format the quote, its transliteration and its translation.
The table structure allows fields lang
, p1
and p2
for uninterpreted passage to the reference template to customise its output. This particular module's table uses p1
as the name of the portion of the Samyutta Nikaya andp2
as the name and numbering of the book, vagga and sutta in the PTS edition. The field applied to the innermost of the passage, page and table is the value passed on.
The intention is that the word will be highlighted when selected by these three indices. Words are assigned positive numbers and their boundaries are marked up in the form {number-word}. This mark up can be nested, so that words may contain other words. Different sections may have the same number; this allows for repeated words, overlapping words, and discontiguous translations.
The words are transcluded into a page using an invocation of the form {{RQ:pi:PTS Samyutta Nikaya 3 quote|18|katham|5}}
; this example produces the text:
- Kathaṃ ca bhikkhave anupādā aparitassanā hoti.
- And how, mendicants, does not grasping lead to freedom from anxiety?
There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:PTS Samyutta Nikaya 3}}
directly for that purpose.
local data={reference="RQ:pi:PTS Samyutta Nikaya 3"}
local book_g = "Khanda-Saṃyuttaṃ"
local book = "XXII (Book 1), Section 1 Mulapaññāsa"
local chap = "Chapter 1 Nakulapitā-Vaggo Pathamo"
local sutta = "Sutta 7 Upādāparitassanā"
data[15] = {
p1 = book_g,
p2 = book .. ', ' .. chap .. ', ' .. sutta,
upadaparitassanam = {
"{1-{9-{11-upādā}}{10-{12-paritassanaṃ}}} {2-ca} {3-vo} {4-bhikkhave} {5-dessissāmi} "..
"{6-{7-{13-an}{11-upādā}}-{8-{13-a}{12-paritassanaṃ}}} {2-ca}",
"",
"{4-Mendicants}, {5-I will teach} {3-you} {5-how} {1-{11-grasping leads to} {12-anxiety}}, "..
"{2-and} {5-how} {6-{7-{13-not} {11-grasping leads to}} {8-{13-freedom from} {12-anxiety}}}."
}
}
sutta = "Sutta 8 Upādāparitassanā (2)"
data[18] = {
p1 = book_g,
p2 = book .. ', ' .. chap .. ', ' .. sutta,
katham = {
"{1-Kathaṃ} {2-ca} {3-bhikkhave} {9-{4-{5-an}{6-upādā}} {5-a}{7-paritassanā}} {8-hoti}.",
"",
"{2-And} {1-how}, {3-mendicants}, {8-does} {9-{4-{5-not} {6-grasping}}} {8-lead to} "..
"{9-{5-freedom from} {7-anxiety}}?",
}
}
return data