Tag Info

Hot answers tagged

8

So I investigated option of using LuaTeX's node processing callbacks. Best suited is pre_output_filter which is called when page is ready for the output. I've created simple package, named boxes, which consists of two files: LaTeX package boxes.sty and Lua module boxes.lua. boxes.sty: \ProvidesPackage{boxes} \RequirePackage{luacode} ...


6

The mapping substitutions work on a character basis, but XeTeX never uses the space character; rather, it changes space tokens into horizontal glue, so when the substitution stage is reached, there's never a combination U+0020 U+00B7. You can use newunicodechar for this purpose: \documentclass{article} \usepackage{fontspec} ...


5

Just add Mapping=tex-text or Ligatures=TeX to the \fontspec options (see §11.1 of the docs).


5

Vollkorn Here is a great open-source font from Friedrich Althausen with eight styles and multilingual support. http://vollkorn-typeface.com/. The following font flavors are supported: PostScript OpenType .otf TrueType OpenType .ttf Web open Font Format .woff Embedded OpenType .eot Ligatures Glyphs Kerning Found in this tex.stackexchange ...


5

This problem affects most Adobe fonts (Adobe, are you listening?). I don’t use xetex enough to know what can be done about it in xetex, but in luatex you can write a feature file to adjust the kerning without editing the font itself. It’s much easier than it sounds. E.g., \documentclass[12pt]{article} \usepackage[french]{babel} ...


5

The character exists, provided you use the correct Unicode point (U+0387) \documentclass{scrbook} \usepackage{fontspec} \setmainfont{texgyrepagella-regular.otf}[Style = Alternate, Ligatures = {Common,TeX}] \newfontfamily\greekfont{GFS Porson}[Ligatures = TeX] \usepackage{polyglossia} \setmainlanguage{german} \setotherlanguage[variant = ancient]{greek} ...


5

As for your primary question: use the Ligatures=TeX when selecting the font; for example, \setmainfont[Ligatures=TeX]{Segoe UI}. You can use Unicode en dash (–; U+2013) directly instead, which I find better than using the old TeX ligatures. As for your secondary question: I can recommend wholeheartedly Gentium. It is free, libre, comprehensive and extremely ...


4

\usepackage{fontspec} is sufficient. It will set the fonts to Latin Modern by default. That said, your code compiles fine for me. I am not that familiar with XeLaTeX. However, I know it uses OS fonts and I know it handles things differently from LuaLaTeX. So you may need to tell your system about the TeX fonts. For example, I have the following ...


4

Suppose the two fonts "X" and "Y" are TeX Gyre Pagella and TeX Gyre Heros (Palatino and Helvetica clones, respectively). Both fonts feature normal, bold, italic, and bold-italic shapes/weights. To restrict the Scale=0.8 option to just the bold weight of TeX Gyre Heros, you could issue the commands \usepackage{fontspec} \setmainfont{TeX Gyre Pagella} %% ...


3

pxfonts is not “officially” deprecated, but it is so “typographically”, because there are several flaws in its design. Such flaws have brilliantly been fixed by Michael Sharpe who provided the package newpxtext and newpxmath instead. However, newpxtext isn't compatible with fontspec, because it's based on “classical” 256 slot fonts. You can obtain a very ...


3

While LinLibertine_M.otf advertises covering cyrl, grek and hebr, it shows no glyph belonging to those alphabets. Here is a picture of the font table obtained with fontforge and showing the Cyrillic range: No glyph is shown. With otfinfo -g the result is the same: no Cyrillic glyph name is output. So, yes: Linux Libertine Mono doesn't support Cyrillic.


3

You need to tell fontspec to emulate traditional TeX typesetting features, such as turning backticks and straight quotation marks into curly quotation marks. You can do this using Mapping but the recommended syntax is Ligatures=TeX: \documentclass{article} \usepackage[a4paper, margin = 0.4in]{geometry} \usepackage{fontspec} \begin{document} ...


2

I am currently disabling kerning between an apostrophe and a succeeding letter by using XeTeX's interchartoken mechanism: \XeTeXinterchartokenstate=1 \newXeTeXintercharclass\ApostropheClass \XeTeXcharclass`'\ApostropheClass \newXeTeXintercharclass\AfterApostropheClass \XeTeXcharclass`a\AfterApostropheClass \XeTeXcharclass`A\AfterApostropheClass ...


2

When fontspec doesn’t find the bold or italic of a font, you sometimes have to help it along. If the font’s name is Pecita Bold, \setmainfont{Pecita}[BoldFont={* Bold}] should work (in older versions of fontspec, use \setmainfont[BoldFont={* Bold}]{Pecita}). Section 5.1 of the fontspec documentation gives more information about this.


2

Updating lualatex font information as @cfr said fixed it. Open terminal and change to you texlive bin directory: cd /usr/local/texlive/2014/bin/x86_64-darwin Run the font update luaotfload-tool -u


2

\ifxetex detects whether you are compiling with XeTeX or not. If you are, it executes the if bit. If not, it executes the else bit. Moreover, you cannot use inputenc with XeTeX (so it is good, really, that that code is never read). You can use 'normal LaTeX fonts' for the rest of the document, though. Just use the three lines of code from ...


1

I can't figure out why fontspec is acting so, but here is a workaround: add another size-feature, and so every SmallCapsFeatures will apply to the next size. A MWE: \documentclass[12pt]{article} \usepackage{xcolor,fontspec} \setmainfont[ SizeFeatures = { { Size = { -1}, Color = blue, SmallCapsFeatures = { ...


1

As you have a variable font for the 'unit' part of quantities, and that is a text mode font, I think you are best off using text mode with siunitx \sisetup{unit-mode = text} This will then use whatever the current text font is for units, so the math font will have no impact. (Untested as I don't have the appropriate fonts.)



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