# Tag Info

35

The relationship between babel and polyglossia with respect to XeTeX is complicated. The general rule of thumb is that if the babel .ldf file uses non-Latin scripts, then you should use polyglossia and generally can't use babel but if it assumes Latin scripts, you may still be able to use babel. With respect to your specific question, about Russian, it's ...

25

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 RTL and BiDi support is really nice for LuaLaTeX now. But polyglossia only supports RTL text with XeLaTeX. babel's new ini system for setting up languages is ...

21

If using LuaLaTeX rather than XeLaTeX is an option for you -- fortunately, Lua(La)TeX and polyglossia have started playing nice with each other, beginning a few months ago -- you may achieve your goal as follows. First, define an "OpenType feature file", such as # Scripts and languages # If the font uses others, they should be defined here too ...

21

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 polyglossia. babel says the following about those two: \captions<lang> : The macro \captions<lang> defines the macros that hold the texts to ...

17

In general, I advise against using bold and slanted in Arabic for emphasis: they work poorly in Arabic, especially the slant which is not always as visible and is quite alien to Arabic typesetting traditions. (Even though my own Amiri font has them, they are there to avoid the fake bold and slanted synthesized by GUI applications which are very very poor and ...

17

There are 79 language definition files (gloss-XX) in the polyglossia folder. For a thorough comparision you would have to compare for every language how good the gloss-file is, if it works with lualatex, if babel provide definitions for this language too and how good it works with lualatex. And naturally you also need to check if babel knows language which ...

16

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 syntax isn't correct. fontspec The package fontspec lets you use any font (installed on your computer) in the (now) standard OpenType format (such as Noto ...

14

This is due to a polyglossia update in TL 2013 which broke the ability of biblatex to patch a babel compat macro which polyglossia uses. The development version of biblatex (2.7) fixes this and will be released soon. Bear in mind that biblatex doesn't fully support polyglossia anyway (only babel at the moment). EDIT - Joseph Wright of the biblatex team has ...

13

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{article} \usepackage{ifluatex} \usepackage{polyglossia} \setdefaultlanguage{french} \ifluatex \makeatletter \let\latex@lhook\lhook \renewrobustcmd{\lhook}...

12

I'm adding another answer as biblatex 3.0+biber 2.0 are now in experimental release and have a different solution to this. You can now make a test.bib file like this: @COLLECTION{yanagida_zengaku_sosho_1975, LANGID = {japanese}, EDITOR = {柳田聖山}, EDITOR_romanised = {Yanagida, Seizan}, TITLE = {禪學叢書}, TITLE_romanised = {Chūbun shuppansha}, ...

12

The default font for fontspec is Latin Modern; by itself, XeLaTeX doesn't change the standard font layout of LaTeX. Now to your questions. Don't trust screenshots too much. This is what I get with pdflatex and this is what I get with xelatex The source file is \documentclass{article} \usepackage{ifxetex} \ifxetex \usepackage{fontspec} \usepackage{...

12

You have to define a symbol font and assign a math code to the Armenian letters. Here's how one could do it; it's important that the code is just after the \newfontfamily command. You can use another font, provided it has the required glyphs. Probably the best approach is to use a different name altogether, maybe pointing to the same font: \documentclass[...

12

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} \hyphenation{fram-halds-skulen} \end{hyphenrules} \begin{document} \parbox{0pt}{\hspace{0pt}framhaldsskulen} \end{document} Use the same trick of \begin{...

12

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[12pt]{memoir} \usepackage{polyglossia} \setdefaultlanguage{french} \makeatletter \XeTeXinterchartoks 4095 \french@punctthin = {\xpg@unskip\nobreak\thinspace}% \...

11

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{article} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{xpatch} \setmainlanguage{french} \xapptocmd\ttfamily{\XeTeXinterchartokenstate=0 }{}{} \...

11

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} \usepackage{polyglossia} \setmainlanguage{turkish} \makeatletter \newcommand{\mainlanguage}{\xpg@main@language} \makeatother \begin{document} This document is ...

11

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 for grid typesetting: you would have to eliminate any glue and set every dimension to a multiple of the grid step. You can only do this manually, and every ...

11

Load the font with the Language=Turkish option: \documentclass[11pt]{memoir} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{turkish} \setmainfont{Linux Libertine O}[ Language=Turkish, BoldFont=* Semibold, BoldItalicFont=* Semibold Italic, ] \setlength{\textheight}{2cm} \begin{document} In Turkish, \textsc{ı}' and \textsc{i}' ...

10

This is another solution, without extra package. \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{french} \makeatletter \newcommand{\nospace}[1]{\nofrench@punctuation\texttt{#1}\french@punctuation} \makeatother \begin{document} \nospace{a:b} \end{document} Thanks all.

10

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={hyperfootnotes=false},10pt]{beamer} At this point, however, footnotes won't be printed... To avoid that, we need to add the following lines in the preamble: \...

10

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. So, in my opinion, using “lím” is plainly wrong, just like using “sen” as done by almost all Italian school books (later, students learn it's written “sin”). Of ...

10

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 \begin{document} 6. \end{document} Edit Februar 2017 \if@Latin is no longer in bidi (v20.9). The work-around is also no longer necessary. The example compiles fine ...

10

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. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation). As David Carlisle explains in the comments \textgreek ...

9

You should use $$S_\textup{ном.} = S_{123}$$ because that's text. You can consider using unicode-math instead of mathtext \usepackage{amsmath} \usepackage{unicode-math} \setmainfont{Times New Roman} \setmathfont{XITS Math} % \newfontfamily\cyrillicfont{Times New Roman} \usepackage{polyglossia} \setdefaultlanguage{russian} ...

9

This can be solved by loading setspace after polyglossia. It's not a bug: since setspace and bidi (loaded by polyglossia for RTL languages) both mess with the footnotes, you need to let bidi do its work and then let setspace do its. % !TEX TS-program = XeLaTeX \documentclass{article} \usepackage{polyglossia} \setmainlanguage{english} \setotherlanguage{...

9

biblatex has removed the support for polyglossia (probably because of a bug which appeared some time ago). Either use \usepackage[ngerman]{babel} (it will work fine with XeLaTeX/luaLaTeX), or use language=german in the options of biblatex.

9

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} \setmainlanguage[variant=uk]{english} \begin{document} \hyphenation{a-bun-dance} A abundance abundance abundance abundance abundance abundance abundance abundance abundance ...

9

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} \setotherlanguage[variant=classic]{latin} \setotherlanguage{italian} \makeatletter \def\latin@language{% \language=\l@classiclatin \xpg@set@language@luatex@...

9

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 Minidictionary of Spelling and Word Division, the clarendon press, 1986) it contains the word, divided as reported. here is the relevant page. two levels ...

9

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 would give such a list, so one would probably have to patch polyglossia, or you could make a feature request. Addition I now tested also some variants. ...

Only top voted, non community-wiki answers of a minimum length are eligible