4

I am using xelatex, couldnt find out why I am not getting hyphens from the list I created. Is this because of my font (Brill), cause I used Times New Roman which renders with my hyphens. Who is to be blamed.

This is my minimal example:

\documentclass[12pt,a5paper]{memoir}
\usepackage[text={10.9982cm,17.01800cm},centering]{geometry}
\usepackage{polyglossia}
\setmainlanguage{english}
\setdefaultlanguage[variant=british]{english}
\setmainfont[Numbers=Lining,Ligatures=TeX]{Brill}
\hyphenation{Sat-chi-dā-nanda-tīr-tha Kriṣṇā-nan-da-tīr-tha Agni-mū-rdha Swāmi-gal}

\begin{document}

2. After him, Sadānandatīrtha Swāmi, and then Satchidānandatīrtha Swāmi
became pontiffs of the Maṭha. The third one was Śri Agnimūrdha
Kriṣṇānandatīrtha Swāmigal; since sparks of fire used to fly from his
head when he became angry, he came to be known as Agnimūrdha. (Iti.,  p 9).

\end{document}

output here

4

I think the font change here is probably a red herring: it's showing up the issue as it alters the width of the text, but doesn't actually cause it. XeTeX doesn't for some reason do a good job of showing hyphenation points in 'Satchidānandatīrtha', but if you try using LuaTeX you find that with your example as given you get

Satchidān-an-datīrtha

not the ones you requested. What then happens is that with Brill, which is quite narrow, none of those are near enough the end of the line for TeX to use them as a break point. The result is that no hyphenation occurs and the line is overfull.

If you either move \hyphenation after the beginning of the document or remove the \setdefaultlanguage line then all is well: all of the hyphenation points you set are valid. Thus what is happening is that you are changing language ((US) 'english' to 'british') after you've set up your custom hyphenations: these are language-specific so the ones you set do not apply in your text! I guess the surprise here is that the reset happens at the start of the document, not, as you might expect, when you use the \setdefaultlanguage command.

  • Thank you for the insight about whats happening. I omitted \setdefaultlanguage command. Now recognising my patterns. – Ramaprakasha Jun 12 '14 at 10:13
0

Use package babel instead of polyglossia:

\documentclass[12pt,a5paper]{memoir}
\usepackage{fontspec}
\setmainfont[Numbers=Lining,Ligatures=TeX]{Brill}
\usepackage[english,british]{babel}
\usepackage[text={10.9982cm,17.01800cm},centering]{geometry}

\hyphenation{Sat-chi-dā-nanda-tīr-tha Kriṣṇā-nan-da-tīr-tha Agni-mū-rdha Swāmi-gal}

\begin{document}

2. After him, Sadānandatīrtha Swāmi, and then Satchidānandatīrtha Swāmi
became pontiffs of the Maṭha. The third one was Śri Agnimūrdha
Kriṣṇānandatīrtha Swāmigal; since sparks of fire used to fly from his
head when he became angry, he came to be known as Agnimūrdha. (Iti.,  p 9).

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.