Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanskrit text not justifying through ragged2e's justify environment #666

Closed
kae-vm opened this issue Oct 31, 2024 · 2 comments
Closed

Sanskrit text not justifying through ragged2e's justify environment #666

kae-vm opened this issue Oct 31, 2024 · 2 comments

Comments

@kae-vm
Copy link

kae-vm commented Oct 31, 2024

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}

image

@jspitz
Copy link
Collaborator

jspitz commented Nov 1, 2024

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:
grafik

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.

@kae-vm
Copy link
Author

kae-vm commented Nov 4, 2024

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

@kae-vm kae-vm closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants