XeTeXIssue with Tibetan text justification in polyglossia

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
Frog
Posts: 3
Joined: Wed Nov 01, 2023 2:52 pm

Issue with Tibetan text justification in polyglossia

Post by Frog »

Hello,

Hopefully you can help me.

I am writing a bilingual text (English/Tibetan) with polyglossia. For some reason English text is fully justified while Tibetan is not. I have tried force-justifying it with \usepackage{ragged2e} \justifying, but with no success. Could you please help me?

Here is an example:

Code: Select all

\documentclass[12pt]{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{fontspec}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{setspace}
\usepackage{ragged2e}
\justifying

% Using \doublespacing in the preamble 
% changes text to double line spacing
\doublespacing
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{tibetan}

\newfontfamily\tibetanfont{Kailasa.ttf}[Path=./fonts/]
\newcommand{\tib}[1]{\texttibetan{\tibetanfont #1}}

\title{including tibetan text}
\date{April 2023}

\begin{document}

\maketitle


\section{Tibetan text}
\begin{tibetan}
\justifying
{བཀྲ་ཤིས་བདེ་ལེགས་ཛམ་གླིང།

\vspace{2cm} ཀློག་གི་རྩ་བ་བདེ་གཤེགས་སྐྱེས་པའི་སྒྲ་བཅོས་སྒྲིའི་ཚིག་སྔགས་ཡོད་དགའ་སྒྲིག་བསྒྱུར་བཅུགཔ་པའི་ལེན་མེད་སྟོན་པའི་བར་དོའིལམདབྱངས་གྱུར་ཅིག་གི་སྐྱེས་བུ་ཐམས་ཅད་དང་པོ་བཀོད་པར་སྒྲིལ་འདེབས་པའི་སྒྲ་བཤད་སྐྱེས་བུ་འབྲི་རྩིས་པའི་སྒྲ་བསྡུས་པའི་བྱ་སྤྱོད་པའི་སྒྲ་རྩ་བར་ཆད་པ་བསྡུར་སྐྱོན་པ་རྒྱུ་དང་བཅས་པའི་བསྒྲུབ་པའི་བར་ཆད་པའི་ལམ་དབྱངས་པའི་སྐྱེས་བུ་རྩ་བར་སྟོན་པའི་བར་ཆད་པ༏   ཀློག་གི་རྩ་བ་བདེ་གཤེགས་སྐྱེས་པའི་སྒྲ་བཅོས་སྒྲིའི་ཚིག་སྔགས་ཡོད་དགའ་སྒྲིག་བསྒྱུར་བཅུགཔ་པའི་ལེན་མེད་སྟོན་པའི་བར་དོའིལམདབྱངས་གྱུར་ཅིག་གི་སྐྱེས་བུ་ཐམས་ཅད་དང་པོ་བཀོད་པར་སྒྲིལ་འདེབས་པའི་སྒྲ་བཤད་སྐྱེས་བུ་འབྲི་རྩིས་པའི་སྒྲ་བསྡུས་པའི་བྱ་སྤྱོད་པའི་སྒྲ་རྩ་བར་ཆད་པ་བསྡུར་སྐྱོན་པ་རྒྱུ་དང་བཅས་པའི་བསྒྲུབ་པའི་བར་ཆད་པའི་ལམ་དབྱངས་པའི་སྐྱེས་བུ་རྩ་བར་སྟོན་པའི་བར་ཆད་པཀློག་གི་རྩ་བ་བདེ་གཤེགས་སྐྱེས་པའི་སྒྲ་བཅོས་སྒྲིའི་ཚིག་སྔགས་ཡོད་དགའ་སྒྲིག་བསྒྱུར་བཅུགཔ་པའི་ལེན་མེད་སྟོན་པའི་བར་དོའིལམདབྱངས་གྱུར་ཅིག་གི་སྐྱེས་བུ་ཐམས་ཅད་དང་པོ་བཀོད་པར་སྒྲིལ་འདེབས་པའི་སྒྲ་བཤད་སྐྱེས་བུ་འབྲི་རྩིས་པའི་སྒྲ་བསྡུས་པའི་བྱ་སྤྱོད་པའི་སྒྲ་རྩ་བར་ཆད་པ་བསྡུར་སྐྱོན་པ་རྒྱུ་དང་བཅས་པའི་བསྒྲུབ་པའི་བར་ཆད་པའི་ལམ་དབྱངས་པའི་སྐྱེས་བུ་རྩ་བར་སྟོན་པའི་བར་ཆད་པཀློག་གི་རྩ་བ་བདེ་གཤེགས་སྐྱེས་པའི་སྒྲ་བཅོས་སྒྲིའི་ཚིག་སྔགས་ཡོད་དགའ་སྒྲིག་བསྒྱུར་བཅུགཔ་པའི་ལེན་མེད་སྟོན་པའི་བར་དོའིལམདབྱངས་གྱུར་ཅིག་གི་སྐྱེས་བུ་ཐམས་ཅད་དང་པོ་བཀོད་པར་སྒྲིལ་འདེབས་པའི་སྒྲ་བཤད་སྐྱེས་བུ་འབྲི་རྩིས་པའི་སྒྲ་བསྡུས་པའི་བྱ་སྤྱོད་པའི་སྒྲ་རྩ་བར་ཆད་པ་བསྡུར་སྐྱོན་པ་རྒྱུ་དང་བཅས་པའི་བསྒྲུབ་པའི་བར་ཆད་པའི་ལམ་དབྱངས་པའི་སྐྱེས་བུ་རྩ་བར་སྟོན་པའི་བར་ཆད་པཀློག་གི་རྩ་བ་བདེ་གཤེགས་སྐྱེས་པའི་སྒྲ་བཅོས་སྒྲིའི་ཚིག་སྔགས་ཡོད་དགའ་སྒྲིག་བསྒྱུར་བཅུགཔ་པའི་ལེན་མེད་སྟོན་པའི་བར་དོའིལམདབྱངས་གྱུར་ཅིག་གི་སྐྱེས་བུ་ཐམས་ཅད་དང་པོ་བཀོད་པར་སྒྲིལ་འདེབས་པའི་སྒྲ་བཤད་སྐྱེས་བུ་འབྲི་རྩིས་པའི་སྒྲ་བསྡུས་པའི་བྱ་སྤྱོད་པའི་སྒྲ་རྩ་བར་ཆད་པ་བསྡུར་སྐྱོན་པ་རྒྱུ་དང་བཅས་པའི་བསྒྲུབ་པའི་བར་ཆད་པའི་ལམ་དབྱངས་པའི་སྐྱེས་བུ་རྩ་བར་སྟོན་པའི་བར་ཆད་པ}
\end{tibetan}་I can now write in English \footnote{And cite in Tibetan \begin{tibetan}{རེད། ང་བདེ་པོ་ཡིན།}\end{tibetan}}



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer non imperdiet diam. Etiam ipsum nulla, laoreet in est non, pellentesque ultrices ligula. Curabitur convallis metus nec nibh tincidunt maximus sit amet quis nunc. In at nibh et sem lacinia vulputate ac rhoncus diam. Sed non mauris in nibh efficitur venenatis. Duis nibh nunc, elementum eget tristique congue, ultrices in nulla. Ut aliquam sapien ac tortor fringilla, vel feugiat turpis tincidunt. In eget consectetur lacus, a gravida nisl. Ut laoreet laoreet dolor, et efficitur ex iaculis sit amet. Aliquam erat volutpat. Aenean vel iaculis mauris. Donec hendrerit tortor id justo ultrices. 


\end{document}

Thanks in advance for your help!

Frog
Last edited by Stefan Kottwitz on Wed Nov 01, 2023 10:51 pm, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
jiyahana

Issue with Tibetan text justification in polyglossia

Post by jiyahana »

One approach you can try is to explicitly set the justification for the Tibetan text by using the \begin{RaggedRight} or \begin{RaggedLeft} environment in your code. Another option is to check if there are any specific font settings in Polyglossia that might affect how the Tibetan text is rendered. It might also help to experiment with different fonts that support Tibetan script better.
Post Reply