Tag Info

Accepted

Decide between Polyglossia and Babel for LuaLaTeX in 2019

Here's some reasons why I prefer babel over polyglossia for LuaLaTeX. babel's base is part of the LaTeX core packages actively developed, but polyglossia is only getting a few minor updates. babel's ...
• 23.7k

Decide between Polyglossia and Babel for LuaLaTeX in 2019

There are 79 language definition files (gloss-XX) in the polyglossia folder. For a thorough comparison you would have to compare for every language how good the gloss-file is, if it works with ...
• 293k
Accepted

Write a package that is aware of the mainlanguage selected in babel or polyglossia

There are several possibilities. I'll present four different ways. The first two use directly or indirectly the macros \captions<lang> or \extras<lang> which are provided both by babel and ...
• 64.5k
Accepted

I get tofu instead of Lepcha (tibeto-burmese script)

There are multiple issues here (and the error message isn't for the reason you guessed): fontspec does not know about Lepcha, polyglossia does not know about Lepcha either, but that is ok, your expex ...
• 42.5k
Accepted

Set hyphenation with polyglossia

As usual, in the example the lines are overfull on purpose, so as to force hyphenation. \documentclass{article} \usepackage{polyglossia} \setmainlanguage{nynorsk} \begin{hyphenrules}{nynorsk} \...
• 992k
Accepted

Polyglossia and hookrightarrow

The callback used by LuaTeX for inserting the penalties and spaces after punctuation should be disabled in math mode, but apparently it isn't. Workaround until a fix is shipped out: \documentclass{...
• 992k
Accepted

Prevent line break before :

There is a bug in gloss-french (or more precisely it hasn't been updated to the new xetex yet). The space/boundary has in the newer xetex versions another class. This avoids the break: \documentclass[...
• 293k

Remove space before punctuation

Probably Polyglossia should offer the possibility of disabling the automatic spacing feature for French in certain contexts such as monospaced text. However, here's how you can do it: \documentclass{...
• 992k
Accepted

Remove space before punctuation

This is another solution, without extra package. \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{french} \makeatletter \newcommand{\nospace}[1]{\nofrench@...
• 955
Accepted

How can I retrieve (and conditionally act on) the language of my document?

polyglossia stores the main language name in the macro \xpg@main@language, so it's easy to achieve what you want. Example: \documentclass{article} \usepackage{xstring} \usepackage{fontspec} \...
• 120k
Accepted

Uneven Line Spacing for Arabic Text using xelatex + memoir + plyglossia

What you are trying to do can be achieved but it will be difficult and frustrating. Questions tagged grid-typesetting contain many details on the matter. Long story short, (Xe)LaTeX is the wrong tool ...
• 3,594
Accepted

Turkish small cap dotted 'i' in footnote

Load the font with the Language=Turkish option: \documentclass[11pt]{memoir} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{turkish} \setmainfont{Linux Libertine O}[ Language=...
• 992k
Accepted

Beamer in arabic language doesn't accept footnotes

This is a solution. The option hyperfootnotes is the culprit of this behavior. So, when loading beamer, pass the option hyperfootnotes=false to hyperref, in this way: \documentclass[hyperref={...
• 120k
Accepted

Latin text not hyphenated at all with LuaLaTeX and polyglossia

It's a bug in gloss-latin.ldf that doesn't advertise the pattern file name for LuaLaTeX. Workaround: do it yourself. \documentclass{article} \usepackage{polyglossia} \setdefaultlanguage{english} \...
• 992k
Accepted

[Babel/Polyglossia]: wrong hyphenation?

while i agree that the hyphenation is unfortunate and wrong, i happen to have in my possession a printed copy of the dictionary from which the british hyphenation patterns were generated. (The Oxford ...
• 85.3k
Accepted

Polyglossia doesn't accent limits (lím) in Spanish

In my opinion, “lim” is a symbolic abbreviation for “limes” (Latin), just like “sin” is for “sinus”. The fact that the word is translated in various languages doesn't mean the symbol should follow. ...
• 992k
Accepted

How to obtain current language in polyglossia

I guess you are looking for something like this: \documentclass{article} \usepackage{polyglossia} \setdefaultlanguage{czech} \setotherlanguage{english} \begin{document} \iflanguage{czech}{czech}{no} ...
• 293k
Accepted

polyglossia or bidi bug: [\d\.] gets inverted to [\.\d]

bidi tests for \if@Latin, so you can get around the problem by setting it to true: \documentclass{book} \usepackage{polyglossia} \setotherlanguage{hebrew} \makeatletter\@Latintrue\makeatother \...
• 293k
Accepted

Problem with Polyglossia setting \textgreek after update to TeX Live 2018

fontspec recently changed the behaviour of \newfontfamily. \newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier \newfontfamily would behave like \setfontfamily behaves now. ...
• 159k

Underbrace using STIX2 math font

One should load the mathtools package before the fontspec and/or unicode-math packages. Note: Since the polyglossia package loads fontspec automatically, you should also take care to load mathtools ...
• 439k
Accepted

How to force equal spaces around French quotation marks?

You can tell babel-french to use «» for the guillemets, but there is also a “command form”. Note that whether you use spaces after « or before » is immaterial; however, remember “backslash-space” ...
• 992k
Accepted

Polyglossia ignores my custom hyphenation

It appears the main language is set up at begin document, it is still US English in the preamble, it works if you delay the setting: \documentclass{article} \usepackage{polyglossia} \...
• 668k
Accepted

How to determine which languages have been loaded by babel or polyglossia?

With babel: \documentclass{article} \usepackage[english,ngerman,russian]{babel} \begin{document} \makeatletter Loaded languages: \bbl@loaded \end{document} I don't see any code in polyglossia which ...
• 293k
Accepted

Modify specific Hebrew "Alpha" numerals on page number

It looks like \alph (or rather, \@alph) is redefined to use the macro \@hebrew@numeral, which produces these numbers. I'm redefining it to first look up if a number is bad and print something ...
• 10.4k

Turkish small cap dotted 'i' in footnote

I don't think it should be be needed but you can re-assert turkish in the footnote: \documentclass[11pt]{memoir} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{turkish} \...
• 668k

Is it possible to switch languages automatically without tags, in Polyglossia?

It is possible to do this with babel. This new preamble should work with your document, so long as you used \textenglish and \begin{sanskrit} instead of \devanagarifont. It requires luahbtex (...
• 37.9k

XeLaTeX: How to specify a different font family for Latin text within non-Latin text?

The package ucharclasses does this. For short insertions of text in other alphabets hyphenation shouldn't be a concern; for longer parts, using the various features of polyglossia is recommended. \...
• 992k
Accepted

XeLaTeX: How to specify a different font family for Latin text within non-Latin text?

Just set the font for the other language like you do for the main language, and then use \text<otherlang>{...} for small portions of that language or \begin{<otherlang>} ... \end{<...
• 202k