Contents
How to set the main language in Polyglossia?
polyglossia lets you set the main language of the document with setdefaultlanguage (default is English) and (possibly multiple) ‘other’ languages with setotherlanguages. (setmainlanguage is an alias of setdefaultlanguage.) If you expect to be using just one other foreign language you can use the singular setotherlanguage.
What kind of font is used in Polyglossia?
Because the document’s main (serif) font is FreeSerif, and FreeSerif contains glyphs for Latin, Cyrillic and Thai (and more!) scripts, fontspec and polyglossia can use it to render all these texts into the output PDF.
How to type multilingual documents on overleaf?
This article provides an overview of typesetting multilingual documents on Overleaf using the XeLaTeX (or LuaLaTeX) compiler in conjunction with the fontspec and polyglossia LaTeX packages.
How to write multilingual text in LaTeX using Babel?
These examples can be found in the Overleaf Gallery: How to Write Multilingual Text with Different Scripts in LaTeX on Overleaf and Multilingual “Thank-You”. Recent versions of babel support font selection with XeLaTeX using the \\babelfont mechanism; however, a suitable version of babel is not yet available on Overleaf.
How to type multiple languages in the same document?
The LaTeX code above produces the following output: Multiple languages/scripts in the same document: Introducing polyglossia If your document contains non-trivial amounts of text in multiple languages, the polyglossia package is helpful to help take care of language-specific typesetting conventions and hyphenation.
Which is the best font for multilingual typesetting?
The XeTeX and LuaTeX engines can directly read/process UTF-8 encoded text; consequently, they offer native support for Unicode—they can also work with TrueType and OpenType fonts directly. These properties make them a natural choice for typesetting multilingual or non-Latin documents in LaTeX, producing outputs like these:
Can a monospaced font be used in fontspec?
When using the fontspec package you might get away with only setting up a main (serif) font, a sans-serif font and probably a monospaced font designed to support the language you are typesetting—there’s a catch, but we’ll revisit that later in the article.