Sanskrit text not justifying through ragged2e's justify environment
i've input some sanskrit text, and it's my default language, but when i justify it using ragged2e's justify environment, it stays left-aligned. what do i do?
\documentclass[10pt, a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{sanskrit}
\begin{justify}
श्रीभगवानुवाच।\\
ऊर्ध्वमूलमधःशाखम्अश्वत्थंप्राहुरव्ययम्।\\
छन्दांसियस्यपर्णानियस्तंवेदसवेदवित्॥१॥
\end{justify}
Please always give fully working examples, yours is incomplete:
\documentclass[10pt, a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{sanskrit}
\setmainfont[Script=Devanagari]{Noto Sans Devanagari}
\usepackage{ragged2e}
\begin{document}
\begin{justify}
श्रीभगवानुवाच।\\
ऊर्ध्वमूलमधःशाखम्अश्वत्थंप्राहुरव्ययम्।\\
छन्दांसियस्यपर्णानियस्तंवेदसवेदवित्॥१॥
\end{justify}
\end{document}
Anyway, compiling that I am not sure what you are expecting. I get (except for the missing indentation) the same output as when being in normal (justified) context:
And this output is also what I would expect here. Note particularly that lines ended with \\ and the last lines in paragraphs are not stretched in justified context.
apologies for missing the usepackage line.
i was hoping for a justified centered text, like in poem format, and i wasn't sure why only the first line was being repositioned. i did not know about \, thank you! i will check it out