Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
34

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


18

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

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


14

The KOMA scripts set headings in a sans serif font. This means in your example, they will be set in Arial. The version of Arial that you have installed therefore does not have the Greek script, hence the error (although the mention of roman in the error is a bit misleading here.) However, if you want to use Linux Libertine for all Greek text, then you need ...


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


14

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


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


13

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


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

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


11

I'm not sure why polyglossia adds extra space between the graphic and caption, maybe a bug. You can just use \centercaption at the beginning of the wrapfigure environment to prevent the extra space it produces. BTW, wrapfig package's wrapfigure environment has several optional parameters. The first one is the number of lines it vertically occupies. For your ...


11

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


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


11

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


10

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


10

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.


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


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