How can I format verses with a counter assigned to them?
I am working on a book that requires formatting verses (in Devanagari and Roman transliteration) in a specific way. Please see the image below for the sample format that I need to achieve:
What I need
- I need the numbers to be automatically assigned, through some counter.
- The number corresponding to the verse can be typeset either on the left side or the right side.
- Each verse has text and transliteration in 3 languages/scripts (see the sample text below), and the verse number should be displayed in the respective script at the end of each verse. (Each verse will be printed individually on a separate page.) As in the example image, verses belonging to one chapter need to be numbered sequentially. In a similar way, all 18 chapters of the Bhagavad Gita are to be laid out in the form of a pocket sized book.
Specs: TexLive 2020 Debian 11, XeLaTeX.
Possibilities I've thought of
Place each verse in a section of its own. The counter will be that of the
sectionnumber. Usetitlesecpackage to achieve the desired formatting.Define a new counter that would increment at every subsequent instance and place the number and the verse in a
tabularenvironment to achieve the desired formatting.
Even though these are my initial thoughts, I really don't know how to put it in the code. I can try titlesec, though. But if there is some intuitive way to achieve my needs, that would be very helpful.
Sample texts
Here are some sample texts, if anyone is interested in using them to suggest a MWE.
**TEXT 11**
ಯದಕ್ಷರಂ ವೇದವಿದೋ ವದಂತಿ
ವಿಶಂತಿ ಯದ್ಯತಯೋ ವೀತರಾಗಾ:
ಯದಿಚ್ಛಂತೋ ಬ್ರಹ್ಮಚರ್ಯಂ ಚರಂತಿ
ತತ್ತೇ ಪದಂ ಸಂಗ್ರಹೇಣ ಪ್ರವಕ್ಷ್ಯೇ ೧೧
यदक्षरं वेदविदो वदन्ति
विशन्ति यद्यतयो वीतरागा: ।
यदिच्छन्तो ब्रह्मचर्यं चरन्ति
तत्ते पदं सङ्ग्रहेण प्रवक्ष्ये ॥ ११ ॥
yad akṣaraṁ veda-vido vadanti
viśanti yad yatayo vīta-rāgāḥ
yad icchanto brahma-caryaṁ caranti
tat te padaṁ saṅgraheṇa pravakṣye

versepackage may be of some help. – Peter Wilson Jan 08 '22 at 18:12polyglossiacan help here), (3) The actual typesetting of the verse (or rather the three verses) on each page (theversepackage can help here). Is that right? Have I missed anything? – ShreevatsaR Jan 11 '22 at 14:23