TeX - LaTeX Asked by Kedar Mhaswade on July 1, 2021
Sanskrit, and one of its derivatives, Marathi, have a rich literary history of various poetic metres. Like several other languages, they have notations for the short vowel, the long vowel, and the pause to annotate the lines of a metrical poem that aids its recitation. See below for an example in which the short vowels are shown (for clarity) in red squares, long vowels in green squares, and pauses in blue squares. Such an annotation, which is simply a sequence of these symbols, could be placed above or below the text. In the example shown, the annotation is placed above the text.
I see a metre
package in CTAN that has some similarities (e.g. Ties) with the symbols I am looking for, but they are not the same.
Has anyone attempted to standardize these for Sanskrit in LaTeX
? If not, how may one go about it? I am not yet too well-versed with the development of a package.
Short and long are in metre
package (it uses OT1 encoding, though). A pause could be added, with more or less work according to which font/glyph it should be.
The much more recent metrix
package also has long and short. It is built on TikZ and has many commands, settings and options.
MWE
documentclass[12pt]{article}
usepackage[table]{xcolor}
usepackage{fontspec}
usepackage{metre}
usepackage{metrix}
setmainfont{Noto Serif}
newfontfacefdeva{Noto Sans Devanagari}[Script=Devanagari,Renderer=HarfBuzz]
tikzset{
every metrix syllable node/.append style={font=fdeva},
}
begin{document}
begin{tabular}{ll}
rowcolor{blue!5}
bfseries Package & bfseries Example
hline
& fdeva दयानिधी
&
metre & fdeva begin{metrica} -द={या}-{नि}={धी} end{metrica}
&
metrix & metrics[2+4={colored highlight}]{u _ u _ }{द-या-नि-धी}
metrix &
tikzset{every superscript picture/.style={
baseline=1ex,
}}
setmetrixvar{symbolshift}{-0.6em}
metrics[2=colored highlight,4={colored highlight,superscript=^^^^030b}]{u _ u _ }{द-या-नि-धी}
&
hline
end{tabular}
end{document}
metrix
has a pause (a ,
input produces |
) but is ignored at the end of strings (for obvious reasons), so the one word example is not long enough.
Addendum
Glyph U+030B (combining double acute accent), raised or lowered as appropriate, could function as a placeholder for the pausemark, until a standard one is designed.
MWE
documentclass[12pt]{article}
usepackage[table]{xcolor}
usepackage{fontspec}
usepackage{metre}
usepackage{metrix}
setmainfont{Noto Serif}
newfontfacefdeva{Noto Sans Devanagari}[Script=Devanagari,Renderer=HarfBuzz]
newcommandpausemark{lower2.3emhbox{^^^^030b}}
tikzset{
every metrix syllable node/.append style={font=fdeva},
}
begin{document}
begin{tabular}{ll}
rowcolor{blue!5}
bfseries Package & bfseries Example
hline
& fdeva दयानिधी
&
metre & fdeva begin{metrica} -द={या}-{नि}={धी} end{metrica}
&
metrix & metrics[2=colored highlight,4={colored highlight,superscript={pausemark}},9={superscript={pausemark}}]{u _ u _ u u u u _}{द-या-नि-धी ल-ल ल-ल-ला}
metrix &
tikzset{every superscript picture/.style={
baseline=1ex,
}}
setmetrixvar{symbolshift}{-0.6em}
metrics[2=colored highlight,4={colored highlight,superscript=^^^^030b}]{u _ u _ }{द-या-नि-धी}
&
hline
end{tabular}
end{document}
Correct answer by Cicada on July 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP