The Stack Overflow podcast is back! Listen to an interview with our new CEO.

# 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 ...

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 ...

19

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 ...

18

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 ...

17

Use xkeyval package before polyglossia package like this: \usepackage{xkeyval} \usepackage{polyglossia} This is a bug of polyglossia. Update This bug has been fixed in v1.2.0b of polyglossia, so you should no longer need to load the xkeyval package manually (although doing so will cause no problems.)

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 ...

15

I've discussed this with the biblatex maintainer and we will probably aim for a style implementation of this with biblatex 3.x. With 1.7/0.9.6, the following will be possible. You will have to use the experimental biblatexml datasource format for such entries (you can still have all of your normal entries in bibtex format). <?xml version="1.0" encoding="...

15

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

Some fonts don't advertise their features correctly, as far as Polyglossia can understand them. In your case you have to announce that Courier New can be used also for cyrillic monospaced bits: \newfontfamily{\cyrillicfonttt}{Courier New} Notice also that if you should enclose English passages in suitable environment, or hyphenation won't be even attempted....

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 problem is not directly related to polyglossia. The problem is that that there is no english-apa.lbx. The existing british-apa.lbx defines extras for british. And as mentioned in the biblatex documentation "\DeclareLanguageMapping is not intended to handle language variants (e. g., American English vs. British English) or babel language aliases (e. g., ...

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

This is not a bug. xeCJK treats ambigious punctuations as CJK punctuations. The ellipsis is treated as CJK punctuation thus it uses STSong font (华文宋体) and the following spaces are ignored. You can use \ldots, \dots or \textellipsis to get the proper ellipsis for western languages. (In fact xeCJK patches theses macros specially using \makexeCJKinactive.) ...

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

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}% \...

12

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 ...

11

It's a clear bug in how Polyglossia manages the situation, as it seems not taking into account the current language. A temporary workaround is to say \let\hebrewfonttt\ttfamily just after \newfontfamily\hebrewfont{David CLM} (it suffices to say it in the preamble, anyway). This assuming that you don't need Hebrew in the minted environment.

11

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{...

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

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

While polyglossia is widely recommended for XeLaTeX usage, babel can still be used for languages that need only the Latin alphabet.

10

You can use xetex input mapping feature. It is used to typeset transliterated devanagari. Other example is RomDev, for input in unicode transliteration. I haven't find any map file for conversion in the opposite direction, but it was not difficult to modify the RomDev map to go in the other way. Download the file DevRom.map and compile it with ...

10

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 }{}{} \...

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

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 ...

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 ...

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