latex3 / babel

The multilingual framework to localize LaTeX, LuaLaTeX and XeLaTeX
https://latex3.github.io/babel/
LaTeX Project Public License v1.3c
130 stars 35 forks source link

Hyphenation for Marathi language #123

Closed niruvt closed 3 years ago

niruvt commented 3 years ago

If we compile the following minimal code, we get a document without any hyphenation, but the words are broken at the end of lines.

\documentclass{article}
\usepackage{babel}
\babelprovide[main]{marathi}
\usepackage{fontspec}
\setmainfont[Renderer=Harfbuzz,Script=Devanagari]{Shobhika}
% https://www.ctan.org/pkg/shobhika

\begin{document}
नमस्कार! हा मजकूर अर्थशून्य आहे. मोठमोठाल्या समासप्रचूर वाक्यरचना
वापरल्यामुळे लाटेक्-आज्ञावलीसह संयोगचिन्हे योग्यरीत्या कागदावर उमटणे ह्या
विषयाबाबतची माहिती मिळवण्याकरिता मजकुरामधील शब्दनिवड अशाप्रकारे
करण्यात आली आहे.
\end{document}

It can be observed in the following screenshot -

Screenshot_2021-03-16_20-46-51

The last word in the first line (of the output document) is broken. In the input it's the first word of the second line. As far as I can see, the spacing is correct, but we need the words to be hyphenated. How to achieve it?

Note: I have observed that removing the parameter main works for some reasons, but then the Marathi translations are not loaded. So as of now I don't think it is of any use.

u-fischer commented 3 years ago

I have no idea how the language handles hyphenation. The ini-file at least explicitly suppress the hyphenation char. You can reenable it with lualatex with

 \prehyphenchar=`\-

(it will perhaps error, it could trigger an open bug which is corrected in the newest luaotfload development version).

jbezos commented 3 years ago

It seems a bug (a bad setting in the ini file). I'll fix it, but in the meanwhile you can use:

\babelprovide[import, main, typography/prehyphenchar=`-]{marathi}

Or

\babelprovide[import, main, typography/prehyphenchar=]{marathi}
niruvt commented 3 years ago

Thanks for the suggestion. Before making any change, kindly look into the ongoing discussion in the issue linked above and then we can make all the relevant changes at once only.

jbezos commented 3 years ago

I much prefer to make changes gradually and as soon as I can, especially if they are clearly bugs easily fixable. This particular issue is fixed here (it will be released in a week or so) and I'm closing it.

niruvt commented 3 years ago

Thanks for the update :)

I much prefer to make changes gradually and as soon as I can, especially if they are clearly bugs easily fixable.

Do you want me to add separate issues for all the points that I mentioned in the other thread?

jbezos commented 3 years ago

Yes, please. Even if the language is the same, they are separate issues.