9

My question is about adding a new language into LaTeX: the Tajik language.

There is Russian language support in LaTeX and Russian is written using a modified version of the Cyrillic alphabet. Tajik is also written in the Cyrillic alphabet and its orthography is very close to Russian.

So, how can I add Tajik language support in LaTeX? Is there any manual about adding new languages into LaTeX?

Thank you

Caramdir
  • 89,023
  • 26
  • 255
  • 291
Bakhtiyor
  • 357
  • 3
    The question “Cyrillic in (La)TeX” might get you started. There doesn't seem to be Tajik support in Babel, but maybe Russian with a few translation changes does the trick (\def\chaptername{...}, etc.; see pages 295/296 of the babel documentation for a list of strings to define). – Caramdir Mar 04 '11 at 17:14
  • 2
    I updated the top answer in the link “Cyrillic in (La)TeX”; it had some inaccuracies. XeLaTeX is definitely the way to go with this project. – Alan Munn Mar 04 '11 at 18:03

3 Answers3

10

Basic language support is usually implemented in a language definition file for the babel (for LaTeX/LuaLaTeX) or polyglossia (for XeLaTeX) packages. You could start by looking at existing language definition files, in particular, the ones for the Russian language to see how Cyrillic font setup is handled.

You should do at least the following things to add the language support:

  • Handle font setup for the language alphabet
  • Provide word hyphenation rules for the language
  • Translate common names and titles used in LaTeX, such as \chaptername
  • Provide support for language- or country-specific punctuation and typesetting rules
Andrey Vihrov
  • 22,325
2

Babel provides currently a minimal tentative locale which can be used with little effort with XeLaTeX and LuaLaTeX. [Edit. Currently the locale for Tajik is bundled with the standard distribution, so the following step is no longer necessary.] Download the files under the directory for the Tajik locale in the babel GitHub repository and move them to a place where LaTeX can find them (eg, in the same folder as the document). Stay tuned to the messages in the log file explaining how to declare captions, if you need them.

\documentclass{article}

\usepackage[tajik, provide=*]{babel} \babelfont{rm}{FreeSerif}

\begin{document}

Абӯалӣ Сино дар рушди илми тибсаҳми бениҳоят арзандае гузоштааст, ки аз таҷрибаҳои худ, илми пизишкии олими грек Гален, метафизикаи Арасту (Сино яке аз шарҳдиҳандагони асосии Арасту буд), илми пизишкии Форс, Байнаннаҳрайн ва Ҳинди қадима сарчашма гирифта, онҳоро ҳамҷоя андӯхтааст.

\end{document}

enter image description here

Sadly, it seems no hyphenation patterns are currently available.

Feel free to contribute to the improvement of this locale (or any other).

Javier Bezos
  • 10,003
1

And today I have found out another way to make LaTeX understand Tajik language. I achieved that using two packages: inputenc with utf8 option and fontenc with T2A(or T2B, but not T2C) option.

\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}

LaTeX is really great!

Bakhtiyor
  • 357