Module:RQ:pi:DN3 cty
- The following documentation is located at Module:RQ:pi:DN3 cty/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:DN3 cty}}
) used to identify the source to the reader and format the quote, its transliteration and its translation.
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:DN3 cty quote|4|catukkundikoti|6}}
; this example produces the text:
- Catukkuṇḍikoti catusaṅghaṭṭito dve jāṇūni dve ca kappare bhūmiyaṁ ṭhapetvā vicarati.
- 'Catukkuṇḍiko': He moves with four points of contact, having placed two knees and two elbows on the ground.
There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:DN3 cty}}
directly for that purpose.
local data = {}
data.reference = "RQ:pi:DN3 cty"
data[4] = {
catukkundikoti = {
"<u>{1-Catukkuṇḍikoti}</u> {2-catusaṅghaṭṭito} {3-dve} {4-jāṇūni} {3-dve} {5-ca} {6-kappare} "..
"{7-bhūmiyaṁ} {8-ṭhapetvā} {9-vicarati}.",
"",
"{1-'Catukkuṇḍiko':} {9-He moves} {2-with four points of contact}, {8-having placed} {3-two} "..
"{4-knees} {5-and} {3-two} {6-elbows} {7-on the ground}."
},
}
return data;