Changes

Jump to navigation Jump to search
m
no edit summary
Some users of ConTeXt (mainly in Humanities) are sometimes led to introduce different languages into a text mainly written in a Romance language (English, Spanish, French, Dutch, German, Italian, etc.). In a text in a European Latin language, the best way to switch from one language to another is to use the command :
 
{{cmd|\definefallbackfamily}}
==How to achieve it ==
===Mainlanguage===
If you want to use several languages, you need to ask ConTeXt which language you want to switch to for each of them. In the preamble, write the main language of the text and the languages you want to switch to. For example, our text is written mainly in English. We want to comment on a text in Ancient Greek, but in the course of the commentary we want to make references to texts in Arabic and Chinese. So, as a basic preamble, we would have something like this:
 
{{cmd|\setuplanguage}}[en][patterns={en,agr}]
Then, after the {{cmd|\setuplanguage}} command, you have to precise which main language you want to use. Here, this is English, which language is setup by this command :
 
{{cmd|\mainlanguage}}[en]
ConTeXt now understands that you will be using English and Ancient Greek. But you need to give it the right fonts to achieve this goal, bearing in mind that English and Ancient Greek do not use the same glyphs, even though some font families, such as TeX Gyre Pagella, are very versatile. So now you need to place the command for the Ancient Greek text. You will need to check that these fonts are available on your system. Refer to the Wiki page on installing and checking fonts, bearing in mind that installing them on your system from the Internet is not enough: they must also be supported by \ConTeXt. You can pass the following command in a console, in order to list all the installed fonts on your system :
 
{{cmd|mtxrun}} --script fonts --list --all
48

edits

Navigation menu